[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-3.2-testing] x86: Fix Xen boot on 8-node AMD machines
# HG changeset patch # User Keir Fraser <keir.fraser@xxxxxxxxxx> # Date 1211537804 -3600 # Node ID b38e8c9f7a693e7dc1d6fcf63f11e616b5dec12c # Parent 8ef1af9923450de52a1b565cf2bed7eafcbb6fd5 x86: Fix Xen boot on 8-node AMD machines In xen/arch/x86/cpu/amd.c the function disable_c1_ramping iterates over the northbridges using NR_CPUS as an upper bound for the number of nodes. If there are no more northbridges found, it stops iterating. Sadly it just adds the northbridge number to 0x18 and uses this as a PCI device number, so probing the 9th northbridge on an 8 node system will be caught by the newly inserted assertion in pci_conf_read in current unstable. We fix this by first querying the number of nodes from the first northbridge to avoid the overflow. Signed-off-by: Andre Przywara <andre.przywara@xxxxxxx> Verified by Mark.Johnson@xxxxxxx xen-unstable changeset: 17712:5cc5b9c37c6d429502e75536822810219b23b033 xen-unstable date: Fri May 23 11:15:19 2008 +0100 --- xen/arch/x86/cpu/amd.c | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-) diff -r 8ef1af992345 -r b38e8c9f7a69 xen/arch/x86/cpu/amd.c --- a/xen/arch/x86/cpu/amd.c Fri May 23 11:10:09 2008 +0100 +++ b/xen/arch/x86/cpu/amd.c Fri May 23 11:16:44 2008 +0100 @@ -86,9 +86,11 @@ static void disable_c1_ramping(void) static void disable_c1_ramping(void) { u8 pmm7; - int node; - - for (node=0; node < NR_CPUS; node++) { + int node, nr_nodes; + + /* Read the number of nodes from the first Northbridge. */ + nr_nodes = ((pci_read_byte(0, 0x18, 0x0, 0x60)>>4)&0x07)+1; + for (node = 0; node < nr_nodes; node++) { /* PMM7: bus=0, dev=0x18+node, function=0x3, register=0x87. */ pmm7 = pci_read_byte(0, 0x18+node, 0x3, 0x87); /* Invalid read means we've updated every Northbridge. */ _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |