diff options
| -rw-r--r-- | arch/x86/pci/acpi.c | 7 | ||||
| -rw-r--r-- | drivers/pci/ioapic.c | 13 | ||||
| -rw-r--r-- | drivers/pci/pci-acpi.c | 4 | ||||
| -rw-r--r-- | drivers/pci/pci-sysfs.c | 18 | ||||
| -rw-r--r-- | drivers/pci/pci.c | 2 | ||||
| -rw-r--r-- | drivers/pci/pcie/aspm.c | 13 | ||||
| -rw-r--r-- | include/uapi/linux/pci_regs.h | 2 |
7 files changed, 25 insertions, 34 deletions
diff --git a/arch/x86/pci/acpi.c b/arch/x86/pci/acpi.c index 3e724256dbee..d641897a1f4e 100644 --- a/arch/x86/pci/acpi.c +++ b/arch/x86/pci/acpi.c | |||
| @@ -324,14 +324,11 @@ setup_resource(struct acpi_resource *acpi_res, void *data) | |||
| 324 | res->start = start; | 324 | res->start = start; |
| 325 | res->end = end; | 325 | res->end = end; |
| 326 | info->res_offset[info->res_num] = addr.translation_offset; | 326 | info->res_offset[info->res_num] = addr.translation_offset; |
| 327 | info->res_num++; | ||
| 327 | 328 | ||
| 328 | if (!pci_use_crs) { | 329 | if (!pci_use_crs) |
| 329 | dev_printk(KERN_DEBUG, &info->bridge->dev, | 330 | dev_printk(KERN_DEBUG, &info->bridge->dev, |
| 330 | "host bridge window %pR (ignored)\n", res); | 331 | "host bridge window %pR (ignored)\n", res); |
| 331 | return AE_OK; | ||
| 332 | } | ||
| 333 | |||
| 334 | info->res_num++; | ||
| 335 | 332 | ||
| 336 | return AE_OK; | 333 | return AE_OK; |
| 337 | } | 334 | } |
diff --git a/drivers/pci/ioapic.c b/drivers/pci/ioapic.c index 3c6bbdd059a4..1b90579b233a 100644 --- a/drivers/pci/ioapic.c +++ b/drivers/pci/ioapic.c | |||
| @@ -113,17 +113,6 @@ static struct pci_driver ioapic_driver = { | |||
| 113 | .remove = ioapic_remove, | 113 | .remove = ioapic_remove, |
| 114 | }; | 114 | }; |
| 115 | 115 | ||
| 116 | static int __init ioapic_init(void) | 116 | module_pci_driver(ioapic_driver); |
| 117 | { | ||
| 118 | return pci_register_driver(&ioapic_driver); | ||
| 119 | } | ||
| 120 | |||
| 121 | static void __exit ioapic_exit(void) | ||
| 122 | { | ||
| 123 | pci_unregister_driver(&ioapic_driver); | ||
| 124 | } | ||
| 125 | |||
| 126 | module_init(ioapic_init); | ||
| 127 | module_exit(ioapic_exit); | ||
| 128 | 117 | ||
| 129 | MODULE_LICENSE("GPL"); | 118 | MODULE_LICENSE("GPL"); |
diff --git a/drivers/pci/pci-acpi.c b/drivers/pci/pci-acpi.c index e4b1fb2c0f5d..6c15d6a96935 100644 --- a/drivers/pci/pci-acpi.c +++ b/drivers/pci/pci-acpi.c | |||
| @@ -376,12 +376,12 @@ static int __init acpi_pci_init(void) | |||
| 376 | int ret; | 376 | int ret; |
| 377 | 377 | ||
| 378 | if (acpi_gbl_FADT.boot_flags & ACPI_FADT_NO_MSI) { | 378 | if (acpi_gbl_FADT.boot_flags & ACPI_FADT_NO_MSI) { |
| 379 | printk(KERN_INFO"ACPI FADT declares the system doesn't support MSI, so disable it\n"); | 379 | pr_info("ACPI FADT declares the system doesn't support MSI, so disable it\n"); |
| 380 | pci_no_msi(); | 380 | pci_no_msi(); |
| 381 | } | 381 | } |
| 382 | 382 | ||
| 383 | if (acpi_gbl_FADT.boot_flags & ACPI_FADT_NO_ASPM) { | 383 | if (acpi_gbl_FADT.boot_flags & ACPI_FADT_NO_ASPM) { |
| 384 | printk(KERN_INFO"ACPI FADT declares the system doesn't support PCIe ASPM, so disable it\n"); | 384 | pr_info("ACPI FADT declares the system doesn't support PCIe ASPM, so disable it\n"); |
| 385 | pcie_no_aspm(); | 385 | pcie_no_aspm(); |
| 386 | } | 386 | } |
| 387 | 387 | ||
diff --git a/drivers/pci/pci-sysfs.c b/drivers/pci/pci-sysfs.c index 5b4a9d9cd200..0b56e0865f38 100644 --- a/drivers/pci/pci-sysfs.c +++ b/drivers/pci/pci-sysfs.c | |||
| @@ -66,7 +66,7 @@ static ssize_t broken_parity_status_store(struct device *dev, | |||
| 66 | struct pci_dev *pdev = to_pci_dev(dev); | 66 | struct pci_dev *pdev = to_pci_dev(dev); |
| 67 | unsigned long val; | 67 | unsigned long val; |
| 68 | 68 | ||
| 69 | if (strict_strtoul(buf, 0, &val) < 0) | 69 | if (kstrtoul(buf, 0, &val) < 0) |
| 70 | return -EINVAL; | 70 | return -EINVAL; |
| 71 | 71 | ||
| 72 | pdev->broken_parity_status = !!val; | 72 | pdev->broken_parity_status = !!val; |
| @@ -188,7 +188,7 @@ static ssize_t is_enabled_store(struct device *dev, | |||
| 188 | { | 188 | { |
| 189 | struct pci_dev *pdev = to_pci_dev(dev); | 189 | struct pci_dev *pdev = to_pci_dev(dev); |
| 190 | unsigned long val; | 190 | unsigned long val; |
| 191 | ssize_t result = strict_strtoul(buf, 0, &val); | 191 | ssize_t result = kstrtoul(buf, 0, &val); |
| 192 | 192 | ||
| 193 | if (result < 0) | 193 | if (result < 0) |
| 194 | return result; | 194 | return result; |
| @@ -259,7 +259,7 @@ msi_bus_store(struct device *dev, struct device_attribute *attr, | |||
| 259 | struct pci_dev *pdev = to_pci_dev(dev); | 259 | struct pci_dev *pdev = to_pci_dev(dev); |
| 260 | unsigned long val; | 260 | unsigned long val; |
| 261 | 261 | ||
| 262 | if (strict_strtoul(buf, 0, &val) < 0) | 262 | if (kstrtoul(buf, 0, &val) < 0) |
| 263 | return -EINVAL; | 263 | return -EINVAL; |
| 264 | 264 | ||
| 265 | /* bad things may happen if the no_msi flag is changed | 265 | /* bad things may happen if the no_msi flag is changed |
| @@ -291,7 +291,7 @@ static ssize_t bus_rescan_store(struct bus_type *bus, const char *buf, | |||
| 291 | unsigned long val; | 291 | unsigned long val; |
| 292 | struct pci_bus *b = NULL; | 292 | struct pci_bus *b = NULL; |
| 293 | 293 | ||
| 294 | if (strict_strtoul(buf, 0, &val) < 0) | 294 | if (kstrtoul(buf, 0, &val) < 0) |
| 295 | return -EINVAL; | 295 | return -EINVAL; |
| 296 | 296 | ||
| 297 | if (val) { | 297 | if (val) { |
| @@ -315,7 +315,7 @@ dev_rescan_store(struct device *dev, struct device_attribute *attr, | |||
| 315 | unsigned long val; | 315 | unsigned long val; |
| 316 | struct pci_dev *pdev = to_pci_dev(dev); | 316 | struct pci_dev *pdev = to_pci_dev(dev); |
| 317 | 317 | ||
| 318 | if (strict_strtoul(buf, 0, &val) < 0) | 318 | if (kstrtoul(buf, 0, &val) < 0) |
| 319 | return -EINVAL; | 319 | return -EINVAL; |
| 320 | 320 | ||
| 321 | if (val) { | 321 | if (val) { |
| @@ -342,7 +342,7 @@ remove_store(struct device *dev, struct device_attribute *dummy, | |||
| 342 | int ret = 0; | 342 | int ret = 0; |
| 343 | unsigned long val; | 343 | unsigned long val; |
| 344 | 344 | ||
| 345 | if (strict_strtoul(buf, 0, &val) < 0) | 345 | if (kstrtoul(buf, 0, &val) < 0) |
| 346 | return -EINVAL; | 346 | return -EINVAL; |
| 347 | 347 | ||
| 348 | /* An attribute cannot be unregistered by one of its own methods, | 348 | /* An attribute cannot be unregistered by one of its own methods, |
| @@ -362,7 +362,7 @@ dev_bus_rescan_store(struct device *dev, struct device_attribute *attr, | |||
| 362 | unsigned long val; | 362 | unsigned long val; |
| 363 | struct pci_bus *bus = to_pci_bus(dev); | 363 | struct pci_bus *bus = to_pci_bus(dev); |
| 364 | 364 | ||
| 365 | if (strict_strtoul(buf, 0, &val) < 0) | 365 | if (kstrtoul(buf, 0, &val) < 0) |
| 366 | return -EINVAL; | 366 | return -EINVAL; |
| 367 | 367 | ||
| 368 | if (val) { | 368 | if (val) { |
| @@ -384,7 +384,7 @@ static ssize_t d3cold_allowed_store(struct device *dev, | |||
| 384 | struct pci_dev *pdev = to_pci_dev(dev); | 384 | struct pci_dev *pdev = to_pci_dev(dev); |
| 385 | unsigned long val; | 385 | unsigned long val; |
| 386 | 386 | ||
| 387 | if (strict_strtoul(buf, 0, &val) < 0) | 387 | if (kstrtoul(buf, 0, &val) < 0) |
| 388 | return -EINVAL; | 388 | return -EINVAL; |
| 389 | 389 | ||
| 390 | pdev->d3cold_allowed = !!val; | 390 | pdev->d3cold_allowed = !!val; |
| @@ -1236,7 +1236,7 @@ static ssize_t reset_store(struct device *dev, | |||
| 1236 | { | 1236 | { |
| 1237 | struct pci_dev *pdev = to_pci_dev(dev); | 1237 | struct pci_dev *pdev = to_pci_dev(dev); |
| 1238 | unsigned long val; | 1238 | unsigned long val; |
| 1239 | ssize_t result = strict_strtoul(buf, 0, &val); | 1239 | ssize_t result = kstrtoul(buf, 0, &val); |
| 1240 | 1240 | ||
| 1241 | if (result < 0) | 1241 | if (result < 0) |
| 1242 | return result; | 1242 | return result; |
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index a899d8bb190d..e5f4e55d407d 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c | |||
| @@ -2421,7 +2421,7 @@ bool pci_acs_path_enabled(struct pci_dev *start, | |||
| 2421 | /** | 2421 | /** |
| 2422 | * pci_swizzle_interrupt_pin - swizzle INTx for device behind bridge | 2422 | * pci_swizzle_interrupt_pin - swizzle INTx for device behind bridge |
| 2423 | * @dev: the PCI device | 2423 | * @dev: the PCI device |
| 2424 | * @pin: the INTx pin (1=INTA, 2=INTB, 3=INTD, 4=INTD) | 2424 | * @pin: the INTx pin (1=INTA, 2=INTB, 3=INTC, 4=INTD) |
| 2425 | * | 2425 | * |
| 2426 | * Perform INTx swizzling for a device behind one level of bridge. This is | 2426 | * Perform INTx swizzling for a device behind one level of bridge. This is |
| 2427 | * required by section 9.1 of the PCI-to-PCI bridge specification for devices | 2427 | * required by section 9.1 of the PCI-to-PCI bridge specification for devices |
diff --git a/drivers/pci/pcie/aspm.c b/drivers/pci/pcie/aspm.c index faa83b632a84..403a44374ed5 100644 --- a/drivers/pci/pcie/aspm.c +++ b/drivers/pci/pcie/aspm.c | |||
| @@ -714,10 +714,6 @@ void pcie_aspm_powersave_config_link(struct pci_dev *pdev) | |||
| 714 | up_read(&pci_bus_sem); | 714 | up_read(&pci_bus_sem); |
| 715 | } | 715 | } |
| 716 | 716 | ||
| 717 | /* | ||
| 718 | * pci_disable_link_state - disable pci device's link state, so the link will | ||
| 719 | * never enter specific states | ||
| 720 | */ | ||
| 721 | static void __pci_disable_link_state(struct pci_dev *pdev, int state, bool sem, | 717 | static void __pci_disable_link_state(struct pci_dev *pdev, int state, bool sem, |
| 722 | bool force) | 718 | bool force) |
| 723 | { | 719 | { |
| @@ -771,6 +767,15 @@ void pci_disable_link_state_locked(struct pci_dev *pdev, int state) | |||
| 771 | } | 767 | } |
| 772 | EXPORT_SYMBOL(pci_disable_link_state_locked); | 768 | EXPORT_SYMBOL(pci_disable_link_state_locked); |
| 773 | 769 | ||
| 770 | /** | ||
| 771 | * pci_disable_link_state - Disable device's link state, so the link will | ||
| 772 | * never enter specific states. Note that if the BIOS didn't grant ASPM | ||
| 773 | * control to the OS, this does nothing because we can't touch the LNKCTL | ||
| 774 | * register. | ||
| 775 | * | ||
| 776 | * @pdev: PCI device | ||
| 777 | * @state: ASPM link state to disable | ||
| 778 | */ | ||
| 774 | void pci_disable_link_state(struct pci_dev *pdev, int state) | 779 | void pci_disable_link_state(struct pci_dev *pdev, int state) |
| 775 | { | 780 | { |
| 776 | __pci_disable_link_state(pdev, state, true, false); | 781 | __pci_disable_link_state(pdev, state, true, false); |
diff --git a/include/uapi/linux/pci_regs.h b/include/uapi/linux/pci_regs.h index 864e324da80d..c3cc01d474b0 100644 --- a/include/uapi/linux/pci_regs.h +++ b/include/uapi/linux/pci_regs.h | |||
| @@ -468,7 +468,7 @@ | |||
| 468 | #define PCI_EXP_LNKCAP_ASPMS 0x00000c00 /* ASPM Support */ | 468 | #define PCI_EXP_LNKCAP_ASPMS 0x00000c00 /* ASPM Support */ |
| 469 | #define PCI_EXP_LNKCAP_L0SEL 0x00007000 /* L0s Exit Latency */ | 469 | #define PCI_EXP_LNKCAP_L0SEL 0x00007000 /* L0s Exit Latency */ |
| 470 | #define PCI_EXP_LNKCAP_L1EL 0x00038000 /* L1 Exit Latency */ | 470 | #define PCI_EXP_LNKCAP_L1EL 0x00038000 /* L1 Exit Latency */ |
| 471 | #define PCI_EXP_LNKCAP_CLKPM 0x00040000 /* L1 Clock Power Management */ | 471 | #define PCI_EXP_LNKCAP_CLKPM 0x00040000 /* Clock Power Management */ |
| 472 | #define PCI_EXP_LNKCAP_SDERC 0x00080000 /* Surprise Down Error Reporting Capable */ | 472 | #define PCI_EXP_LNKCAP_SDERC 0x00080000 /* Surprise Down Error Reporting Capable */ |
| 473 | #define PCI_EXP_LNKCAP_DLLLARC 0x00100000 /* Data Link Layer Link Active Reporting Capable */ | 473 | #define PCI_EXP_LNKCAP_DLLLARC 0x00100000 /* Data Link Layer Link Active Reporting Capable */ |
| 474 | #define PCI_EXP_LNKCAP_LBNC 0x00200000 /* Link Bandwidth Notification Capability */ | 474 | #define PCI_EXP_LNKCAP_LBNC 0x00200000 /* Link Bandwidth Notification Capability */ |
