sparsemem.h 564 B

123456789101112131415161718192021222324
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. #ifndef _MIPS_SPARSEMEM_H
  3. #define _MIPS_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. #if defined(CONFIG_MIPS_HUGE_TLB_SUPPORT) && defined(CONFIG_PAGE_SIZE_64KB)
  10. # define SECTION_SIZE_BITS 29
  11. #else
  12. # define SECTION_SIZE_BITS 28
  13. #endif
  14. #if defined(CONFIG_CPU_LOONGSON3)
  15. # define MAX_PHYSMEM_BITS 48
  16. #else
  17. # define MAX_PHYSMEM_BITS 35
  18. #endif
  19. #endif /* CONFIG_SPARSEMEM */
  20. #endif /* _MIPS_SPARSEMEM_H */