aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-10-28 14:59:52 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2010-10-28 14:59:52 -0400
commite9f29c9a56ca06d0effa557823a737cbe7ec09f7 (patch)
treec331c4aa741a8f384ee13d0b08bd340c23164b16 /drivers/pci
parent800416f799e0723635ac2d720ad4449917a1481c (diff)
parent1af3c2e45e7a641e774bbb84fa428f2f0bf2d9c9 (diff)
Merge branch 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6
* 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6: (27 commits) x86: allocate space within a region top-down x86: update iomem_resource end based on CPU physical address capabilities x86/PCI: allocate space from the end of a region, not the beginning PCI: allocate bus resources from the top down resources: support allocating space within a region from the top down resources: handle overflow when aligning start of available area resources: ensure callback doesn't allocate outside available space resources: factor out resource_clip() to simplify find_resource() resources: add a default alignf to simplify find_resource() x86/PCI: MMCONFIG: fix region end calculation PCI: Add support for polling PME state on suspended legacy PCI devices PCI: Export some PCI PM functionality PCI: fix message typo PCI: log vendor/device ID always PCI: update Intel chipset names and defines PCI: use new ccflags variable in Makefile PCI: add PCI_MSIX_TABLE/PBA defines PCI: add PCI vendor id for STmicroelectronics x86/PCI: irq and pci_ids patch for Intel Patsburg DeviceIDs PCI: OLPC: Only enable PCI configuration type override on XO-1 ...
Diffstat (limited to 'drivers/pci')
-rw-r--r--drivers/pci/Makefile4
-rw-r--r--drivers/pci/bus.c53
-rw-r--r--drivers/pci/hotplug/ibmphp_hpc.c4
-rw-r--r--drivers/pci/msi.h4
-rw-r--r--drivers/pci/pci.c79
-rw-r--r--drivers/pci/pci.h3
-rw-r--r--drivers/pci/pcie/aer/aerdrv.c2
-rw-r--r--drivers/pci/pcie/aer/aerdrv.h3
-rw-r--r--drivers/pci/pcie/aer/aerdrv_acpi.c34
-rw-r--r--drivers/pci/pcie/aer/aerdrv_core.c2
-rw-r--r--drivers/pci/pcie/portdrv_acpi.c2
-rw-r--r--drivers/pci/probe.c4
-rw-r--r--drivers/pci/proc.c1
-rw-r--r--drivers/pci/quirks.c31
-rw-r--r--drivers/pci/setup-res.c2
15 files changed, 206 insertions, 22 deletions
diff --git a/drivers/pci/Makefile b/drivers/pci/Makefile
index dc1aa0922868..dcd7ace9221e 100644
--- a/drivers/pci/Makefile
+++ b/drivers/pci/Makefile
@@ -65,6 +65,4 @@ obj-$(CONFIG_PCI_SYSCALL) += syscall.o
65 65
66obj-$(CONFIG_PCI_STUB) += pci-stub.o 66obj-$(CONFIG_PCI_STUB) += pci-stub.o
67 67
68ifeq ($(CONFIG_PCI_DEBUG),y) 68ccflags-$(CONFIG_PCI_DEBUG) := -DDEBUG
69EXTRA_CFLAGS += -DDEBUG
70endif
diff --git a/drivers/pci/bus.c b/drivers/pci/bus.c
index 7f0af0e9b826..172bf26e0680 100644
--- a/drivers/pci/bus.c
+++ b/drivers/pci/bus.c
@@ -64,6 +64,49 @@ void pci_bus_remove_resources(struct pci_bus *bus)
64 } 64 }
65} 65}
66 66
67/*
68 * Find the highest-address bus resource below the cursor "res". If the
69 * cursor is NULL, return the highest resource.
70 */
71static struct resource *pci_bus_find_resource_prev(struct pci_bus *bus,
72 unsigned int type,
73 struct resource *res)
74{
75 struct resource *r, *prev = NULL;
76 int i;
77
78 pci_bus_for_each_resource(bus, r, i) {
79 if (!r)
80 continue;
81
82 if ((r->flags & IORESOURCE_TYPE_BITS) != type)
83 continue;
84
85 /* If this resource is at or past the cursor, skip it */
86 if (res) {
87 if (r == res)
88 continue;
89 if (r->end > res->end)
90 continue;
91 if (r->end == res->end && r->start > res->start)
92 continue;
93 }
94
95 if (!prev)
96 prev = r;
97
98 /*
99 * A small resource is higher than a large one that ends at
100 * the same address.
101 */
102 if (r->end > prev->end ||
103 (r->end == prev->end && r->start > prev->start))
104 prev = r;
105 }
106
107 return prev;
108}
109
67/** 110/**
68 * pci_bus_alloc_resource - allocate a resource from a parent bus 111 * pci_bus_alloc_resource - allocate a resource from a parent bus
69 * @bus: PCI bus 112 * @bus: PCI bus
@@ -89,9 +132,10 @@ pci_bus_alloc_resource(struct pci_bus *bus, struct resource *res,
89 resource_size_t), 132 resource_size_t),
90 void *alignf_data) 133 void *alignf_data)
91{ 134{
92 int i, ret = -ENOMEM; 135 int ret = -ENOMEM;
93 struct resource *r; 136 struct resource *r;
94 resource_size_t max = -1; 137 resource_size_t max = -1;
138 unsigned int type = res->flags & IORESOURCE_TYPE_BITS;
95 139
96 type_mask |= IORESOURCE_IO | IORESOURCE_MEM; 140 type_mask |= IORESOURCE_IO | IORESOURCE_MEM;
97 141
@@ -99,10 +143,9 @@ pci_bus_alloc_resource(struct pci_bus *bus, struct resource *res,
99 if (!(res->flags & IORESOURCE_MEM_64)) 143 if (!(res->flags & IORESOURCE_MEM_64))
100 max = PCIBIOS_MAX_MEM_32; 144 max = PCIBIOS_MAX_MEM_32;
101 145
102 pci_bus_for_each_resource(bus, r, i) { 146 /* Look for space at highest addresses first */
103 if (!r) 147 r = pci_bus_find_resource_prev(bus, type, NULL);
104 continue; 148 for ( ; r; r = pci_bus_find_resource_prev(bus, type, r)) {
105
106 /* type_mask must match */ 149 /* type_mask must match */
107 if ((res->flags ^ r->flags) & type_mask) 150 if ((res->flags ^ r->flags) & type_mask)
108 continue; 151 continue;
diff --git a/drivers/pci/hotplug/ibmphp_hpc.c b/drivers/pci/hotplug/ibmphp_hpc.c
index 1aaf3f32d3cd..f59ed30512b5 100644
--- a/drivers/pci/hotplug/ibmphp_hpc.c
+++ b/drivers/pci/hotplug/ibmphp_hpc.c
@@ -133,8 +133,8 @@ void __init ibmphp_hpc_initvars (void)
133 debug ("%s - Entry\n", __func__); 133 debug ("%s - Entry\n", __func__);
134 134
135 mutex_init(&sem_hpcaccess); 135 mutex_init(&sem_hpcaccess);
136 init_MUTEX (&semOperations); 136 sema_init(&semOperations, 1);
137 init_MUTEX_LOCKED (&sem_exit); 137 sema_init(&sem_exit, 0);
138 to_debug = 0; 138 to_debug = 0;
139 139
140 debug ("%s - Exit\n", __func__); 140 debug ("%s - Exit\n", __func__);
diff --git a/drivers/pci/msi.h b/drivers/pci/msi.h
index de27c1cb5a2b..feff3bee6fe5 100644
--- a/drivers/pci/msi.h
+++ b/drivers/pci/msi.h
@@ -22,8 +22,8 @@
22#define is_64bit_address(control) (!!(control & PCI_MSI_FLAGS_64BIT)) 22#define is_64bit_address(control) (!!(control & PCI_MSI_FLAGS_64BIT))
23#define is_mask_bit_support(control) (!!(control & PCI_MSI_FLAGS_MASKBIT)) 23#define is_mask_bit_support(control) (!!(control & PCI_MSI_FLAGS_MASKBIT))
24 24
25#define msix_table_offset_reg(base) (base + 0x04) 25#define msix_table_offset_reg(base) (base + PCI_MSIX_TABLE)
26#define msix_pba_offset_reg(base) (base + 0x08) 26#define msix_pba_offset_reg(base) (base + PCI_MSIX_PBA)
27#define msix_table_size(control) ((control & PCI_MSIX_FLAGS_QSIZE)+1) 27#define msix_table_size(control) ((control & PCI_MSIX_FLAGS_QSIZE)+1)
28#define multi_msix_capable(control) msix_table_size((control)) 28#define multi_msix_capable(control) msix_table_size((control))
29 29
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index 7fa3cbd742c5..e98c8104297b 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -38,6 +38,19 @@ EXPORT_SYMBOL(pci_pci_problems);
38 38
39unsigned int pci_pm_d3_delay; 39unsigned int pci_pm_d3_delay;
40 40
41static void pci_pme_list_scan(struct work_struct *work);
42
43static LIST_HEAD(pci_pme_list);
44static DEFINE_MUTEX(pci_pme_list_mutex);
45static DECLARE_DELAYED_WORK(pci_pme_work, pci_pme_list_scan);
46
47struct pci_pme_device {
48 struct list_head list;
49 struct pci_dev *dev;
50};
51
52#define PME_TIMEOUT 1000 /* How long between PME checks */
53
41static void pci_dev_d3_sleep(struct pci_dev *dev) 54static void pci_dev_d3_sleep(struct pci_dev *dev)
42{ 55{
43 unsigned int delay = dev->d3_delay; 56 unsigned int delay = dev->d3_delay;
@@ -1331,6 +1344,32 @@ bool pci_pme_capable(struct pci_dev *dev, pci_power_t state)
1331 return !!(dev->pme_support & (1 << state)); 1344 return !!(dev->pme_support & (1 << state));
1332} 1345}
1333 1346
1347static void pci_pme_list_scan(struct work_struct *work)
1348{
1349 struct pci_pme_device *pme_dev;
1350
1351 mutex_lock(&pci_pme_list_mutex);
1352 if (!list_empty(&pci_pme_list)) {
1353 list_for_each_entry(pme_dev, &pci_pme_list, list)
1354 pci_pme_wakeup(pme_dev->dev, NULL);
1355 schedule_delayed_work(&pci_pme_work, msecs_to_jiffies(PME_TIMEOUT));
1356 }
1357 mutex_unlock(&pci_pme_list_mutex);
1358}
1359
1360/**
1361 * pci_external_pme - is a device an external PCI PME source?
1362 * @dev: PCI device to check
1363 *
1364 */
1365
1366static bool pci_external_pme(struct pci_dev *dev)
1367{
1368 if (pci_is_pcie(dev) || dev->bus->number == 0)
1369 return false;
1370 return true;
1371}
1372
1334/** 1373/**
1335 * pci_pme_active - enable or disable PCI device's PME# function 1374 * pci_pme_active - enable or disable PCI device's PME# function
1336 * @dev: PCI device to handle. 1375 * @dev: PCI device to handle.
@@ -1354,6 +1393,44 @@ void pci_pme_active(struct pci_dev *dev, bool enable)
1354 1393
1355 pci_write_config_word(dev, dev->pm_cap + PCI_PM_CTRL, pmcsr); 1394 pci_write_config_word(dev, dev->pm_cap + PCI_PM_CTRL, pmcsr);
1356 1395
1396 /* PCI (as opposed to PCIe) PME requires that the device have
1397 its PME# line hooked up correctly. Not all hardware vendors
1398 do this, so the PME never gets delivered and the device
1399 remains asleep. The easiest way around this is to
1400 periodically walk the list of suspended devices and check
1401 whether any have their PME flag set. The assumption is that
1402 we'll wake up often enough anyway that this won't be a huge
1403 hit, and the power savings from the devices will still be a
1404 win. */
1405
1406 if (pci_external_pme(dev)) {
1407 struct pci_pme_device *pme_dev;
1408 if (enable) {
1409 pme_dev = kmalloc(sizeof(struct pci_pme_device),
1410 GFP_KERNEL);
1411 if (!pme_dev)
1412 goto out;
1413 pme_dev->dev = dev;
1414 mutex_lock(&pci_pme_list_mutex);
1415 list_add(&pme_dev->list, &pci_pme_list);
1416 if (list_is_singular(&pci_pme_list))
1417 schedule_delayed_work(&pci_pme_work,
1418 msecs_to_jiffies(PME_TIMEOUT));
1419 mutex_unlock(&pci_pme_list_mutex);
1420 } else {
1421 mutex_lock(&pci_pme_list_mutex);
1422 list_for_each_entry(pme_dev, &pci_pme_list, list) {
1423 if (pme_dev->dev == dev) {
1424 list_del(&pme_dev->list);
1425 kfree(pme_dev);
1426 break;
1427 }
1428 }
1429 mutex_unlock(&pci_pme_list_mutex);
1430 }
1431 }
1432
1433out:
1357 dev_printk(KERN_DEBUG, &dev->dev, "PME# %s\n", 1434 dev_printk(KERN_DEBUG, &dev->dev, "PME# %s\n",
1358 enable ? "enabled" : "disabled"); 1435 enable ? "enabled" : "disabled");
1359} 1436}
@@ -2689,7 +2766,7 @@ int pcie_get_readrq(struct pci_dev *dev)
2689 2766
2690 ret = pci_read_config_word(dev, cap + PCI_EXP_DEVCTL, &ctl); 2767 ret = pci_read_config_word(dev, cap + PCI_EXP_DEVCTL, &ctl);
2691 if (!ret) 2768 if (!ret)
2692 ret = 128 << ((ctl & PCI_EXP_DEVCTL_READRQ) >> 12); 2769 ret = 128 << ((ctl & PCI_EXP_DEVCTL_READRQ) >> 12);
2693 2770
2694 return ret; 2771 return ret;
2695} 2772}
diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h
index 6beb11b617a9..f5c7c382765f 100644
--- a/drivers/pci/pci.h
+++ b/drivers/pci/pci.h
@@ -63,11 +63,8 @@ struct pci_platform_pm_ops {
63extern int pci_set_platform_pm(struct pci_platform_pm_ops *ops); 63extern int pci_set_platform_pm(struct pci_platform_pm_ops *ops);
64extern void pci_update_current_state(struct pci_dev *dev, pci_power_t state); 64extern void pci_update_current_state(struct pci_dev *dev, pci_power_t state);
65extern void pci_disable_enabled_device(struct pci_dev *dev); 65extern void pci_disable_enabled_device(struct pci_dev *dev);
66extern bool pci_check_pme_status(struct pci_dev *dev);
67extern int pci_finish_runtime_suspend(struct pci_dev *dev); 66extern int pci_finish_runtime_suspend(struct pci_dev *dev);
68extern void pci_wakeup_event(struct pci_dev *dev);
69extern int __pci_pme_wakeup(struct pci_dev *dev, void *ign); 67extern int __pci_pme_wakeup(struct pci_dev *dev, void *ign);
70extern void pci_pme_wakeup_bus(struct pci_bus *bus);
71extern void pci_pm_init(struct pci_dev *dev); 68extern void pci_pm_init(struct pci_dev *dev);
72extern void platform_pci_wakeup_init(struct pci_dev *dev); 69extern void platform_pci_wakeup_init(struct pci_dev *dev);
73extern void pci_allocate_cap_save_buffers(struct pci_dev *dev); 70extern void pci_allocate_cap_save_buffers(struct pci_dev *dev);
diff --git a/drivers/pci/pcie/aer/aerdrv.c b/drivers/pci/pcie/aer/aerdrv.c
index f409948e1a9b..2b2b6508efde 100644
--- a/drivers/pci/pcie/aer/aerdrv.c
+++ b/drivers/pci/pcie/aer/aerdrv.c
@@ -416,7 +416,7 @@ static void aer_error_resume(struct pci_dev *dev)
416 */ 416 */
417static int __init aer_service_init(void) 417static int __init aer_service_init(void)
418{ 418{
419 if (!pci_aer_available()) 419 if (!pci_aer_available() || aer_acpi_firmware_first())
420 return -ENXIO; 420 return -ENXIO;
421 return pcie_port_service_register(&aerdriver); 421 return pcie_port_service_register(&aerdriver);
422} 422}
diff --git a/drivers/pci/pcie/aer/aerdrv.h b/drivers/pci/pcie/aer/aerdrv.h
index 80c11d131499..9656e3060412 100644
--- a/drivers/pci/pcie/aer/aerdrv.h
+++ b/drivers/pci/pcie/aer/aerdrv.h
@@ -132,6 +132,7 @@ static inline int aer_osc_setup(struct pcie_device *pciedev)
132 132
133#ifdef CONFIG_ACPI_APEI 133#ifdef CONFIG_ACPI_APEI
134extern int pcie_aer_get_firmware_first(struct pci_dev *pci_dev); 134extern int pcie_aer_get_firmware_first(struct pci_dev *pci_dev);
135extern bool aer_acpi_firmware_first(void);
135#else 136#else
136static inline int pcie_aer_get_firmware_first(struct pci_dev *pci_dev) 137static inline int pcie_aer_get_firmware_first(struct pci_dev *pci_dev)
137{ 138{
@@ -139,6 +140,8 @@ static inline int pcie_aer_get_firmware_first(struct pci_dev *pci_dev)
139 return pci_dev->__aer_firmware_first; 140 return pci_dev->__aer_firmware_first;
140 return 0; 141 return 0;
141} 142}
143
144static inline bool aer_acpi_firmware_first(void) { return false; }
142#endif 145#endif
143 146
144static inline void pcie_aer_force_firmware_first(struct pci_dev *pci_dev, 147static inline void pcie_aer_force_firmware_first(struct pci_dev *pci_dev,
diff --git a/drivers/pci/pcie/aer/aerdrv_acpi.c b/drivers/pci/pcie/aer/aerdrv_acpi.c
index 2bb9b8972211..275bf158ffa7 100644
--- a/drivers/pci/pcie/aer/aerdrv_acpi.c
+++ b/drivers/pci/pcie/aer/aerdrv_acpi.c
@@ -93,4 +93,38 @@ int pcie_aer_get_firmware_first(struct pci_dev *dev)
93 aer_set_firmware_first(dev); 93 aer_set_firmware_first(dev);
94 return dev->__aer_firmware_first; 94 return dev->__aer_firmware_first;
95} 95}
96
97static bool aer_firmware_first;
98
99static int aer_hest_parse_aff(struct acpi_hest_header *hest_hdr, void *data)
100{
101 struct acpi_hest_aer_common *p;
102
103 if (aer_firmware_first)
104 return 0;
105
106 switch (hest_hdr->type) {
107 case ACPI_HEST_TYPE_AER_ROOT_PORT:
108 case ACPI_HEST_TYPE_AER_ENDPOINT:
109 case ACPI_HEST_TYPE_AER_BRIDGE:
110 p = (struct acpi_hest_aer_common *)(hest_hdr + 1);
111 aer_firmware_first = !!(p->flags & ACPI_HEST_FIRMWARE_FIRST);
112 default:
113 return 0;
114 }
115}
116
117/**
118 * aer_acpi_firmware_first - Check if APEI should control AER.
119 */
120bool aer_acpi_firmware_first(void)
121{
122 static bool parsed = false;
123
124 if (!parsed) {
125 apei_hest_parse(aer_hest_parse_aff, NULL);
126 parsed = true;
127 }
128 return aer_firmware_first;
129}
96#endif 130#endif
diff --git a/drivers/pci/pcie/aer/aerdrv_core.c b/drivers/pci/pcie/aer/aerdrv_core.c
index 29e268fadf14..43421fbe080a 100644
--- a/drivers/pci/pcie/aer/aerdrv_core.c
+++ b/drivers/pci/pcie/aer/aerdrv_core.c
@@ -754,7 +754,7 @@ void aer_isr(struct work_struct *work)
754{ 754{
755 struct aer_rpc *rpc = container_of(work, struct aer_rpc, dpc_handler); 755 struct aer_rpc *rpc = container_of(work, struct aer_rpc, dpc_handler);
756 struct pcie_device *p_device = rpc->rpd; 756 struct pcie_device *p_device = rpc->rpd;
757 struct aer_err_source e_src; 757 struct aer_err_source uninitialized_var(e_src);
758 758
759 mutex_lock(&rpc->rpc_mutex); 759 mutex_lock(&rpc->rpc_mutex);
760 while (get_e_source(rpc, &e_src)) 760 while (get_e_source(rpc, &e_src))
diff --git a/drivers/pci/pcie/portdrv_acpi.c b/drivers/pci/pcie/portdrv_acpi.c
index b7c4cb1ccb23..5982b6a63b89 100644
--- a/drivers/pci/pcie/portdrv_acpi.c
+++ b/drivers/pci/pcie/portdrv_acpi.c
@@ -49,7 +49,7 @@ int pcie_port_acpi_setup(struct pci_dev *port, int *srv_mask)
49 | OSC_PCI_EXPRESS_PME_CONTROL; 49 | OSC_PCI_EXPRESS_PME_CONTROL;
50 50
51 if (pci_aer_available()) { 51 if (pci_aer_available()) {
52 if (pcie_aer_get_firmware_first(port)) 52 if (aer_acpi_firmware_first())
53 dev_dbg(&port->dev, "PCIe errors handled by BIOS.\n"); 53 dev_dbg(&port->dev, "PCIe errors handled by BIOS.\n");
54 else 54 else
55 flags |= OSC_PCI_EXPRESS_AER_CONTROL; 55 flags |= OSC_PCI_EXPRESS_AER_CONTROL;
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
index 12625d90f8b5..c84900da3c59 100644
--- a/drivers/pci/probe.c
+++ b/drivers/pci/probe.c
@@ -961,8 +961,8 @@ int pci_setup_device(struct pci_dev *dev)
961 dev->class = class; 961 dev->class = class;
962 class >>= 8; 962 class >>= 8;
963 963
964 dev_dbg(&dev->dev, "found [%04x:%04x] class %06x header type %02x\n", 964 dev_printk(KERN_DEBUG, &dev->dev, "[%04x:%04x] type %d class %#08x\n",
965 dev->vendor, dev->device, class, dev->hdr_type); 965 dev->vendor, dev->device, dev->hdr_type, class);
966 966
967 /* need to have dev->class ready */ 967 /* need to have dev->class ready */
968 dev->cfg_size = pci_cfg_space_size(dev); 968 dev->cfg_size = pci_cfg_space_size(dev);
diff --git a/drivers/pci/proc.c b/drivers/pci/proc.c
index 895136f13edc..297b72c880a1 100644
--- a/drivers/pci/proc.c
+++ b/drivers/pci/proc.c
@@ -303,6 +303,7 @@ static const struct file_operations proc_bus_pci_operations = {
303 .read = proc_bus_pci_read, 303 .read = proc_bus_pci_read,
304 .write = proc_bus_pci_write, 304 .write = proc_bus_pci_write,
305 .unlocked_ioctl = proc_bus_pci_ioctl, 305 .unlocked_ioctl = proc_bus_pci_ioctl,
306 .compat_ioctl = proc_bus_pci_ioctl,
306#ifdef HAVE_PCI_MMAP 307#ifdef HAVE_PCI_MMAP
307 .open = proc_bus_pci_open, 308 .open = proc_bus_pci_open,
308 .release = proc_bus_pci_release, 309 .release = proc_bus_pci_release,
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
index cc96c7142dac..f5c63fe9db5c 100644
--- a/drivers/pci/quirks.c
+++ b/drivers/pci/quirks.c
@@ -2297,6 +2297,37 @@ DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_NVIDIA,
2297 PCI_DEVICE_ID_NVIDIA_NVENET_15, 2297 PCI_DEVICE_ID_NVIDIA_NVENET_15,
2298 nvenet_msi_disable); 2298 nvenet_msi_disable);
2299 2299
2300/*
2301 * Some versions of the MCP55 bridge from nvidia have a legacy irq routing
2302 * config register. This register controls the routing of legacy interrupts
2303 * from devices that route through the MCP55. If this register is misprogramed
2304 * interrupts are only sent to the bsp, unlike conventional systems where the
2305 * irq is broadxast to all online cpus. Not having this register set
2306 * properly prevents kdump from booting up properly, so lets make sure that
2307 * we have it set correctly.
2308 * Note this is an undocumented register.
2309 */
2310static void __devinit nvbridge_check_legacy_irq_routing(struct pci_dev *dev)
2311{
2312 u32 cfg;
2313
2314 pci_read_config_dword(dev, 0x74, &cfg);
2315
2316 if (cfg & ((1 << 2) | (1 << 15))) {
2317 printk(KERN_INFO "Rewriting irq routing register on MCP55\n");
2318 cfg &= ~((1 << 2) | (1 << 15));
2319 pci_write_config_dword(dev, 0x74, cfg);
2320 }
2321}
2322
2323DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_NVIDIA,
2324 PCI_DEVICE_ID_NVIDIA_MCP55_BRIDGE_V0,
2325 nvbridge_check_legacy_irq_routing);
2326
2327DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_NVIDIA,
2328 PCI_DEVICE_ID_NVIDIA_MCP55_BRIDGE_V4,
2329 nvbridge_check_legacy_irq_routing);
2330
2300static int __devinit ht_check_msi_mapping(struct pci_dev *dev) 2331static int __devinit ht_check_msi_mapping(struct pci_dev *dev)
2301{ 2332{
2302 int pos, ttl = 48; 2333 int pos, ttl = 48;
diff --git a/drivers/pci/setup-res.c b/drivers/pci/setup-res.c
index 2aaa13150de3..bc0e6eea0fff 100644
--- a/drivers/pci/setup-res.c
+++ b/drivers/pci/setup-res.c
@@ -85,7 +85,7 @@ void pci_update_resource(struct pci_dev *dev, int resno)
85 } 85 }
86 } 86 }
87 res->flags &= ~IORESOURCE_UNSET; 87 res->flags &= ~IORESOURCE_UNSET;
88 dev_info(&dev->dev, "BAR %d: set to %pR (PCI address [%#llx-%#llx]\n", 88 dev_info(&dev->dev, "BAR %d: set to %pR (PCI address [%#llx-%#llx])\n",
89 resno, res, (unsigned long long)region.start, 89 resno, res, (unsigned long long)region.start,
90 (unsigned long long)region.end); 90 (unsigned long long)region.end);
91} 91}