sparsemem.h 952 B

123456789101112131415161718192021222324252627282930313233343536
  1. #ifndef _ASM_POWERPC_SPARSEMEM_H
  2. #define _ASM_POWERPC_SPARSEMEM_H 1
  3. #ifdef __KERNEL__
  4. #ifdef CONFIG_SPARSEMEM
  5. /*
  6. * SECTION_SIZE_BITS 2^N: how big each section will be
  7. * MAX_PHYSADDR_BITS 2^N: how much physical address space we have
  8. * MAX_PHYSMEM_BITS 2^N: how much memory we can have in that space
  9. */
  10. #define SECTION_SIZE_BITS 24
  11. #if defined(CONFIG_PS3_USE_LPAR_ADDR)
  12. #define MAX_PHYSADDR_BITS 47
  13. #define MAX_PHYSMEM_BITS 47
  14. #else
  15. #define MAX_PHYSADDR_BITS 44
  16. #define MAX_PHYSMEM_BITS 44
  17. #endif
  18. #ifdef CONFIG_MEMORY_HOTPLUG
  19. extern void create_section_mapping(unsigned long start, unsigned long end);
  20. #ifdef CONFIG_NUMA
  21. extern int hot_add_scn_to_nid(unsigned long scn_addr);
  22. #else
  23. static inline int hot_add_scn_to_nid(unsigned long scn_addr)
  24. {
  25. return 0;
  26. }
  27. #endif /* CONFIG_NUMA */
  28. #endif /* CONFIG_MEMORY_HOTPLUG */
  29. #endif /* CONFIG_SPARSEMEM */
  30. #endif /* __KERNEL__ */
  31. #endif /* _ASM_POWERPC_SPARSEMEM_H */