mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-15 16:24:13 +08:00
x86, io_apic: Move irq_remapping_enabled checks out of check_timer()
Move these checks to IRQ remapping code by introducing the panic_on_irq_remap() function. Signed-off-by: Joerg Roedel <joro@8bytes.org> Acked-by: Sebastian Andrzej Siewior <sebastian@breakpoint.cc> Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
This commit is contained in:
parent
a6a25dd327
commit
6a9f5de272
@ -45,6 +45,7 @@ extern void compose_remapped_msi_msg(struct pci_dev *pdev,
|
|||||||
unsigned int irq, unsigned int dest,
|
unsigned int irq, unsigned int dest,
|
||||||
struct msi_msg *msg, u8 hpet_id);
|
struct msi_msg *msg, u8 hpet_id);
|
||||||
extern int setup_hpet_msi_remapped(unsigned int irq, unsigned int id);
|
extern int setup_hpet_msi_remapped(unsigned int irq, unsigned int id);
|
||||||
|
extern void panic_if_irq_remap(const char *msg);
|
||||||
|
|
||||||
#else /* CONFIG_IRQ_REMAP */
|
#else /* CONFIG_IRQ_REMAP */
|
||||||
|
|
||||||
@ -75,6 +76,10 @@ static inline int setup_hpet_msi_remapped(unsigned int irq, unsigned int id)
|
|||||||
{
|
{
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline void panic_if_irq_remap(const char *msg)
|
||||||
|
{
|
||||||
|
}
|
||||||
#endif /* CONFIG_IRQ_REMAP */
|
#endif /* CONFIG_IRQ_REMAP */
|
||||||
|
|
||||||
#endif /* __X86_IRQ_REMAPPING_H */
|
#endif /* __X86_IRQ_REMAPPING_H */
|
||||||
|
@ -2777,8 +2777,7 @@ static inline void __init check_timer(void)
|
|||||||
* 8259A.
|
* 8259A.
|
||||||
*/
|
*/
|
||||||
if (pin1 == -1) {
|
if (pin1 == -1) {
|
||||||
if (irq_remapping_enabled)
|
panic_if_irq_remap("BIOS bug: timer not connected to IO-APIC");
|
||||||
panic("BIOS bug: timer not connected to IO-APIC");
|
|
||||||
pin1 = pin2;
|
pin1 = pin2;
|
||||||
apic1 = apic2;
|
apic1 = apic2;
|
||||||
no_pin1 = 1;
|
no_pin1 = 1;
|
||||||
@ -2810,8 +2809,7 @@ static inline void __init check_timer(void)
|
|||||||
clear_IO_APIC_pin(0, pin1);
|
clear_IO_APIC_pin(0, pin1);
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
if (irq_remapping_enabled)
|
panic_if_irq_remap("timer doesn't work through Interrupt-remapped IO-APIC");
|
||||||
panic("timer doesn't work through Interrupt-remapped IO-APIC");
|
|
||||||
local_irq_disable();
|
local_irq_disable();
|
||||||
clear_IO_APIC_pin(apic1, pin1);
|
clear_IO_APIC_pin(apic1, pin1);
|
||||||
if (!no_pin1)
|
if (!no_pin1)
|
||||||
|
@ -321,3 +321,9 @@ int setup_hpet_msi_remapped(unsigned int irq, unsigned int id)
|
|||||||
|
|
||||||
return remap_ops->setup_hpet_msi(irq, id);
|
return remap_ops->setup_hpet_msi(irq, id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void panic_if_irq_remap(const char *msg)
|
||||||
|
{
|
||||||
|
if (irq_remapping_enabled)
|
||||||
|
panic(msg);
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user