diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-11-14 00:02:00 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-11-14 00:02:00 -0500 |
commit | 2f466d33f5f60542d3d82c0477de5863b22c94b9 (patch) | |
tree | 839972958941d55852a9af270b04af09e3147116 /arch | |
parent | f9300eaaac1ca300083ad41937923a90cc3a2394 (diff) | |
parent | eaaeb1cb33310dea6c3fa45d8bfc63e5a1d0a846 (diff) |
Merge tag 'pci-v3.13-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci
Pull PCI changes from Bjorn Helgaas:
"Resource management
- Fix host bridge window coalescing (Alexey Neyman)
- Pass type, width, and prefetchability for window alignment (Wei Yang)
PCI device hotplug
- Convert acpiphp, acpiphp_ibm to dynamic debug (Lan Tianyu)
Power management
- Remove pci_pm_complete() (Liu Chuansheng)
MSI
- Fail initialization if device is not in PCI_D0 (Yijing Wang)
MPS (Max Payload Size)
- Use pcie_get_mps() and pcie_set_mps() to simplify code (Yijing Wang)
- Use pcie_set_readrq() to simplify code (Yijing Wang)
- Use cached pci_dev->pcie_mpss to simplify code (Yijing Wang)
SR-IOV
- Enable upstream bridges even for VFs on virtual buses (Bjorn Helgaas)
- Use pci_is_root_bus() to avoid catching virtual buses (Wei Yang)
Virtualization
- Add x86 MSI masking ops (Konrad Rzeszutek Wilk)
Freescale i.MX6
- Support i.MX6 PCIe controller (Sean Cross)
- Increase link startup timeout (Marek Vasut)
- Probe PCIe in fs_initcall() (Marek Vasut)
- Fix imprecise abort handler (Tim Harvey)
- Remove redundant of_match_ptr (Sachin Kamat)
Renesas R-Car
- Support Gen2 internal PCIe controller (Valentine Barshak)
Samsung Exynos
- Add MSI support (Jingoo Han)
- Turn off power when link fails (Jingoo Han)
- Add Jingoo Han as maintainer (Jingoo Han)
- Add clk_disable_unprepare() on error path (Wei Yongjun)
- Remove redundant of_match_ptr (Sachin Kamat)
Synopsys DesignWare
- Add irq_create_mapping() (Pratyush Anand)
- Add header guards (Seungwon Jeon)
Miscellaneous
- Enable native PCIe services by default on non-ACPI (Andrew Murray)
- Cleanup _OSC usage and messages (Bjorn Helgaas)
- Remove pcibios_last_bus boot option on non-x86 (Bjorn Helgaas)
- Convert bus code to use bus_, drv_, and dev_groups (Greg Kroah-Hartman)
- Remove unused pci_mem_start (Myron Stowe)
- Make sysfs functions static (Sachin Kamat)
- Warn on invalid return from driver probe (Stephen M. Cameron)
- Remove Intel Haswell D3 delays (Todd E Brandt)
- Call pci_set_master() in core if driver doesn't do it (Yinghai Lu)
- Use pci_is_pcie() to simplify code (Yijing Wang)
- Use PCIe capability accessors to simplify code (Yijing Wang)
- Use cached pci_dev->pcie_cap to simplify code (Yijing Wang)
- Removed unused "is_pcie" from struct pci_dev (Yijing Wang)
- Simplify sysfs CPU affinity implementation (Yijing Wang)"
* tag 'pci-v3.13-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: (79 commits)
PCI: Enable upstream bridges even for VFs on virtual buses
PCI: Add pci_upstream_bridge()
PCI: Add x86_msi.msi_mask_irq() and msix_mask_irq()
PCI: Warn on driver probe return value greater than zero
PCI: Drop warning about drivers that don't use pci_set_master()
PCI: Workaround missing pci_set_master in pci drivers
powerpc/pci: Use pci_is_pcie() to simplify code [fix]
PCI: Update pcie_ports 'auto' behavior for non-ACPI platforms
PCI: imx6: Probe the PCIe in fs_initcall()
PCI: Add R-Car Gen2 internal PCI support
PCI: imx6: Remove redundant of_match_ptr
PCI: Report pci_pme_active() kmalloc failure
mn10300/PCI: Remove useless pcibios_last_bus
frv/PCI: Remove pcibios_last_bus
PCI: imx6: Increase link startup timeout
PCI: exynos: Remove redundant of_match_ptr
PCI: imx6: Fix imprecise abort handler
PCI: Fail MSI/MSI-X initialization if device is not in PCI_D0
PCI: imx6: Remove redundant dev_err() in imx6_pcie_probe()
x86/PCI: Coalesce multiple overlapping host bridge windows
...
Diffstat (limited to 'arch')
-rw-r--r-- | arch/cris/include/asm/pci.h | 1 | ||||
-rw-r--r-- | arch/frv/mb93090-mb00/pci-frv.h | 1 | ||||
-rw-r--r-- | arch/frv/mb93090-mb00/pci-vdk.c | 36 | ||||
-rw-r--r-- | arch/mn10300/include/asm/pci.h | 1 | ||||
-rw-r--r-- | arch/mn10300/kernel/setup.c | 3 | ||||
-rw-r--r-- | arch/mn10300/unit-asb2305/pci-asb2305.h | 1 | ||||
-rw-r--r-- | arch/mn10300/unit-asb2305/pci.c | 5 | ||||
-rw-r--r-- | arch/powerpc/kernel/eeh.c | 5 | ||||
-rw-r--r-- | arch/powerpc/sysdev/fsl_pci.c | 2 | ||||
-rw-r--r-- | arch/tile/kernel/pci.c | 7 | ||||
-rw-r--r-- | arch/x86/include/asm/x86_init.h | 3 | ||||
-rw-r--r-- | arch/x86/kernel/x86_init.c | 10 | ||||
-rw-r--r-- | arch/x86/pci/acpi.c | 8 | ||||
-rw-r--r-- | arch/x86/pci/fixup.c | 18 | ||||
-rw-r--r-- | arch/x86/pci/xen.c | 13 |
15 files changed, 44 insertions, 70 deletions
diff --git a/arch/cris/include/asm/pci.h b/arch/cris/include/asm/pci.h index 146da904cdd8..f666734926d5 100644 --- a/arch/cris/include/asm/pci.h +++ b/arch/cris/include/asm/pci.h | |||
@@ -11,7 +11,6 @@ | |||
11 | 11 | ||
12 | #define pcibios_assign_all_busses(void) 1 | 12 | #define pcibios_assign_all_busses(void) 1 |
13 | 13 | ||
14 | extern unsigned long pci_mem_start; | ||
15 | #define PCIBIOS_MIN_IO 0x1000 | 14 | #define PCIBIOS_MIN_IO 0x1000 |
16 | #define PCIBIOS_MIN_MEM 0x10000000 | 15 | #define PCIBIOS_MIN_MEM 0x10000000 |
17 | 16 | ||
diff --git a/arch/frv/mb93090-mb00/pci-frv.h b/arch/frv/mb93090-mb00/pci-frv.h index 76c4e73d643d..a7e487fe76ed 100644 --- a/arch/frv/mb93090-mb00/pci-frv.h +++ b/arch/frv/mb93090-mb00/pci-frv.h | |||
@@ -30,7 +30,6 @@ void pcibios_resource_survey(void); | |||
30 | 30 | ||
31 | /* pci-vdk.c */ | 31 | /* pci-vdk.c */ |
32 | 32 | ||
33 | extern int __nongpreldata pcibios_last_bus; | ||
34 | extern struct pci_ops *__nongpreldata pci_root_ops; | 33 | extern struct pci_ops *__nongpreldata pci_root_ops; |
35 | 34 | ||
36 | /* pci-irq.c */ | 35 | /* pci-irq.c */ |
diff --git a/arch/frv/mb93090-mb00/pci-vdk.c b/arch/frv/mb93090-mb00/pci-vdk.c index deb67843693c..efa5d65b0007 100644 --- a/arch/frv/mb93090-mb00/pci-vdk.c +++ b/arch/frv/mb93090-mb00/pci-vdk.c | |||
@@ -25,7 +25,6 @@ | |||
25 | 25 | ||
26 | unsigned int __nongpreldata pci_probe = 1; | 26 | unsigned int __nongpreldata pci_probe = 1; |
27 | 27 | ||
28 | int __nongpreldata pcibios_last_bus = -1; | ||
29 | struct pci_ops *__nongpreldata pci_root_ops; | 28 | struct pci_ops *__nongpreldata pci_root_ops; |
30 | 29 | ||
31 | /* | 30 | /* |
@@ -220,37 +219,6 @@ static struct pci_ops * __init pci_check_direct(void) | |||
220 | } | 219 | } |
221 | 220 | ||
222 | /* | 221 | /* |
223 | * Discover remaining PCI buses in case there are peer host bridges. | ||
224 | * We use the number of last PCI bus provided by the PCI BIOS. | ||
225 | */ | ||
226 | static void __init pcibios_fixup_peer_bridges(void) | ||
227 | { | ||
228 | struct pci_bus bus; | ||
229 | struct pci_dev dev; | ||
230 | int n; | ||
231 | u16 l; | ||
232 | |||
233 | if (pcibios_last_bus <= 0 || pcibios_last_bus >= 0xff) | ||
234 | return; | ||
235 | printk("PCI: Peer bridge fixup\n"); | ||
236 | for (n=0; n <= pcibios_last_bus; n++) { | ||
237 | if (pci_find_bus(0, n)) | ||
238 | continue; | ||
239 | bus.number = n; | ||
240 | bus.ops = pci_root_ops; | ||
241 | dev.bus = &bus; | ||
242 | for(dev.devfn=0; dev.devfn<256; dev.devfn += 8) | ||
243 | if (!pci_read_config_word(&dev, PCI_VENDOR_ID, &l) && | ||
244 | l != 0x0000 && l != 0xffff) { | ||
245 | printk("Found device at %02x:%02x [%04x]\n", n, dev.devfn, l); | ||
246 | printk("PCI: Discovered peer bus %02x\n", n); | ||
247 | pci_scan_bus(n, pci_root_ops, NULL); | ||
248 | break; | ||
249 | } | ||
250 | } | ||
251 | } | ||
252 | |||
253 | /* | ||
254 | * Exceptions for specific devices. Usually work-arounds for fatal design flaws. | 222 | * Exceptions for specific devices. Usually work-arounds for fatal design flaws. |
255 | */ | 223 | */ |
256 | 224 | ||
@@ -418,7 +386,6 @@ int __init pcibios_init(void) | |||
418 | pci_scan_root_bus(NULL, 0, pci_root_ops, NULL, &resources); | 386 | pci_scan_root_bus(NULL, 0, pci_root_ops, NULL, &resources); |
419 | 387 | ||
420 | pcibios_irq_init(); | 388 | pcibios_irq_init(); |
421 | pcibios_fixup_peer_bridges(); | ||
422 | pcibios_fixup_irqs(); | 389 | pcibios_fixup_irqs(); |
423 | pcibios_resource_survey(); | 390 | pcibios_resource_survey(); |
424 | 391 | ||
@@ -432,9 +399,6 @@ char * __init pcibios_setup(char *str) | |||
432 | if (!strcmp(str, "off")) { | 399 | if (!strcmp(str, "off")) { |
433 | pci_probe = 0; | 400 | pci_probe = 0; |
434 | return NULL; | 401 | return NULL; |
435 | } else if (!strncmp(str, "lastbus=", 8)) { | ||
436 | pcibios_last_bus = simple_strtol(str+8, NULL, 0); | ||
437 | return NULL; | ||
438 | } | 402 | } |
439 | return str; | 403 | return str; |
440 | } | 404 | } |
diff --git a/arch/mn10300/include/asm/pci.h b/arch/mn10300/include/asm/pci.h index 6f31cc0f1a87..166323824683 100644 --- a/arch/mn10300/include/asm/pci.h +++ b/arch/mn10300/include/asm/pci.h | |||
@@ -44,7 +44,6 @@ extern void unit_pci_init(void); | |||
44 | #define pcibios_assign_all_busses() 0 | 44 | #define pcibios_assign_all_busses() 0 |
45 | #endif | 45 | #endif |
46 | 46 | ||
47 | extern unsigned long pci_mem_start; | ||
48 | #define PCIBIOS_MIN_IO 0xBE000004 | 47 | #define PCIBIOS_MIN_IO 0xBE000004 |
49 | #define PCIBIOS_MIN_MEM 0xB8000000 | 48 | #define PCIBIOS_MIN_MEM 0xB8000000 |
50 | 49 | ||
diff --git a/arch/mn10300/kernel/setup.c b/arch/mn10300/kernel/setup.c index ebac9c11f796..2ad7f32fa122 100644 --- a/arch/mn10300/kernel/setup.c +++ b/arch/mn10300/kernel/setup.c | |||
@@ -35,9 +35,6 @@ | |||
35 | 35 | ||
36 | struct mn10300_cpuinfo boot_cpu_data; | 36 | struct mn10300_cpuinfo boot_cpu_data; |
37 | 37 | ||
38 | /* For PCI or other memory-mapped resources */ | ||
39 | unsigned long pci_mem_start = 0x18000000; | ||
40 | |||
41 | static char __initdata cmd_line[COMMAND_LINE_SIZE]; | 38 | static char __initdata cmd_line[COMMAND_LINE_SIZE]; |
42 | char redboot_command_line[COMMAND_LINE_SIZE] = | 39 | char redboot_command_line[COMMAND_LINE_SIZE] = |
43 | "console=ttyS0,115200 root=/dev/mtdblock3 rw"; | 40 | "console=ttyS0,115200 root=/dev/mtdblock3 rw"; |
diff --git a/arch/mn10300/unit-asb2305/pci-asb2305.h b/arch/mn10300/unit-asb2305/pci-asb2305.h index 7fa66a0e4624..9e17aca5a2a1 100644 --- a/arch/mn10300/unit-asb2305/pci-asb2305.h +++ b/arch/mn10300/unit-asb2305/pci-asb2305.h | |||
@@ -35,7 +35,6 @@ extern void pcibios_resource_survey(void); | |||
35 | 35 | ||
36 | /* pci.c */ | 36 | /* pci.c */ |
37 | 37 | ||
38 | extern int pcibios_last_bus; | ||
39 | extern struct pci_ops *pci_root_ops; | 38 | extern struct pci_ops *pci_root_ops; |
40 | 39 | ||
41 | extern struct irq_routing_table *pcibios_get_irq_routing_table(void); | 40 | extern struct irq_routing_table *pcibios_get_irq_routing_table(void); |
diff --git a/arch/mn10300/unit-asb2305/pci.c b/arch/mn10300/unit-asb2305/pci.c index e37fac0461f3..6b4339f8c9c2 100644 --- a/arch/mn10300/unit-asb2305/pci.c +++ b/arch/mn10300/unit-asb2305/pci.c | |||
@@ -24,7 +24,6 @@ | |||
24 | 24 | ||
25 | unsigned int pci_probe = 1; | 25 | unsigned int pci_probe = 1; |
26 | 26 | ||
27 | int pcibios_last_bus = -1; | ||
28 | struct pci_ops *pci_root_ops; | 27 | struct pci_ops *pci_root_ops; |
29 | 28 | ||
30 | /* | 29 | /* |
@@ -392,10 +391,6 @@ char *__init pcibios_setup(char *str) | |||
392 | if (!strcmp(str, "off")) { | 391 | if (!strcmp(str, "off")) { |
393 | pci_probe = 0; | 392 | pci_probe = 0; |
394 | return NULL; | 393 | return NULL; |
395 | |||
396 | } else if (!strncmp(str, "lastbus=", 8)) { | ||
397 | pcibios_last_bus = simple_strtol(str+8, NULL, 0); | ||
398 | return NULL; | ||
399 | } | 394 | } |
400 | 395 | ||
401 | return str; | 396 | return str; |
diff --git a/arch/powerpc/kernel/eeh.c b/arch/powerpc/kernel/eeh.c index 1fb331db34c8..671302065347 100644 --- a/arch/powerpc/kernel/eeh.c +++ b/arch/powerpc/kernel/eeh.c | |||
@@ -189,14 +189,13 @@ static size_t eeh_gather_pci_data(struct eeh_dev *edev, char * buf, size_t len) | |||
189 | } | 189 | } |
190 | 190 | ||
191 | /* If PCI-E capable, dump PCI-E cap 10, and the AER */ | 191 | /* If PCI-E capable, dump PCI-E cap 10, and the AER */ |
192 | cap = pci_find_capability(dev, PCI_CAP_ID_EXP); | 192 | if (pci_is_pcie(dev)) { |
193 | if (cap) { | ||
194 | n += scnprintf(buf+n, len-n, "pci-e cap10:\n"); | 193 | n += scnprintf(buf+n, len-n, "pci-e cap10:\n"); |
195 | printk(KERN_WARNING | 194 | printk(KERN_WARNING |
196 | "EEH: PCI-E capabilities and status follow:\n"); | 195 | "EEH: PCI-E capabilities and status follow:\n"); |
197 | 196 | ||
198 | for (i=0; i<=8; i++) { | 197 | for (i=0; i<=8; i++) { |
199 | eeh_ops->read_config(dn, cap+4*i, 4, &cfg); | 198 | eeh_ops->read_config(dn, dev->pcie_cap+4*i, 4, &cfg); |
200 | n += scnprintf(buf+n, len-n, "%02x:%x\n", 4*i, cfg); | 199 | n += scnprintf(buf+n, len-n, "%02x:%x\n", 4*i, cfg); |
201 | printk(KERN_WARNING "EEH: PCI-E %02x: %08x\n", i, cfg); | 200 | printk(KERN_WARNING "EEH: PCI-E %02x: %08x\n", i, cfg); |
202 | } | 201 | } |
diff --git a/arch/powerpc/sysdev/fsl_pci.c b/arch/powerpc/sysdev/fsl_pci.c index 21039634d1d0..4dfd61df8aba 100644 --- a/arch/powerpc/sysdev/fsl_pci.c +++ b/arch/powerpc/sysdev/fsl_pci.c | |||
@@ -45,7 +45,7 @@ static void quirk_fsl_pcie_early(struct pci_dev *dev) | |||
45 | u8 hdr_type; | 45 | u8 hdr_type; |
46 | 46 | ||
47 | /* if we aren't a PCIe don't bother */ | 47 | /* if we aren't a PCIe don't bother */ |
48 | if (!pci_find_capability(dev, PCI_CAP_ID_EXP)) | 48 | if (!pci_is_pcie(dev)) |
49 | return; | 49 | return; |
50 | 50 | ||
51 | /* if we aren't in host mode don't bother */ | 51 | /* if we aren't in host mode don't bother */ |
diff --git a/arch/tile/kernel/pci.c b/arch/tile/kernel/pci.c index b7180e6e900d..c45593db7718 100644 --- a/arch/tile/kernel/pci.c +++ b/arch/tile/kernel/pci.c | |||
@@ -251,15 +251,12 @@ static void fixup_read_and_payload_sizes(void) | |||
251 | /* Scan for the smallest maximum payload size. */ | 251 | /* Scan for the smallest maximum payload size. */ |
252 | for_each_pci_dev(dev) { | 252 | for_each_pci_dev(dev) { |
253 | u32 devcap; | 253 | u32 devcap; |
254 | int max_payload; | ||
255 | 254 | ||
256 | if (!pci_is_pcie(dev)) | 255 | if (!pci_is_pcie(dev)) |
257 | continue; | 256 | continue; |
258 | 257 | ||
259 | pcie_capability_read_dword(dev, PCI_EXP_DEVCAP, &devcap); | 258 | if (dev->pcie_mpss < smallest_max_payload) |
260 | max_payload = devcap & PCI_EXP_DEVCAP_PAYLOAD; | 259 | smallest_max_payload = dev->pcie_mpss; |
261 | if (max_payload < smallest_max_payload) | ||
262 | smallest_max_payload = max_payload; | ||
263 | } | 260 | } |
264 | 261 | ||
265 | /* Now, set the max_payload_size for all devices to that value. */ | 262 | /* Now, set the max_payload_size for all devices to that value. */ |
diff --git a/arch/x86/include/asm/x86_init.h b/arch/x86/include/asm/x86_init.h index 828a1565ba57..0f1be11e43d2 100644 --- a/arch/x86/include/asm/x86_init.h +++ b/arch/x86/include/asm/x86_init.h | |||
@@ -172,6 +172,7 @@ struct x86_platform_ops { | |||
172 | 172 | ||
173 | struct pci_dev; | 173 | struct pci_dev; |
174 | struct msi_msg; | 174 | struct msi_msg; |
175 | struct msi_desc; | ||
175 | 176 | ||
176 | struct x86_msi_ops { | 177 | struct x86_msi_ops { |
177 | int (*setup_msi_irqs)(struct pci_dev *dev, int nvec, int type); | 178 | int (*setup_msi_irqs)(struct pci_dev *dev, int nvec, int type); |
@@ -182,6 +183,8 @@ struct x86_msi_ops { | |||
182 | void (*teardown_msi_irqs)(struct pci_dev *dev); | 183 | void (*teardown_msi_irqs)(struct pci_dev *dev); |
183 | void (*restore_msi_irqs)(struct pci_dev *dev, int irq); | 184 | void (*restore_msi_irqs)(struct pci_dev *dev, int irq); |
184 | int (*setup_hpet_msi)(unsigned int irq, unsigned int id); | 185 | int (*setup_hpet_msi)(unsigned int irq, unsigned int id); |
186 | u32 (*msi_mask_irq)(struct msi_desc *desc, u32 mask, u32 flag); | ||
187 | u32 (*msix_mask_irq)(struct msi_desc *desc, u32 flag); | ||
185 | }; | 188 | }; |
186 | 189 | ||
187 | struct IO_APIC_route_entry; | 190 | struct IO_APIC_route_entry; |
diff --git a/arch/x86/kernel/x86_init.c b/arch/x86/kernel/x86_init.c index 8ce0072cd700..021783b1f46a 100644 --- a/arch/x86/kernel/x86_init.c +++ b/arch/x86/kernel/x86_init.c | |||
@@ -116,6 +116,8 @@ struct x86_msi_ops x86_msi = { | |||
116 | .teardown_msi_irqs = default_teardown_msi_irqs, | 116 | .teardown_msi_irqs = default_teardown_msi_irqs, |
117 | .restore_msi_irqs = default_restore_msi_irqs, | 117 | .restore_msi_irqs = default_restore_msi_irqs, |
118 | .setup_hpet_msi = default_setup_hpet_msi, | 118 | .setup_hpet_msi = default_setup_hpet_msi, |
119 | .msi_mask_irq = default_msi_mask_irq, | ||
120 | .msix_mask_irq = default_msix_mask_irq, | ||
119 | }; | 121 | }; |
120 | 122 | ||
121 | /* MSI arch specific hooks */ | 123 | /* MSI arch specific hooks */ |
@@ -138,6 +140,14 @@ void arch_restore_msi_irqs(struct pci_dev *dev, int irq) | |||
138 | { | 140 | { |
139 | x86_msi.restore_msi_irqs(dev, irq); | 141 | x86_msi.restore_msi_irqs(dev, irq); |
140 | } | 142 | } |
143 | u32 arch_msi_mask_irq(struct msi_desc *desc, u32 mask, u32 flag) | ||
144 | { | ||
145 | return x86_msi.msi_mask_irq(desc, mask, flag); | ||
146 | } | ||
147 | u32 arch_msix_mask_irq(struct msi_desc *desc, u32 flag) | ||
148 | { | ||
149 | return x86_msi.msix_mask_irq(desc, flag); | ||
150 | } | ||
141 | #endif | 151 | #endif |
142 | 152 | ||
143 | struct x86_io_apic_ops x86_io_apic_ops = { | 153 | struct x86_io_apic_ops x86_io_apic_ops = { |
diff --git a/arch/x86/pci/acpi.c b/arch/x86/pci/acpi.c index b30e937689d6..7fb24e53d4c8 100644 --- a/arch/x86/pci/acpi.c +++ b/arch/x86/pci/acpi.c | |||
@@ -354,12 +354,12 @@ static void coalesce_windows(struct pci_root_info *info, unsigned long type) | |||
354 | * the kernel resource tree doesn't allow overlaps. | 354 | * the kernel resource tree doesn't allow overlaps. |
355 | */ | 355 | */ |
356 | if (resource_overlaps(res1, res2)) { | 356 | if (resource_overlaps(res1, res2)) { |
357 | res1->start = min(res1->start, res2->start); | 357 | res2->start = min(res1->start, res2->start); |
358 | res1->end = max(res1->end, res2->end); | 358 | res2->end = max(res1->end, res2->end); |
359 | dev_info(&info->bridge->dev, | 359 | dev_info(&info->bridge->dev, |
360 | "host bridge window expanded to %pR; %pR ignored\n", | 360 | "host bridge window expanded to %pR; %pR ignored\n", |
361 | res1, res2); | 361 | res2, res1); |
362 | res2->flags = 0; | 362 | res1->flags = 0; |
363 | } | 363 | } |
364 | } | 364 | } |
365 | } | 365 | } |
diff --git a/arch/x86/pci/fixup.c b/arch/x86/pci/fixup.c index f5809fa2753e..b046e070e088 100644 --- a/arch/x86/pci/fixup.c +++ b/arch/x86/pci/fixup.c | |||
@@ -231,7 +231,7 @@ static int quirk_pcie_aspm_write(struct pci_bus *bus, unsigned int devfn, int wh | |||
231 | offset = quirk_aspm_offset[GET_INDEX(bus->self->device, devfn)]; | 231 | offset = quirk_aspm_offset[GET_INDEX(bus->self->device, devfn)]; |
232 | 232 | ||
233 | if ((offset) && (where == offset)) | 233 | if ((offset) && (where == offset)) |
234 | value = value & 0xfffffffc; | 234 | value = value & ~PCI_EXP_LNKCTL_ASPMC; |
235 | 235 | ||
236 | return raw_pci_write(pci_domain_nr(bus), bus->number, | 236 | return raw_pci_write(pci_domain_nr(bus), bus->number, |
237 | devfn, where, size, value); | 237 | devfn, where, size, value); |
@@ -252,7 +252,7 @@ static struct pci_ops quirk_pcie_aspm_ops = { | |||
252 | */ | 252 | */ |
253 | static void pcie_rootport_aspm_quirk(struct pci_dev *pdev) | 253 | static void pcie_rootport_aspm_quirk(struct pci_dev *pdev) |
254 | { | 254 | { |
255 | int cap_base, i; | 255 | int i; |
256 | struct pci_bus *pbus; | 256 | struct pci_bus *pbus; |
257 | struct pci_dev *dev; | 257 | struct pci_dev *dev; |
258 | 258 | ||
@@ -278,7 +278,7 @@ static void pcie_rootport_aspm_quirk(struct pci_dev *pdev) | |||
278 | for (i = GET_INDEX(pdev->device, 0); i <= GET_INDEX(pdev->device, 7); ++i) | 278 | for (i = GET_INDEX(pdev->device, 0); i <= GET_INDEX(pdev->device, 7); ++i) |
279 | quirk_aspm_offset[i] = 0; | 279 | quirk_aspm_offset[i] = 0; |
280 | 280 | ||
281 | pbus->ops = pbus->parent->ops; | 281 | pci_bus_set_ops(pbus, pbus->parent->ops); |
282 | } else { | 282 | } else { |
283 | /* | 283 | /* |
284 | * If devices are attached to the root port at power-up or | 284 | * If devices are attached to the root port at power-up or |
@@ -286,13 +286,15 @@ static void pcie_rootport_aspm_quirk(struct pci_dev *pdev) | |||
286 | * each root port to save the register offsets and replace the | 286 | * each root port to save the register offsets and replace the |
287 | * bus ops. | 287 | * bus ops. |
288 | */ | 288 | */ |
289 | list_for_each_entry(dev, &pbus->devices, bus_list) { | 289 | list_for_each_entry(dev, &pbus->devices, bus_list) |
290 | /* There are 0 to 8 devices attached to this bus */ | 290 | /* There are 0 to 8 devices attached to this bus */ |
291 | cap_base = pci_find_capability(dev, PCI_CAP_ID_EXP); | 291 | quirk_aspm_offset[GET_INDEX(pdev->device, dev->devfn)] = |
292 | quirk_aspm_offset[GET_INDEX(pdev->device, dev->devfn)] = cap_base + 0x10; | 292 | dev->pcie_cap + PCI_EXP_LNKCTL; |
293 | } | 293 | |
294 | pbus->ops = &quirk_pcie_aspm_ops; | 294 | pci_bus_set_ops(pbus, &quirk_pcie_aspm_ops); |
295 | dev_info(&pbus->dev, "writes to ASPM control bits will be ignored\n"); | ||
295 | } | 296 | } |
297 | |||
296 | } | 298 | } |
297 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_MCH_PA, pcie_rootport_aspm_quirk); | 299 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_MCH_PA, pcie_rootport_aspm_quirk); |
298 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_MCH_PA1, pcie_rootport_aspm_quirk); | 300 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_MCH_PA1, pcie_rootport_aspm_quirk); |
diff --git a/arch/x86/pci/xen.c b/arch/x86/pci/xen.c index 48e8461057ba..5eee4959785d 100644 --- a/arch/x86/pci/xen.c +++ b/arch/x86/pci/xen.c | |||
@@ -382,7 +382,14 @@ static void xen_teardown_msi_irq(unsigned int irq) | |||
382 | { | 382 | { |
383 | xen_destroy_irq(irq); | 383 | xen_destroy_irq(irq); |
384 | } | 384 | } |
385 | 385 | static u32 xen_nop_msi_mask_irq(struct msi_desc *desc, u32 mask, u32 flag) | |
386 | { | ||
387 | return 0; | ||
388 | } | ||
389 | static u32 xen_nop_msix_mask_irq(struct msi_desc *desc, u32 flag) | ||
390 | { | ||
391 | return 0; | ||
392 | } | ||
386 | #endif | 393 | #endif |
387 | 394 | ||
388 | int __init pci_xen_init(void) | 395 | int __init pci_xen_init(void) |
@@ -406,6 +413,8 @@ int __init pci_xen_init(void) | |||
406 | x86_msi.setup_msi_irqs = xen_setup_msi_irqs; | 413 | x86_msi.setup_msi_irqs = xen_setup_msi_irqs; |
407 | x86_msi.teardown_msi_irq = xen_teardown_msi_irq; | 414 | x86_msi.teardown_msi_irq = xen_teardown_msi_irq; |
408 | x86_msi.teardown_msi_irqs = xen_teardown_msi_irqs; | 415 | x86_msi.teardown_msi_irqs = xen_teardown_msi_irqs; |
416 | x86_msi.msi_mask_irq = xen_nop_msi_mask_irq; | ||
417 | x86_msi.msix_mask_irq = xen_nop_msix_mask_irq; | ||
409 | #endif | 418 | #endif |
410 | return 0; | 419 | return 0; |
411 | } | 420 | } |
@@ -485,6 +494,8 @@ int __init pci_xen_initial_domain(void) | |||
485 | x86_msi.setup_msi_irqs = xen_initdom_setup_msi_irqs; | 494 | x86_msi.setup_msi_irqs = xen_initdom_setup_msi_irqs; |
486 | x86_msi.teardown_msi_irq = xen_teardown_msi_irq; | 495 | x86_msi.teardown_msi_irq = xen_teardown_msi_irq; |
487 | x86_msi.restore_msi_irqs = xen_initdom_restore_msi_irqs; | 496 | x86_msi.restore_msi_irqs = xen_initdom_restore_msi_irqs; |
497 | x86_msi.msi_mask_irq = xen_nop_msi_mask_irq; | ||
498 | x86_msi.msix_mask_irq = xen_nop_msix_mask_irq; | ||
488 | #endif | 499 | #endif |
489 | xen_setup_acpi_sci(); | 500 | xen_setup_acpi_sci(); |
490 | __acpi_register_gsi = acpi_register_gsi_xen; | 501 | __acpi_register_gsi = acpi_register_gsi_xen; |