/[linux-patches]/genpatches-2.6/trunk/2.6.14/1810_numa-early-panic.patch
Gentoo

Contents of /genpatches-2.6/trunk/2.6.14/1810_numa-early-panic.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 292 - (show annotations) (download) (as text)
Tue Jan 31 21:50:53 2006 UTC (14 years, 8 months ago) by johnm
File MIME type: text/x-diff
File size: 1875 byte(s)
Large update - thanks goes to Kerin Millar for the legwork.
1 From: Bob Picco <bob.picco@hp.com>
2 Date: Sat, 5 Nov 2005 16:25:54 +0000 (+0100)
3 Subject: [PATCH] x86_64: Fix sparse mem
4 X-Git-Tag: v2.6.15-rc2
5 X-Git-Url: http://www.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=d3ee871e63d0a0c70413dc0aa5534b8d6cd6ec37
6
7 [PATCH] x86_64: Fix sparse mem
8
9 Fix up booting with sparse mem enabled. Otherwise it would just
10 cause an early PANIC at boot.
11
12 Signed-off-by: Bob Picco <bob.picco@hp.com>
13 Signed-off-by: Andi Kleen <ak@suse.de>
14 Signed-off-by: Linus Torvalds <torvalds@osdl.org>
15 ---
16
17 --- a/arch/x86_64/kernel/setup.c
18 +++ b/arch/x86_64/kernel/setup.c
19 @@ -412,7 +412,6 @@ contig_initmem_init(unsigned long start_
20 {
21 unsigned long bootmap_size, bootmap;
22
23 - memory_present(0, start_pfn, end_pfn);
24 bootmap_size = bootmem_bootmap_pages(end_pfn)<<PAGE_SHIFT;
25 bootmap = find_e820_area(0, end_pfn<<PAGE_SHIFT, bootmap_size);
26 if (bootmap == -1L)
27 @@ -659,8 +658,6 @@ void __init setup_arch(char **cmdline_p)
28 }
29 #endif
30
31 - sparse_init();
32 -
33 paging_init();
34
35 check_ioapic();
36 --- a/arch/x86_64/mm/numa.c
37 +++ b/arch/x86_64/mm/numa.c
38 @@ -113,7 +113,6 @@ void __init setup_node_bootmem(int nodei
39 start_pfn = start >> PAGE_SHIFT;
40 end_pfn = end >> PAGE_SHIFT;
41
42 - memory_present(nodeid, start_pfn, end_pfn);
43 nodedata_phys = find_e820_area(start, end, pgdat_size);
44 if (nodedata_phys == -1L)
45 panic("Cannot find memory pgdat in node %d\n", nodeid);
46 @@ -285,9 +284,26 @@ unsigned long __init numa_free_all_bootm
47 return pages;
48 }
49
50 +#ifdef CONFIG_SPARSEMEM
51 +static void __init arch_sparse_init(void)
52 +{
53 + int i;
54 +
55 + for_each_online_node(i)
56 + memory_present(i, node_start_pfn(i), node_end_pfn(i));
57 +
58 + sparse_init();
59 +}
60 +#else
61 +#define arch_sparse_init() do {} while (0)
62 +#endif
63 +
64 void __init paging_init(void)
65 {
66 int i;
67 +
68 + arch_sparse_init();
69 +
70 for_each_online_node(i) {
71 setup_node_zones(i);
72 }

  ViewVC Help
Powered by ViewVC 1.1.20