diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-05-06 17:59:13 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-05-06 17:59:13 -0400 |
commit | 99737982ca39065a58021bdc31486ea783f952d3 (patch) | |
tree | e402502e0f4700d92c4c0b48d0919ea2687f53dc /arch/x86 | |
parent | 91f8575685e35f3bd021286bc82d26397458f5a9 (diff) | |
parent | 0c4513be3d01a854867446ee793748409cc0ebdf (diff) |
Merge tag 'iommu-updates-v3.10' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu
Pull IOMMU updates from Joerg Roedel:
"The updates are mostly about the x86 IOMMUs this time.
Exceptions are the groundwork for the PAMU IOMMU from Freescale (for a
PPC platform) and an extension to the IOMMU group interface.
On the x86 side this includes a workaround for VT-d to disable
interrupt remapping on broken chipsets. On the AMD-Vi side the most
important new feature is a kernel command-line interface to override
broken information in IVRS ACPI tables and get interrupt remapping
working this way.
Besides that there are small fixes all over the place."
* tag 'iommu-updates-v3.10' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu: (24 commits)
iommu/tegra: Fix printk formats for dma_addr_t
iommu: Add a function to find an iommu group by id
iommu/vt-d: Remove warning for HPET scope type
iommu: Move swap_pci_ref function to drivers/iommu/pci.h.
iommu/vt-d: Disable translation if already enabled
iommu/amd: fix error return code in early_amd_iommu_init()
iommu/AMD: Per-thread IOMMU Interrupt Handling
iommu: Include linux/err.h
iommu/amd: Workaround for ERBT1312
iommu/amd: Document ivrs_ioapic and ivrs_hpet parameters
iommu/amd: Don't report firmware bugs with cmd-line ivrs overrides
iommu/amd: Add ioapic and hpet ivrs override
iommu/amd: Add early maps for ioapic and hpet
iommu/amd: Extend IVRS special device data structure
iommu/amd: Move add_special_device() to __init
iommu: Fix compile warnings with forward declarations
iommu/amd: Properly initialize irq-table lock
iommu/amd: Use AMD specific data structure for irq remapping
iommu/amd: Remove map_sg_no_iommu()
iommu/vt-d: add quirk for broken interrupt remapping on 55XX chipsets
...
Diffstat (limited to 'arch/x86')
-rw-r--r-- | arch/x86/include/asm/irq_remapping.h | 9 | ||||
-rw-r--r-- | arch/x86/kernel/early-quirks.c | 20 |
2 files changed, 29 insertions, 0 deletions
diff --git a/arch/x86/include/asm/irq_remapping.h b/arch/x86/include/asm/irq_remapping.h index 95fd3527f632..d806b228d2c0 100644 --- a/arch/x86/include/asm/irq_remapping.h +++ b/arch/x86/include/asm/irq_remapping.h | |||
@@ -24,10 +24,18 @@ | |||
24 | 24 | ||
25 | #include <asm/io_apic.h> | 25 | #include <asm/io_apic.h> |
26 | 26 | ||
27 | struct IO_APIC_route_entry; | ||
28 | struct io_apic_irq_attr; | ||
29 | struct irq_chip; | ||
30 | struct msi_msg; | ||
31 | struct pci_dev; | ||
32 | struct irq_cfg; | ||
33 | |||
27 | #ifdef CONFIG_IRQ_REMAP | 34 | #ifdef CONFIG_IRQ_REMAP |
28 | 35 | ||
29 | extern void setup_irq_remapping_ops(void); | 36 | extern void setup_irq_remapping_ops(void); |
30 | extern int irq_remapping_supported(void); | 37 | extern int irq_remapping_supported(void); |
38 | extern void set_irq_remapping_broken(void); | ||
31 | extern int irq_remapping_prepare(void); | 39 | extern int irq_remapping_prepare(void); |
32 | extern int irq_remapping_enable(void); | 40 | extern int irq_remapping_enable(void); |
33 | extern void irq_remapping_disable(void); | 41 | extern void irq_remapping_disable(void); |
@@ -54,6 +62,7 @@ void irq_remap_modify_chip_defaults(struct irq_chip *chip); | |||
54 | 62 | ||
55 | static inline void setup_irq_remapping_ops(void) { } | 63 | static inline void setup_irq_remapping_ops(void) { } |
56 | static inline int irq_remapping_supported(void) { return 0; } | 64 | static inline int irq_remapping_supported(void) { return 0; } |
65 | static inline void set_irq_remapping_broken(void) { } | ||
57 | static inline int irq_remapping_prepare(void) { return -ENODEV; } | 66 | static inline int irq_remapping_prepare(void) { return -ENODEV; } |
58 | static inline int irq_remapping_enable(void) { return -ENODEV; } | 67 | static inline int irq_remapping_enable(void) { return -ENODEV; } |
59 | static inline void irq_remapping_disable(void) { } | 68 | static inline void irq_remapping_disable(void) { } |
diff --git a/arch/x86/kernel/early-quirks.c b/arch/x86/kernel/early-quirks.c index 3755ef494390..94ab6b90dd3f 100644 --- a/arch/x86/kernel/early-quirks.c +++ b/arch/x86/kernel/early-quirks.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <asm/apic.h> | 18 | #include <asm/apic.h> |
19 | #include <asm/iommu.h> | 19 | #include <asm/iommu.h> |
20 | #include <asm/gart.h> | 20 | #include <asm/gart.h> |
21 | #include <asm/irq_remapping.h> | ||
21 | 22 | ||
22 | static void __init fix_hypertransport_config(int num, int slot, int func) | 23 | static void __init fix_hypertransport_config(int num, int slot, int func) |
23 | { | 24 | { |
@@ -192,6 +193,21 @@ static void __init ati_bugs_contd(int num, int slot, int func) | |||
192 | } | 193 | } |
193 | #endif | 194 | #endif |
194 | 195 | ||
196 | static void __init intel_remapping_check(int num, int slot, int func) | ||
197 | { | ||
198 | u8 revision; | ||
199 | |||
200 | revision = read_pci_config_byte(num, slot, func, PCI_REVISION_ID); | ||
201 | |||
202 | /* | ||
203 | * Revision 0x13 of this chipset supports irq remapping | ||
204 | * but has an erratum that breaks its behavior, flag it as such | ||
205 | */ | ||
206 | if (revision == 0x13) | ||
207 | set_irq_remapping_broken(); | ||
208 | |||
209 | } | ||
210 | |||
195 | #define QFLAG_APPLY_ONCE 0x1 | 211 | #define QFLAG_APPLY_ONCE 0x1 |
196 | #define QFLAG_APPLIED 0x2 | 212 | #define QFLAG_APPLIED 0x2 |
197 | #define QFLAG_DONE (QFLAG_APPLY_ONCE|QFLAG_APPLIED) | 213 | #define QFLAG_DONE (QFLAG_APPLY_ONCE|QFLAG_APPLIED) |
@@ -221,6 +237,10 @@ static struct chipset early_qrk[] __initdata = { | |||
221 | PCI_CLASS_SERIAL_SMBUS, PCI_ANY_ID, 0, ati_bugs }, | 237 | PCI_CLASS_SERIAL_SMBUS, PCI_ANY_ID, 0, ati_bugs }, |
222 | { PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_SBX00_SMBUS, | 238 | { PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_SBX00_SMBUS, |
223 | PCI_CLASS_SERIAL_SMBUS, PCI_ANY_ID, 0, ati_bugs_contd }, | 239 | PCI_CLASS_SERIAL_SMBUS, PCI_ANY_ID, 0, ati_bugs_contd }, |
240 | { PCI_VENDOR_ID_INTEL, 0x3403, PCI_CLASS_BRIDGE_HOST, | ||
241 | PCI_BASE_CLASS_BRIDGE, 0, intel_remapping_check }, | ||
242 | { PCI_VENDOR_ID_INTEL, 0x3406, PCI_CLASS_BRIDGE_HOST, | ||
243 | PCI_BASE_CLASS_BRIDGE, 0, intel_remapping_check }, | ||
224 | {} | 244 | {} |
225 | }; | 245 | }; |
226 | 246 | ||