sparsemem.h 634 B

1234567891011121314151617181920212223
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. #ifndef _LOONGARCH_SPARSEMEM_H
  3. #define _LOONGARCH_SPARSEMEM_H
  4. #ifdef CONFIG_SPARSEMEM
  5. /*
  6. * SECTION_SIZE_BITS 2^N: how big each section will be
  7. * MAX_PHYSMEM_BITS 2^N: how much memory we can have in that space
  8. */
  9. #define SECTION_SIZE_BITS 29 /* 2^29 = Largest Huge Page Size */
  10. #define MAX_PHYSMEM_BITS 48
  11. #endif /* CONFIG_SPARSEMEM */
  12. #ifdef CONFIG_MEMORY_HOTPLUG
  13. int memory_add_physaddr_to_nid(u64 addr);
  14. #define memory_add_physaddr_to_nid memory_add_physaddr_to_nid
  15. #endif
  16. #define INIT_MEMBLOCK_RESERVED_REGIONS (INIT_MEMBLOCK_REGIONS + NR_CPUS)
  17. #endif /* _LOONGARCH_SPARSEMEM_H */