diff options
| -rw-r--r-- | arch/x86/include/asm/hpet.h | 5 | ||||
| -rw-r--r-- | arch/x86/include/asm/x86_init.h | 1 | ||||
| -rw-r--r-- | arch/x86/kernel/apic/io_apic.c | 8 | ||||
| -rw-r--r-- | arch/x86/kernel/hpet.c | 2 | ||||
| -rw-r--r-- | arch/x86/kernel/x86_init.c | 10 | ||||
| -rw-r--r-- | drivers/iommu/irq_remapping.c | 3 |
6 files changed, 14 insertions, 15 deletions
diff --git a/arch/x86/include/asm/hpet.h b/arch/x86/include/asm/hpet.h index 434e2106cc87..b18df579c0e9 100644 --- a/arch/x86/include/asm/hpet.h +++ b/arch/x86/include/asm/hpet.h | |||
| @@ -80,9 +80,9 @@ extern void hpet_msi_write(struct hpet_dev *hdev, struct msi_msg *msg); | |||
| 80 | extern void hpet_msi_read(struct hpet_dev *hdev, struct msi_msg *msg); | 80 | extern void hpet_msi_read(struct hpet_dev *hdev, struct msi_msg *msg); |
| 81 | 81 | ||
| 82 | #ifdef CONFIG_PCI_MSI | 82 | #ifdef CONFIG_PCI_MSI |
| 83 | extern int arch_setup_hpet_msi(unsigned int irq, unsigned int id); | 83 | extern int default_setup_hpet_msi(unsigned int irq, unsigned int id); |
| 84 | #else | 84 | #else |
| 85 | static inline int arch_setup_hpet_msi(unsigned int irq, unsigned int id) | 85 | static inline int default_setup_hpet_msi(unsigned int irq, unsigned int id) |
| 86 | { | 86 | { |
| 87 | return -EINVAL; | 87 | return -EINVAL; |
| 88 | } | 88 | } |
| @@ -111,6 +111,7 @@ extern void hpet_unregister_irq_handler(rtc_irq_handler handler); | |||
| 111 | static inline int hpet_enable(void) { return 0; } | 111 | static inline int hpet_enable(void) { return 0; } |
| 112 | static inline int is_hpet_enabled(void) { return 0; } | 112 | static inline int is_hpet_enabled(void) { return 0; } |
| 113 | #define hpet_readl(a) 0 | 113 | #define hpet_readl(a) 0 |
| 114 | #define default_setup_hpet_msi NULL | ||
| 114 | 115 | ||
| 115 | #endif | 116 | #endif |
| 116 | #endif /* _ASM_X86_HPET_H */ | 117 | #endif /* _ASM_X86_HPET_H */ |
diff --git a/arch/x86/include/asm/x86_init.h b/arch/x86/include/asm/x86_init.h index 8ff79f7d3630..1ee10ca46675 100644 --- a/arch/x86/include/asm/x86_init.h +++ b/arch/x86/include/asm/x86_init.h | |||
| @@ -187,6 +187,7 @@ struct x86_msi_ops { | |||
| 187 | void (*teardown_msi_irq)(unsigned int irq); | 187 | void (*teardown_msi_irq)(unsigned int irq); |
| 188 | void (*teardown_msi_irqs)(struct pci_dev *dev); | 188 | void (*teardown_msi_irqs)(struct pci_dev *dev); |
| 189 | void (*restore_msi_irqs)(struct pci_dev *dev, int irq); | 189 | void (*restore_msi_irqs)(struct pci_dev *dev, int irq); |
| 190 | int (*setup_hpet_msi)(unsigned int irq, unsigned int id); | ||
| 190 | }; | 191 | }; |
| 191 | 192 | ||
| 192 | struct x86_io_apic_ops { | 193 | struct x86_io_apic_ops { |
diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c index a18e27a8882a..e7b87630c13d 100644 --- a/arch/x86/kernel/apic/io_apic.c +++ b/arch/x86/kernel/apic/io_apic.c | |||
| @@ -3399,18 +3399,12 @@ static struct irq_chip hpet_msi_type = { | |||
| 3399 | .irq_retrigger = ioapic_retrigger_irq, | 3399 | .irq_retrigger = ioapic_retrigger_irq, |
| 3400 | }; | 3400 | }; |
| 3401 | 3401 | ||
| 3402 | int arch_setup_hpet_msi(unsigned int irq, unsigned int id) | 3402 | int default_setup_hpet_msi(unsigned int irq, unsigned int id) |
| 3403 | { | 3403 | { |
| 3404 | struct irq_chip *chip = &hpet_msi_type; | 3404 | struct irq_chip *chip = &hpet_msi_type; |
| 3405 | struct msi_msg msg; | 3405 | struct msi_msg msg; |
| 3406 | int ret; | 3406 | int ret; |
| 3407 | 3407 | ||
| 3408 | if (irq_remapping_enabled) { | ||
| 3409 | ret = setup_hpet_msi_remapped(irq, id); | ||
| 3410 | if (ret) | ||
| 3411 | return ret; | ||
| 3412 | } | ||
| 3413 | |||
| 3414 | ret = msi_compose_msg(NULL, irq, &msg, id); | 3408 | ret = msi_compose_msg(NULL, irq, &msg, id); |
| 3415 | if (ret < 0) | 3409 | if (ret < 0) |
| 3416 | return ret; | 3410 | return ret; |
diff --git a/arch/x86/kernel/hpet.c b/arch/x86/kernel/hpet.c index e28670f9a589..da85a8e830a1 100644 --- a/arch/x86/kernel/hpet.c +++ b/arch/x86/kernel/hpet.c | |||
| @@ -478,7 +478,7 @@ static int hpet_msi_next_event(unsigned long delta, | |||
| 478 | 478 | ||
| 479 | static int hpet_setup_msi_irq(unsigned int irq) | 479 | static int hpet_setup_msi_irq(unsigned int irq) |
| 480 | { | 480 | { |
| 481 | if (arch_setup_hpet_msi(irq, hpet_blockid)) { | 481 | if (x86_msi.setup_hpet_msi(irq, hpet_blockid)) { |
| 482 | destroy_irq(irq); | 482 | destroy_irq(irq); |
| 483 | return -EINVAL; | 483 | return -EINVAL; |
| 484 | } | 484 | } |
diff --git a/arch/x86/kernel/x86_init.c b/arch/x86/kernel/x86_init.c index ee4af8b04841..0357eee65673 100644 --- a/arch/x86/kernel/x86_init.c +++ b/arch/x86/kernel/x86_init.c | |||
| @@ -19,6 +19,7 @@ | |||
| 19 | #include <asm/time.h> | 19 | #include <asm/time.h> |
| 20 | #include <asm/irq.h> | 20 | #include <asm/irq.h> |
| 21 | #include <asm/io_apic.h> | 21 | #include <asm/io_apic.h> |
| 22 | #include <asm/hpet.h> | ||
| 22 | #include <asm/pat.h> | 23 | #include <asm/pat.h> |
| 23 | #include <asm/tsc.h> | 24 | #include <asm/tsc.h> |
| 24 | #include <asm/iommu.h> | 25 | #include <asm/iommu.h> |
| @@ -111,10 +112,11 @@ struct x86_platform_ops x86_platform = { | |||
| 111 | 112 | ||
| 112 | EXPORT_SYMBOL_GPL(x86_platform); | 113 | EXPORT_SYMBOL_GPL(x86_platform); |
| 113 | struct x86_msi_ops x86_msi = { | 114 | struct x86_msi_ops x86_msi = { |
| 114 | .setup_msi_irqs = native_setup_msi_irqs, | 115 | .setup_msi_irqs = native_setup_msi_irqs, |
| 115 | .teardown_msi_irq = native_teardown_msi_irq, | 116 | .teardown_msi_irq = native_teardown_msi_irq, |
| 116 | .teardown_msi_irqs = default_teardown_msi_irqs, | 117 | .teardown_msi_irqs = default_teardown_msi_irqs, |
| 117 | .restore_msi_irqs = default_restore_msi_irqs, | 118 | .restore_msi_irqs = default_restore_msi_irqs, |
| 119 | .setup_hpet_msi = default_setup_hpet_msi, | ||
| 118 | }; | 120 | }; |
| 119 | 121 | ||
| 120 | struct x86_io_apic_ops x86_io_apic_ops = { | 122 | struct x86_io_apic_ops x86_io_apic_ops = { |
diff --git a/drivers/iommu/irq_remapping.c b/drivers/iommu/irq_remapping.c index db3dcaf4ddf0..0baad3b9ecba 100644 --- a/drivers/iommu/irq_remapping.c +++ b/drivers/iommu/irq_remapping.c | |||
| @@ -36,7 +36,8 @@ static void irq_remapping_disable_io_apic(void) | |||
| 36 | 36 | ||
| 37 | static void __init irq_remapping_modify_x86_ops(void) | 37 | static void __init irq_remapping_modify_x86_ops(void) |
| 38 | { | 38 | { |
| 39 | x86_io_apic_ops.disable = irq_remapping_disable_io_apic; | 39 | x86_io_apic_ops.disable = irq_remapping_disable_io_apic; |
| 40 | x86_msi.setup_hpet_msi = setup_hpet_msi_remapped; | ||
| 40 | } | 41 | } |
| 41 | 42 | ||
| 42 | static __init int setup_nointremap(char *str) | 43 | static __init int setup_nointremap(char *str) |
