diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-11-19 21:53:02 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-11-19 21:53:02 -0500 |
commit | 3108864e2d70891d30d60af6af256a1b517d7078 (patch) | |
tree | f127ddaf0b582098caf7f9e3ed18ed535324eae4 /arch | |
parent | 4f7dbc7ff4ec19b40ec083f7c54a87d3ece0089d (diff) | |
parent | 604d20554883cf03f888440d58ea7c6d36899839 (diff) |
Merge branch 'x86/numa' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'x86/numa' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
x86: make NUMA on 32-bit depend on EXPERIMENTAL again
x86, hibernate: fix breakage on x86_32 with CONFIG_NUMA set
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/Kconfig | 2 | ||||
-rw-r--r-- | arch/x86/include/asm/mmzone_32.h | 4 | ||||
-rw-r--r-- | arch/x86/mm/numa_32.c | 35 | ||||
-rw-r--r-- | arch/x86/power/hibernate_32.c | 4 |
4 files changed, 44 insertions, 1 deletions
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index fd2de7019537..ac22bb7719f7 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig | |||
@@ -960,7 +960,7 @@ config ARCH_PHYS_ADDR_T_64BIT | |||
960 | config NUMA | 960 | config NUMA |
961 | bool "Numa Memory Allocation and Scheduler Support (EXPERIMENTAL)" | 961 | bool "Numa Memory Allocation and Scheduler Support (EXPERIMENTAL)" |
962 | depends on SMP | 962 | depends on SMP |
963 | depends on X86_64 || (X86_32 && HIGHMEM64G && (X86_NUMAQ || X86_BIGSMP || X86_SUMMIT && ACPI) && BROKEN) | 963 | depends on X86_64 || (X86_32 && HIGHMEM64G && (X86_NUMAQ || X86_BIGSMP || X86_SUMMIT && ACPI) && EXPERIMENTAL) |
964 | default n if X86_PC | 964 | default n if X86_PC |
965 | default y if (X86_NUMAQ || X86_SUMMIT || X86_BIGSMP) | 965 | default y if (X86_NUMAQ || X86_SUMMIT || X86_BIGSMP) |
966 | help | 966 | help |
diff --git a/arch/x86/include/asm/mmzone_32.h b/arch/x86/include/asm/mmzone_32.h index 485bdf059ffb..07f1af494ca5 100644 --- a/arch/x86/include/asm/mmzone_32.h +++ b/arch/x86/include/asm/mmzone_32.h | |||
@@ -34,10 +34,14 @@ static inline void get_memcfg_numa(void) | |||
34 | 34 | ||
35 | extern int early_pfn_to_nid(unsigned long pfn); | 35 | extern int early_pfn_to_nid(unsigned long pfn); |
36 | 36 | ||
37 | extern void resume_map_numa_kva(pgd_t *pgd); | ||
38 | |||
37 | #else /* !CONFIG_NUMA */ | 39 | #else /* !CONFIG_NUMA */ |
38 | 40 | ||
39 | #define get_memcfg_numa get_memcfg_numa_flat | 41 | #define get_memcfg_numa get_memcfg_numa_flat |
40 | 42 | ||
43 | static inline void resume_map_numa_kva(pgd_t *pgd) {} | ||
44 | |||
41 | #endif /* CONFIG_NUMA */ | 45 | #endif /* CONFIG_NUMA */ |
42 | 46 | ||
43 | #ifdef CONFIG_DISCONTIGMEM | 47 | #ifdef CONFIG_DISCONTIGMEM |
diff --git a/arch/x86/mm/numa_32.c b/arch/x86/mm/numa_32.c index 847c164725f4..8518c678d83f 100644 --- a/arch/x86/mm/numa_32.c +++ b/arch/x86/mm/numa_32.c | |||
@@ -222,6 +222,41 @@ static void __init remap_numa_kva(void) | |||
222 | } | 222 | } |
223 | } | 223 | } |
224 | 224 | ||
225 | #ifdef CONFIG_HIBERNATION | ||
226 | /** | ||
227 | * resume_map_numa_kva - add KVA mapping to the temporary page tables created | ||
228 | * during resume from hibernation | ||
229 | * @pgd_base - temporary resume page directory | ||
230 | */ | ||
231 | void resume_map_numa_kva(pgd_t *pgd_base) | ||
232 | { | ||
233 | int node; | ||
234 | |||
235 | for_each_online_node(node) { | ||
236 | unsigned long start_va, start_pfn, size, pfn; | ||
237 | |||
238 | start_va = (unsigned long)node_remap_start_vaddr[node]; | ||
239 | start_pfn = node_remap_start_pfn[node]; | ||
240 | size = node_remap_size[node]; | ||
241 | |||
242 | printk(KERN_DEBUG "%s: node %d\n", __FUNCTION__, node); | ||
243 | |||
244 | for (pfn = 0; pfn < size; pfn += PTRS_PER_PTE) { | ||
245 | unsigned long vaddr = start_va + (pfn << PAGE_SHIFT); | ||
246 | pgd_t *pgd = pgd_base + pgd_index(vaddr); | ||
247 | pud_t *pud = pud_offset(pgd, vaddr); | ||
248 | pmd_t *pmd = pmd_offset(pud, vaddr); | ||
249 | |||
250 | set_pmd(pmd, pfn_pmd(start_pfn + pfn, | ||
251 | PAGE_KERNEL_LARGE_EXEC)); | ||
252 | |||
253 | printk(KERN_DEBUG "%s: %08lx -> pfn %08lx\n", | ||
254 | __FUNCTION__, vaddr, start_pfn + pfn); | ||
255 | } | ||
256 | } | ||
257 | } | ||
258 | #endif | ||
259 | |||
225 | static unsigned long calculate_numa_remap_pages(void) | 260 | static unsigned long calculate_numa_remap_pages(void) |
226 | { | 261 | { |
227 | int nid; | 262 | int nid; |
diff --git a/arch/x86/power/hibernate_32.c b/arch/x86/power/hibernate_32.c index f2b6e3f11bfc..81197c62d5b3 100644 --- a/arch/x86/power/hibernate_32.c +++ b/arch/x86/power/hibernate_32.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <asm/system.h> | 12 | #include <asm/system.h> |
13 | #include <asm/page.h> | 13 | #include <asm/page.h> |
14 | #include <asm/pgtable.h> | 14 | #include <asm/pgtable.h> |
15 | #include <asm/mmzone.h> | ||
15 | 16 | ||
16 | /* Defined in hibernate_asm_32.S */ | 17 | /* Defined in hibernate_asm_32.S */ |
17 | extern int restore_image(void); | 18 | extern int restore_image(void); |
@@ -127,6 +128,9 @@ static int resume_physical_mapping_init(pgd_t *pgd_base) | |||
127 | } | 128 | } |
128 | } | 129 | } |
129 | } | 130 | } |
131 | |||
132 | resume_map_numa_kva(pgd_base); | ||
133 | |||
130 | return 0; | 134 | return 0; |
131 | } | 135 | } |
132 | 136 | ||