fixmap.h 612 B

12345678910111213141516171819202122232425262728
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. /*
  3. * fixmap.h: compile-time virtual memory allocation
  4. *
  5. * Copyright (C) 2020-2022 Loongson Technology Corporation Limited
  6. */
  7. #ifndef _ASM_FIXMAP_H
  8. #define _ASM_FIXMAP_H
  9. #define NR_FIX_BTMAPS 64
  10. enum fixed_addresses {
  11. FIX_HOLE,
  12. FIX_EARLYCON_MEM_BASE,
  13. __end_of_fixed_addresses
  14. };
  15. #define FIXADDR_SIZE (__end_of_fixed_addresses << PAGE_SHIFT)
  16. #define FIXADDR_START (FIXADDR_TOP - FIXADDR_SIZE)
  17. #define FIXMAP_PAGE_IO PAGE_KERNEL_SUC
  18. extern void __set_fixmap(enum fixed_addresses idx,
  19. phys_addr_t phys, pgprot_t flags);
  20. #include <asm-generic/fixmap.h>
  21. #endif