PageRenderTime 121ms CodeModel.GetById 58ms RepoModel.GetById 10ms app.codeStats 0ms

/arch/x86/include/asm/sparsemem.h

https://bitbucket.org/cresqo/cm7-p500-kernel
C Header | 34 lines | 20 code | 3 blank | 11 comment | 0 complexity | 8c75282f5410a18a2b99236fac429dc2 MD5 | raw file
Possible License(s): LGPL-2.0, AGPL-1.0, GPL-2.0
  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 */