1b2441318SGreg Kroah-Hartman /* SPDX-License-Identifier: GPL-2.0 */ 21965aae3SH. Peter Anvin #ifndef _ASM_X86_DMI_H 31965aae3SH. Peter Anvin #define _ASM_X86_DMI_H 4bb898558SAl Viro 5c8608d6bSJeremy Fitzhardinge #include <linux/compiler.h> 6c8608d6bSJeremy Fitzhardinge #include <linux/init.h> 7*447ae316SNicolai Stange #include <linux/io.h> 8c8608d6bSJeremy Fitzhardinge 96de6cb44SJeremy Fitzhardinge #include <asm/setup.h> 10bb898558SAl Viro dmi_alloc(unsigned len)11c8608d6bSJeremy Fitzhardingestatic __always_inline __init void *dmi_alloc(unsigned len) 12bb898558SAl Viro { 136de6cb44SJeremy Fitzhardinge return extend_brk(len, sizeof(int)); 14bb898558SAl Viro } 15bb898558SAl Viro 16bb898558SAl Viro /* Use early IO mappings for DMI because it's initialized early */ 17f7750a79STom Lendacky #define dmi_early_remap early_memremap 18f7750a79STom Lendacky #define dmi_early_unmap early_memunmap 19f7750a79STom Lendacky #define dmi_remap(_x, _l) memremap(_x, _l, MEMREMAP_WB) 20f7750a79STom Lendacky #define dmi_unmap(_x) memunmap(_x) 21bb898558SAl Viro 221965aae3SH. Peter Anvin #endif /* _ASM_X86_DMI_H */ 23