diff -r 2e6a51378451 xen/arch/x86/cpu/amd.c --- a/xen/arch/x86/cpu/amd.c Thu May 22 15:11:06 2008 +0100 +++ b/xen/arch/x86/cpu/amd.c Fri May 23 10:42:31 2008 +0200 @@ -74,9 +74,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_conf_read32(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_conf_read8(0, 0x18+node, 0x3, 0x87); /* Invalid read means we've updated every Northbridge. */