diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-15 21:45:49 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-15 21:45:49 -0400 |
commit | 28aa483f80d146a8f117eb65a4fddf31d58230d7 (patch) | |
tree | fdd5b18fe9be33b38d1e9b1c1ebcff974f788a93 /arch | |
parent | 0560551dca0c02a4b23f95a9c339882ff291e1c7 (diff) |
x86: Fix discontigmem + non-HIGHMEM compile
It's not necessarily a very sane configuration, but people running "make
randconfig" noticed it wouldn't compile. This fixes some obvious
problems in discontig.c to allow a clean compile.
Acked-by: andrew hendry <andrew.hendry@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/i386/mm/discontig.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/arch/i386/mm/discontig.c b/arch/i386/mm/discontig.c index aa58720f6871..860e912a3fbb 100644 --- a/arch/i386/mm/discontig.c +++ b/arch/i386/mm/discontig.c | |||
@@ -31,6 +31,7 @@ | |||
31 | #include <linux/module.h> | 31 | #include <linux/module.h> |
32 | #include <linux/kexec.h> | 32 | #include <linux/kexec.h> |
33 | #include <linux/pfn.h> | 33 | #include <linux/pfn.h> |
34 | #include <linux/swap.h> | ||
34 | 35 | ||
35 | #include <asm/e820.h> | 36 | #include <asm/e820.h> |
36 | #include <asm/setup.h> | 37 | #include <asm/setup.h> |
@@ -97,14 +98,8 @@ unsigned long node_memmap_size_bytes(int nid, unsigned long start_pfn, | |||
97 | #endif | 98 | #endif |
98 | 99 | ||
99 | extern unsigned long find_max_low_pfn(void); | 100 | extern unsigned long find_max_low_pfn(void); |
100 | extern void find_max_pfn(void); | ||
101 | extern void add_one_highpage_init(struct page *, int, int); | 101 | extern void add_one_highpage_init(struct page *, int, int); |
102 | |||
103 | extern struct e820map e820; | ||
104 | extern unsigned long highend_pfn, highstart_pfn; | 102 | extern unsigned long highend_pfn, highstart_pfn; |
105 | extern unsigned long max_low_pfn; | ||
106 | extern unsigned long totalram_pages; | ||
107 | extern unsigned long totalhigh_pages; | ||
108 | 103 | ||
109 | #define LARGE_PAGE_BYTES (PTRS_PER_PTE * PAGE_SIZE) | 104 | #define LARGE_PAGE_BYTES (PTRS_PER_PTE * PAGE_SIZE) |
110 | 105 | ||
@@ -360,7 +355,9 @@ void __init zone_sizes_init(void) | |||
360 | max_zone_pfns[ZONE_DMA] = | 355 | max_zone_pfns[ZONE_DMA] = |
361 | virt_to_phys((char *)MAX_DMA_ADDRESS) >> PAGE_SHIFT; | 356 | virt_to_phys((char *)MAX_DMA_ADDRESS) >> PAGE_SHIFT; |
362 | max_zone_pfns[ZONE_NORMAL] = max_low_pfn; | 357 | max_zone_pfns[ZONE_NORMAL] = max_low_pfn; |
358 | #ifdef CONFIG_HIGHMEM | ||
363 | max_zone_pfns[ZONE_HIGHMEM] = highend_pfn; | 359 | max_zone_pfns[ZONE_HIGHMEM] = highend_pfn; |
360 | #endif | ||
364 | 361 | ||
365 | /* If SRAT has not registered memory, register it now */ | 362 | /* If SRAT has not registered memory, register it now */ |
366 | if (find_max_pfn_with_active_regions() == 0) { | 363 | if (find_max_pfn_with_active_regions() == 0) { |