Sophie

Sophie

distrib > Scientific%20Linux > 5x > x86_64 > by-pkgid > fc11cd6e1c513a17304da94a5390f3cd > files > 3933

kernel-2.6.18-194.11.1.el5.src.rpm

From: Prarit Bhargava <prarit@redhat.com>
Date: Fri, 21 Nov 2008 17:48:23 -0500
Subject: [x86] fix memory-less NUMA node booting
Message-id: 20081121224823.11531.86780.sendpatchset@prarit.bos.redhat.com
O-Subject: [RHEL5.3 PATCH] Fix memory-less NUMA node booting
Bugzilla: 471424
RH-Acked-by: Neil Horman <nhorman@redhat.com>
RH-Acked-by: Tomas Henzl <thenzl@redhat.com>

HP xw9400 panics when booting with one memory-less node.

acpi_get_node() simply maps a proximity domain to a node.  It does not check
to see if the domain is offline (has less than 4M of memory).  When
pci_acpi_scan_root() is called it is then possible for a bus to be assigned
to an offline node.

This patch checks to see if a node is online (ie, is not a memory-less node).

[This code also has the benefit of being in 2.6.27.  Although my git bisect
kept running into additional bugs that needed to be fixed so I finally gave
up on the bisect ... :/ ....]

Successfully tested by me on an xw9400 configured with one memory-less node,
and on an xw9400 with both nodes populated.

Resolves BZ 471424.

diff --git a/arch/i386/pci/acpi.c b/arch/i386/pci/acpi.c
index 42cddcf..84c1a3f 100644
--- a/arch/i386/pci/acpi.c
+++ b/arch/i386/pci/acpi.c
@@ -221,6 +221,8 @@ struct pci_bus * __devinit pci_acpi_scan_root(struct acpi_device *device, int do
 	if (pxm >= 0)
 		sd->node = pxm_to_node(pxm);
 #endif
+	if (sd->node != -1 && !node_online(sd->node))
+		sd->node = -1;
 
 	bus = pci_scan_bus_parented(NULL, busnum, &pci_root_ops, sd);
 	if (!bus)