aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86_64
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86_64')
-rw-r--r--arch/x86_64/kernel/pci-calgary.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/arch/x86_64/kernel/pci-calgary.c b/arch/x86_64/kernel/pci-calgary.c
index e71ed53b08fb..92744abff133 100644
--- a/arch/x86_64/kernel/pci-calgary.c
+++ b/arch/x86_64/kernel/pci-calgary.c
@@ -812,7 +812,7 @@ static int __init calgary_init(void)
812 int i, ret = -ENODEV; 812 int i, ret = -ENODEV;
813 struct pci_dev *dev = NULL; 813 struct pci_dev *dev = NULL;
814 814
815 for (i = 0; i <= num_online_nodes() * MAX_NUM_OF_PHBS; i++) { 815 for (i = 0; i < num_online_nodes() * MAX_NUM_OF_PHBS; i++) {
816 dev = pci_get_device(PCI_VENDOR_ID_IBM, 816 dev = pci_get_device(PCI_VENDOR_ID_IBM,
817 PCI_DEVICE_ID_IBM_CALGARY, 817 PCI_DEVICE_ID_IBM_CALGARY,
818 dev); 818 dev);
@@ -890,9 +890,8 @@ void __init detect_calgary(void)
890 specified_table_size = determine_tce_table_size(end_pfn * PAGE_SIZE); 890 specified_table_size = determine_tce_table_size(end_pfn * PAGE_SIZE);
891 891
892 for (bus = 0, table_idx = 0; 892 for (bus = 0, table_idx = 0;
893 bus <= num_online_nodes() * MAX_PHB_BUS_NUM; 893 bus < num_online_nodes() * MAX_PHB_BUS_NUM;
894 bus++) { 894 bus++) {
895 BUG_ON(bus > MAX_NUMNODES * MAX_PHB_BUS_NUM);
896 if (read_pci_config(bus, 0, 0, 0) != PCI_VENDOR_DEVICE_ID_CALGARY) 895 if (read_pci_config(bus, 0, 0, 0) != PCI_VENDOR_DEVICE_ID_CALGARY)
897 continue; 896 continue;
898 if (test_bit(bus, translation_disabled)) { 897 if (test_bit(bus, translation_disabled)) {
@@ -1002,7 +1001,7 @@ static int __init calgary_parse_options(char *p)
1002 if (p == endp) 1001 if (p == endp)
1003 break; 1002 break;
1004 1003
1005 if (bridge <= (num_online_nodes() * MAX_PHB_BUS_NUM)) { 1004 if (bridge < (num_online_nodes() * MAX_PHB_BUS_NUM)) {
1006 printk(KERN_INFO "Calgary: disabling " 1005 printk(KERN_INFO "Calgary: disabling "
1007 "translation for PHB 0x%x\n", bridge); 1006 "translation for PHB 0x%x\n", bridge);
1008 set_bit(bridge, translation_disabled); 1007 set_bit(bridge, translation_disabled);