diff -r 0016f5a1dd5a xen/arch/x86/cpu/amd.c --- a/xen/arch/x86/cpu/amd.c Thu May 15 15:11:29 2008 +0100 +++ b/xen/arch/x86/cpu/amd.c Fri May 23 10:46:27 2008 +0200 @@ -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. */