dmi.h 556 B

12345678910111213141516171819202122
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. #ifndef _ASM_X86_DMI_H
  3. #define _ASM_X86_DMI_H
  4. #include <linux/compiler.h>
  5. #include <linux/init.h>
  6. #include <linux/io.h>
  7. #include <asm/setup.h>
  8. static __always_inline __init void *dmi_alloc(unsigned len)
  9. {
  10. return extend_brk(len, sizeof(int));
  11. }
  12. /* Use early IO mappings for DMI because it's initialized early */
  13. #define dmi_early_remap early_memremap
  14. #define dmi_early_unmap early_memunmap
  15. #define dmi_remap(_x, _l) memremap(_x, _l, MEMREMAP_WB)
  16. #define dmi_unmap(_x) memunmap(_x)
  17. #endif /* _ASM_X86_DMI_H */