diff options
author | Tony Luck <tony.luck@intel.com> | 2005-10-28 17:32:56 -0400 |
---|---|---|
committer | Tony Luck <tony.luck@intel.com> | 2005-10-28 17:32:56 -0400 |
commit | c87ff94333642ce3db4fc0857ad1f723cb42c1dd (patch) | |
tree | 9577010b5ca20b692904c4728b305a9cbde5373e /include | |
parent | 556902cd2d2cfdc54fe1f1d7f3ac5e2eb276ac09 (diff) | |
parent | 1e5c936e3cc2ab745f66c0ae296c42f892ffd42a (diff) |
Pull sparsemem-v5 into release branch
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-ia64/meminit.h | 2 | ||||
-rw-r--r-- | include/asm-ia64/mmzone.h | 10 | ||||
-rw-r--r-- | include/asm-ia64/nodedata.h | 4 | ||||
-rw-r--r-- | include/asm-ia64/page.h | 6 | ||||
-rw-r--r-- | include/asm-ia64/sparsemem.h | 20 |
5 files changed, 33 insertions, 9 deletions
diff --git a/include/asm-ia64/meminit.h b/include/asm-ia64/meminit.h index 90646632237c..46501b01a5c5 100644 --- a/include/asm-ia64/meminit.h +++ b/include/asm-ia64/meminit.h | |||
@@ -43,7 +43,7 @@ extern void efi_memmap_init(unsigned long *, unsigned long *); | |||
43 | #define GRANULEROUNDUP(n) (((n)+IA64_GRANULE_SIZE-1) & ~(IA64_GRANULE_SIZE-1)) | 43 | #define GRANULEROUNDUP(n) (((n)+IA64_GRANULE_SIZE-1) & ~(IA64_GRANULE_SIZE-1)) |
44 | #define ORDERROUNDDOWN(n) ((n) & ~((PAGE_SIZE<<MAX_ORDER)-1)) | 44 | #define ORDERROUNDDOWN(n) ((n) & ~((PAGE_SIZE<<MAX_ORDER)-1)) |
45 | 45 | ||
46 | #ifdef CONFIG_DISCONTIGMEM | 46 | #ifdef CONFIG_NUMA |
47 | extern void call_pernode_memory (unsigned long start, unsigned long len, void *func); | 47 | extern void call_pernode_memory (unsigned long start, unsigned long len, void *func); |
48 | #else | 48 | #else |
49 | # define call_pernode_memory(start, len, func) (*func)(start, len, 0) | 49 | # define call_pernode_memory(start, len, func) (*func)(start, len, 0) |
diff --git a/include/asm-ia64/mmzone.h b/include/asm-ia64/mmzone.h index d32f51e3d6c2..34efe88eb849 100644 --- a/include/asm-ia64/mmzone.h +++ b/include/asm-ia64/mmzone.h | |||
@@ -15,7 +15,7 @@ | |||
15 | #include <asm/page.h> | 15 | #include <asm/page.h> |
16 | #include <asm/meminit.h> | 16 | #include <asm/meminit.h> |
17 | 17 | ||
18 | #ifdef CONFIG_DISCONTIGMEM | 18 | #ifdef CONFIG_NUMA |
19 | 19 | ||
20 | static inline int pfn_to_nid(unsigned long pfn) | 20 | static inline int pfn_to_nid(unsigned long pfn) |
21 | { | 21 | { |
@@ -31,6 +31,10 @@ static inline int pfn_to_nid(unsigned long pfn) | |||
31 | #endif | 31 | #endif |
32 | } | 32 | } |
33 | 33 | ||
34 | #ifdef CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID | ||
35 | extern int early_pfn_to_nid(unsigned long pfn); | ||
36 | #endif | ||
37 | |||
34 | #ifdef CONFIG_IA64_DIG /* DIG systems are small */ | 38 | #ifdef CONFIG_IA64_DIG /* DIG systems are small */ |
35 | # define MAX_PHYSNODE_ID 8 | 39 | # define MAX_PHYSNODE_ID 8 |
36 | # define NR_NODE_MEMBLKS (MAX_NUMNODES * 8) | 40 | # define NR_NODE_MEMBLKS (MAX_NUMNODES * 8) |
@@ -39,8 +43,8 @@ static inline int pfn_to_nid(unsigned long pfn) | |||
39 | # define NR_NODE_MEMBLKS (MAX_NUMNODES * 4) | 43 | # define NR_NODE_MEMBLKS (MAX_NUMNODES * 4) |
40 | #endif | 44 | #endif |
41 | 45 | ||
42 | #else /* CONFIG_DISCONTIGMEM */ | 46 | #else /* CONFIG_NUMA */ |
43 | # define NR_NODE_MEMBLKS (MAX_NUMNODES * 4) | 47 | # define NR_NODE_MEMBLKS (MAX_NUMNODES * 4) |
44 | #endif /* CONFIG_DISCONTIGMEM */ | 48 | #endif /* CONFIG_NUMA */ |
45 | 49 | ||
46 | #endif /* _ASM_IA64_MMZONE_H */ | 50 | #endif /* _ASM_IA64_MMZONE_H */ |
diff --git a/include/asm-ia64/nodedata.h b/include/asm-ia64/nodedata.h index 6b0f3ed89b7e..9978c7ce7549 100644 --- a/include/asm-ia64/nodedata.h +++ b/include/asm-ia64/nodedata.h | |||
@@ -17,7 +17,7 @@ | |||
17 | #include <asm/percpu.h> | 17 | #include <asm/percpu.h> |
18 | #include <asm/mmzone.h> | 18 | #include <asm/mmzone.h> |
19 | 19 | ||
20 | #ifdef CONFIG_DISCONTIGMEM | 20 | #ifdef CONFIG_NUMA |
21 | 21 | ||
22 | /* | 22 | /* |
23 | * Node Data. One of these structures is located on each node of a NUMA system. | 23 | * Node Data. One of these structures is located on each node of a NUMA system. |
@@ -47,6 +47,6 @@ struct ia64_node_data { | |||
47 | */ | 47 | */ |
48 | #define NODE_DATA(nid) (local_node_data->pg_data_ptrs[nid]) | 48 | #define NODE_DATA(nid) (local_node_data->pg_data_ptrs[nid]) |
49 | 49 | ||
50 | #endif /* CONFIG_DISCONTIGMEM */ | 50 | #endif /* CONFIG_NUMA */ |
51 | 51 | ||
52 | #endif /* _ASM_IA64_NODEDATA_H */ | 52 | #endif /* _ASM_IA64_NODEDATA_H */ |
diff --git a/include/asm-ia64/page.h b/include/asm-ia64/page.h index 9edffad8c28b..ef436b9d06ad 100644 --- a/include/asm-ia64/page.h +++ b/include/asm-ia64/page.h | |||
@@ -102,15 +102,15 @@ do { \ | |||
102 | 102 | ||
103 | #ifdef CONFIG_VIRTUAL_MEM_MAP | 103 | #ifdef CONFIG_VIRTUAL_MEM_MAP |
104 | extern int ia64_pfn_valid (unsigned long pfn); | 104 | extern int ia64_pfn_valid (unsigned long pfn); |
105 | #else | 105 | #elif defined(CONFIG_FLATMEM) |
106 | # define ia64_pfn_valid(pfn) 1 | 106 | # define ia64_pfn_valid(pfn) 1 |
107 | #endif | 107 | #endif |
108 | 108 | ||
109 | #ifndef CONFIG_DISCONTIGMEM | 109 | #ifdef CONFIG_FLATMEM |
110 | # define pfn_valid(pfn) (((pfn) < max_mapnr) && ia64_pfn_valid(pfn)) | 110 | # define pfn_valid(pfn) (((pfn) < max_mapnr) && ia64_pfn_valid(pfn)) |
111 | # define page_to_pfn(page) ((unsigned long) (page - mem_map)) | 111 | # define page_to_pfn(page) ((unsigned long) (page - mem_map)) |
112 | # define pfn_to_page(pfn) (mem_map + (pfn)) | 112 | # define pfn_to_page(pfn) (mem_map + (pfn)) |
113 | #else | 113 | #elif defined(CONFIG_DISCONTIGMEM) |
114 | extern struct page *vmem_map; | 114 | extern struct page *vmem_map; |
115 | extern unsigned long max_low_pfn; | 115 | extern unsigned long max_low_pfn; |
116 | # define pfn_valid(pfn) (((pfn) < max_low_pfn) && ia64_pfn_valid(pfn)) | 116 | # define pfn_valid(pfn) (((pfn) < max_low_pfn) && ia64_pfn_valid(pfn)) |
diff --git a/include/asm-ia64/sparsemem.h b/include/asm-ia64/sparsemem.h new file mode 100644 index 000000000000..67a7c40ec27f --- /dev/null +++ b/include/asm-ia64/sparsemem.h | |||
@@ -0,0 +1,20 @@ | |||
1 | #ifndef _ASM_IA64_SPARSEMEM_H | ||
2 | #define _ASM_IA64_SPARSEMEM_H | ||
3 | |||
4 | #ifdef CONFIG_SPARSEMEM | ||
5 | /* | ||
6 | * SECTION_SIZE_BITS 2^N: how big each section will be | ||
7 | * MAX_PHYSMEM_BITS 2^N: how much memory we can have in that space | ||
8 | */ | ||
9 | |||
10 | #define SECTION_SIZE_BITS (30) | ||
11 | #define MAX_PHYSMEM_BITS (50) | ||
12 | #ifdef CONFIG_FORCE_MAX_ZONEORDER | ||
13 | #if ((CONFIG_FORCE_MAX_ZONEORDER - 1 + PAGE_SHIFT) > SECTION_SIZE_BITS) | ||
14 | #undef SECTION_SIZE_BITS | ||
15 | #define SECTION_SIZE_BITS (CONFIG_FORCE_MAX_ZONEORDER - 1 + PAGE_SHIFT) | ||
16 | #endif | ||
17 | #endif | ||
18 | |||
19 | #endif /* CONFIG_SPARSEMEM */ | ||
20 | #endif /* _ASM_IA64_SPARSEMEM_H */ | ||