diff options
-rw-r--r-- | include/asm-x86/mmzone_64.h | 2 | ||||
-rw-r--r-- | include/asm-x86/sparsemem.h | 35 | ||||
-rw-r--r-- | include/asm-x86/sparsemem_32.h | 28 | ||||
-rw-r--r-- | include/asm-x86/sparsemem_64.h | 26 |
4 files changed, 34 insertions, 57 deletions
diff --git a/include/asm-x86/mmzone_64.h b/include/asm-x86/mmzone_64.h index 19a89377b123..1e0ed34a6adc 100644 --- a/include/asm-x86/mmzone_64.h +++ b/include/asm-x86/mmzone_64.h | |||
@@ -41,6 +41,8 @@ static inline __attribute__((pure)) int phys_to_nid(unsigned long addr) | |||
41 | #define node_end_pfn(nid) (NODE_DATA(nid)->node_start_pfn + \ | 41 | #define node_end_pfn(nid) (NODE_DATA(nid)->node_start_pfn + \ |
42 | NODE_DATA(nid)->node_spanned_pages) | 42 | NODE_DATA(nid)->node_spanned_pages) |
43 | 43 | ||
44 | extern int early_pfn_to_nid(unsigned long pfn); | ||
45 | |||
44 | #ifdef CONFIG_DISCONTIGMEM | 46 | #ifdef CONFIG_DISCONTIGMEM |
45 | #define pfn_to_nid(pfn) phys_to_nid((unsigned long)(pfn) << PAGE_SHIFT) | 47 | #define pfn_to_nid(pfn) phys_to_nid((unsigned long)(pfn) << PAGE_SHIFT) |
46 | 48 | ||
diff --git a/include/asm-x86/sparsemem.h b/include/asm-x86/sparsemem.h index 3f203b1d9ee8..fa58cd55411a 100644 --- a/include/asm-x86/sparsemem.h +++ b/include/asm-x86/sparsemem.h | |||
@@ -1,5 +1,34 @@ | |||
1 | #ifndef _ASM_X86_SPARSEMEM_H | ||
2 | #define _ASM_X86_SPARSEMEM_H | ||
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 | |||
1 | #ifdef CONFIG_X86_32 | 17 | #ifdef CONFIG_X86_32 |
2 | # include "sparsemem_32.h" | 18 | # ifdef CONFIG_X86_PAE |
3 | #else | 19 | # define SECTION_SIZE_BITS 30 |
4 | # include "sparsemem_64.h" | 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 */ | ||
29 | # define MAX_PHYSADDR_BITS 40 | ||
30 | # define MAX_PHYSMEM_BITS 40 | ||
31 | #endif | ||
32 | |||
33 | #endif /* CONFIG_SPARSEMEM */ | ||
5 | #endif | 34 | #endif |
diff --git a/include/asm-x86/sparsemem_32.h b/include/asm-x86/sparsemem_32.h deleted file mode 100644 index d89c32100591..000000000000 --- a/include/asm-x86/sparsemem_32.h +++ /dev/null | |||
@@ -1,28 +0,0 @@ | |||
1 | #ifndef _I386_SPARSEMEM_H | ||
2 | #define _I386_SPARSEMEM_H | ||
3 | #ifdef CONFIG_SPARSEMEM | ||
4 | |||
5 | /* | ||
6 | * generic non-linear memory support: | ||
7 | * | ||
8 | * 1) we will not split memory into more chunks than will fit into the | ||
9 | * flags field of the struct page | ||
10 | */ | ||
11 | |||
12 | /* | ||
13 | * SECTION_SIZE_BITS 2^N: how big each section will be | ||
14 | * MAX_PHYSADDR_BITS 2^N: how much physical address space we have | ||
15 | * MAX_PHYSMEM_BITS 2^N: how much memory we can have in that space | ||
16 | */ | ||
17 | #ifdef CONFIG_X86_PAE | ||
18 | #define SECTION_SIZE_BITS 30 | ||
19 | #define MAX_PHYSADDR_BITS 36 | ||
20 | #define MAX_PHYSMEM_BITS 36 | ||
21 | #else | ||
22 | #define SECTION_SIZE_BITS 26 | ||
23 | #define MAX_PHYSADDR_BITS 32 | ||
24 | #define MAX_PHYSMEM_BITS 32 | ||
25 | #endif | ||
26 | |||
27 | #endif /* CONFIG_SPARSEMEM */ | ||
28 | #endif /* _I386_SPARSEMEM_H */ | ||
diff --git a/include/asm-x86/sparsemem_64.h b/include/asm-x86/sparsemem_64.h deleted file mode 100644 index dabb16714a71..000000000000 --- a/include/asm-x86/sparsemem_64.h +++ /dev/null | |||
@@ -1,26 +0,0 @@ | |||
1 | #ifndef _ASM_X86_64_SPARSEMEM_H | ||
2 | #define _ASM_X86_64_SPARSEMEM_H 1 | ||
3 | |||
4 | #ifdef CONFIG_SPARSEMEM | ||
5 | |||
6 | /* | ||
7 | * generic non-linear memory support: | ||
8 | * | ||
9 | * 1) we will not split memory into more chunks than will fit into the flags | ||
10 | * field of the struct page | ||
11 | * | ||
12 | * SECTION_SIZE_BITS 2^n: size of each section | ||
13 | * MAX_PHYSADDR_BITS 2^n: max size of physical address space | ||
14 | * MAX_PHYSMEM_BITS 2^n: how much memory we can have in that space | ||
15 | * | ||
16 | */ | ||
17 | |||
18 | #define SECTION_SIZE_BITS 27 /* matt - 128 is convenient right now */ | ||
19 | #define MAX_PHYSADDR_BITS 40 | ||
20 | #define MAX_PHYSMEM_BITS 40 | ||
21 | |||
22 | extern int early_pfn_to_nid(unsigned long pfn); | ||
23 | |||
24 | #endif /* CONFIG_SPARSEMEM */ | ||
25 | |||
26 | #endif /* _ASM_X86_64_SPARSEMEM_H */ | ||