H. Peter Anvin | 1965aae | 2008-10-22 22:26:29 -0700 | [diff] [blame] | 1 | #ifndef _ASM_X86_SPARSEMEM_H |
| 2 | #define _ASM_X86_SPARSEMEM_H |
Thomas Gleixner | 8a423ff | 2008-01-30 13:30:37 +0100 | [diff] [blame] | 3 | |
| 4 | #ifdef CONFIG_SPARSEMEM |
| 5 | /* |
| 6 | * generic non-linear memory support: |
| 7 | * |
| 8 | * 1) we will not split memory into more chunks than will fit into the flags |
| 9 | * field of the struct page |
| 10 | * |
| 11 | * SECTION_SIZE_BITS 2^n: size of each section |
| 12 | * MAX_PHYSADDR_BITS 2^n: max size of physical address space |
| 13 | * MAX_PHYSMEM_BITS 2^n: how much memory we can have in that space |
| 14 | * |
| 15 | */ |
| 16 | |
Thomas Gleixner | 96a388d | 2007-10-11 11:20:03 +0200 | [diff] [blame] | 17 | #ifdef CONFIG_X86_32 |
Thomas Gleixner | 8a423ff | 2008-01-30 13:30:37 +0100 | [diff] [blame] | 18 | # ifdef CONFIG_X86_PAE |
Jeremy Fitzhardinge | fb8e837 | 2008-03-27 17:28:39 -0700 | [diff] [blame] | 19 | # define SECTION_SIZE_BITS 29 |
Thomas Gleixner | 8a423ff | 2008-01-30 13:30:37 +0100 | [diff] [blame] | 20 | # define MAX_PHYSADDR_BITS 36 |
| 21 | # define MAX_PHYSMEM_BITS 36 |
| 22 | # else |
| 23 | # define SECTION_SIZE_BITS 26 |
| 24 | # define MAX_PHYSADDR_BITS 32 |
| 25 | # define MAX_PHYSMEM_BITS 32 |
| 26 | # endif |
| 27 | #else /* CONFIG_X86_32 */ |
| 28 | # define SECTION_SIZE_BITS 27 /* matt - 128 is convenient right now */ |
Jack Steiner | 8434e73 | 2008-03-21 08:31:57 -0500 | [diff] [blame] | 29 | # define MAX_PHYSADDR_BITS 44 |
Rik van Riel | c898faf | 2009-05-05 17:28:56 -0400 | [diff] [blame] | 30 | # define MAX_PHYSMEM_BITS 46 |
Thomas Gleixner | 8a423ff | 2008-01-30 13:30:37 +0100 | [diff] [blame] | 31 | #endif |
| 32 | |
| 33 | #endif /* CONFIG_SPARSEMEM */ |
H. Peter Anvin | 1965aae | 2008-10-22 22:26:29 -0700 | [diff] [blame] | 34 | #endif /* _ASM_X86_SPARSEMEM_H */ |