sparsemem.h 895 B

1234567891011121314151617181920212223242526272829303132333435
  1. #ifndef _ASM_X86_SPARSEMEM_H
  2. #define _ASM_X86_SPARSEMEM_H
  3. #ifdef CONFIG_SPARSEMEM
  4. /*
  5. * generic non-linear memory support:
  6. *
  7. * 1) we will not split memory into more chunks than will fit into the flags
  8. * field of the struct page
  9. *
  10. * SECTION_SIZE_BITS 2^n: size of each section
  11. * MAX_PHYSADDR_BITS 2^n: max size of physical address space
  12. * MAX_PHYSMEM_BITS 2^n: how much memory we can have in that space
  13. *
  14. */
  15. #ifdef CONFIG_X86_32
  16. # ifdef CONFIG_X86_PAE
  17. # define SECTION_SIZE_BITS 29
  18. # define MAX_PHYSADDR_BITS 36
  19. # define MAX_PHYSMEM_BITS 36
  20. # else
  21. # define SECTION_SIZE_BITS 26
  22. # define MAX_PHYSADDR_BITS 32
  23. # define MAX_PHYSMEM_BITS 32
  24. # endif
  25. #else /* CONFIG_X86_32 */
  26. # define SECTION_SIZE_BITS 27 /* matt - 128 is convenient right now */
  27. # define MAX_PHYSADDR_BITS 44
  28. # define MAX_PHYSMEM_BITS 46
  29. #endif
  30. #endif /* CONFIG_SPARSEMEM */
  31. #endif /* _ASM_X86_SPARSEMEM_H */