From: Linus Torvalds Date: Wed, 16 May 2007 01:45:49 +0000 (-0700) Subject: x86: Fix discontigmem + non-HIGHMEM compile X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=28aa483f80d146a8f117eb65a4fddf31d58230d7;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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 Signed-off-by: Linus Torvalds --- 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 @@ #include #include #include +#include #include #include @@ -97,14 +98,8 @@ unsigned long node_memmap_size_bytes(int nid, unsigned long start_pfn, #endif extern unsigned long find_max_low_pfn(void); -extern void find_max_pfn(void); extern void add_one_highpage_init(struct page *, int, int); - -extern struct e820map e820; extern unsigned long highend_pfn, highstart_pfn; -extern unsigned long max_low_pfn; -extern unsigned long totalram_pages; -extern unsigned long totalhigh_pages; #define LARGE_PAGE_BYTES (PTRS_PER_PTE * PAGE_SIZE) @@ -360,7 +355,9 @@ void __init zone_sizes_init(void) max_zone_pfns[ZONE_DMA] = virt_to_phys((char *)MAX_DMA_ADDRESS) >> PAGE_SHIFT; max_zone_pfns[ZONE_NORMAL] = max_low_pfn; +#ifdef CONFIG_HIGHMEM max_zone_pfns[ZONE_HIGHMEM] = highend_pfn; +#endif /* If SRAT has not registered memory, register it now */ if (find_max_pfn_with_active_regions() == 0) {