/[linux-patches]/genpatches-2.6/trunk/2.6.14/1430_15.4_x86_64-pxm-boot-failure.patch
Gentoo

Contents of /genpatches-2.6/trunk/2.6.14/1430_15.4_x86_64-pxm-boot-failure.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 328 - (hide annotations) (download) (as text)
Tue Mar 14 13:34:17 2006 UTC (14 years, 8 months ago) by johnm
File MIME type: text/x-diff
File size: 1958 byte(s)
2.6.14-11, rebase against local tree
1 johnm 328 Re-diffed for 2.6.14.7 by Kerin Millar <kerframil@gmail.com>:
2    
3     From stable-bounces@linux.kernel.org Mon Feb 6 15:26:11 2006
4     Date: Tue, 07 Feb 2006 00:18:58 +0100
5     From: "Andi Kleen" <ak@suse.de>
6     To: stable@kernel.org
7     Cc:
8     Subject: [PATCH] x86_64: Clear more state when ignoring empty node in SRAT parsing
9    
10     Fix boot failures on systems with bad PXMs.
11    
12     Signed-off-by: Andi Kleen <ak@suse.de>
13     Signed-off-by: Chris Wright <chrisw@sous-sol.org>
14     ---
15    
16     --- linux-2.6.14.7.orig/arch/x86_64/mm/srat.c 2005-10-27 19:02:08.000000000 -0500
17     +++ linux-2.6.14.7/arch/x86_64/mm/srat.c 2006-02-08 00:07:01.000000000 -0500
18     @@ -25,6 +25,10 @@ static nodemask_t nodes_found __initdata
19     static struct node nodes[MAX_NUMNODES] __initdata;
20     static __u8 pxm2node[256] = { [0 ... 255] = 0xff };
21    
22     +/* Too small nodes confuse the VM badly. Usually they result
23     + from BIOS bugs. */
24     +#define NODE_MIN_SIZE (4*1024*1024)
25     +
26     static int node_to_pxm(int n);
27    
28     int pxm_to_node(int pxm)
29     @@ -172,22 +176,32 @@ acpi_numa_memory_affinity_init(struct ac
30     nd->start, nd->end);
31     }
32    
33     +static void unparse_node(int node)
34     +{
35     + int i;
36     + node_clear(node, nodes_parsed);
37     + for (i = 0; i < MAX_LOCAL_APIC; i++) {
38     + if (apicid_to_node[i] == node)
39     + apicid_to_node[i] = NUMA_NO_NODE;
40     + }
41     +}
42     +
43     void __init acpi_numa_arch_fixup(void) {}
44    
45     /* Use the information discovered above to actually set up the nodes. */
46     int __init acpi_scan_nodes(unsigned long start, unsigned long end)
47     {
48     int i;
49     - if (acpi_numa <= 0)
50     - return -1;
51    
52     - /* First clean up the node list */
53     - for_each_node_mask(i, nodes_parsed) {
54     + for (i = 0; i < MAX_NUMNODES; i++) {
55     cutoff_node(i, start, end);
56     - if (nodes[i].start == nodes[i].end)
57     - node_clear(i, nodes_parsed);
58     + if ((nodes[i].end - nodes[i].start) < NODE_MIN_SIZE)
59     + unparse_node(i);
60     }
61    
62     + if (acpi_numa <= 0)
63     + return -1;
64     +
65     memnode_shift = compute_hash_shift(nodes, nodes_weight(nodes_parsed));
66     if (memnode_shift < 0) {
67     printk(KERN_ERR

  ViewVC Help
Powered by ViewVC 1.1.20