aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/x86/include/asm/irq_remapping.h5
-rw-r--r--arch/x86/kernel/apic/io_apic.c6
-rw-r--r--drivers/iommu/irq_remapping.c6
3 files changed, 13 insertions, 4 deletions
diff --git a/arch/x86/include/asm/irq_remapping.h b/arch/x86/include/asm/irq_remapping.h
index f1afa04c3f6a..fb99a73d0d9f 100644
--- a/arch/x86/include/asm/irq_remapping.h
+++ b/arch/x86/include/asm/irq_remapping.h
@@ -45,6 +45,7 @@ extern void compose_remapped_msi_msg(struct pci_dev *pdev,
45 unsigned int irq, unsigned int dest, 45 unsigned int irq, unsigned int dest,
46 struct msi_msg *msg, u8 hpet_id); 46 struct msi_msg *msg, u8 hpet_id);
47extern int setup_hpet_msi_remapped(unsigned int irq, unsigned int id); 47extern int setup_hpet_msi_remapped(unsigned int irq, unsigned int id);
48extern void panic_if_irq_remap(const char *msg);
48 49
49#else /* CONFIG_IRQ_REMAP */ 50#else /* CONFIG_IRQ_REMAP */
50 51
@@ -75,6 +76,10 @@ static inline int setup_hpet_msi_remapped(unsigned int irq, unsigned int id)
75{ 76{
76 return -ENODEV; 77 return -ENODEV;
77} 78}
79
80static inline void panic_if_irq_remap(const char *msg)
81{
82}
78#endif /* CONFIG_IRQ_REMAP */ 83#endif /* CONFIG_IRQ_REMAP */
79 84
80#endif /* __X86_IRQ_REMAPPING_H */ 85#endif /* __X86_IRQ_REMAPPING_H */
diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c
index 9a7131f29c83..aa2b75360115 100644
--- a/arch/x86/kernel/apic/io_apic.c
+++ b/arch/x86/kernel/apic/io_apic.c
@@ -2777,8 +2777,7 @@ static inline void __init check_timer(void)
2777 * 8259A. 2777 * 8259A.
2778 */ 2778 */
2779 if (pin1 == -1) { 2779 if (pin1 == -1) {
2780 if (irq_remapping_enabled) 2780 panic_if_irq_remap("BIOS bug: timer not connected to IO-APIC");
2781 panic("BIOS bug: timer not connected to IO-APIC");
2782 pin1 = pin2; 2781 pin1 = pin2;
2783 apic1 = apic2; 2782 apic1 = apic2;
2784 no_pin1 = 1; 2783 no_pin1 = 1;
@@ -2810,8 +2809,7 @@ static inline void __init check_timer(void)
2810 clear_IO_APIC_pin(0, pin1); 2809 clear_IO_APIC_pin(0, pin1);
2811 goto out; 2810 goto out;
2812 } 2811 }
2813 if (irq_remapping_enabled) 2812 panic_if_irq_remap("timer doesn't work through Interrupt-remapped IO-APIC");
2814 panic("timer doesn't work through Interrupt-remapped IO-APIC");
2815 local_irq_disable(); 2813 local_irq_disable();
2816 clear_IO_APIC_pin(apic1, pin1); 2814 clear_IO_APIC_pin(apic1, pin1);
2817 if (!no_pin1) 2815 if (!no_pin1)
diff --git a/drivers/iommu/irq_remapping.c b/drivers/iommu/irq_remapping.c
index 886ad67987fd..ebd02bf98062 100644
--- a/drivers/iommu/irq_remapping.c
+++ b/drivers/iommu/irq_remapping.c
@@ -321,3 +321,9 @@ int setup_hpet_msi_remapped(unsigned int irq, unsigned int id)
321 321
322 return remap_ops->setup_hpet_msi(irq, id); 322 return remap_ops->setup_hpet_msi(irq, id);
323} 323}
324
325void panic_if_irq_remap(const char *msg)
326{
327 if (irq_remapping_enabled)
328 panic(msg);
329}