From 342d6a1b94005068c7b1d52f818f878ab041ff65 Mon Sep 17 00:00:00 2001 From: Sepherosa Ziehau Date: Fri, 22 Jul 2011 10:37:00 +0800 Subject: [PATCH 2/2] ioapic: Disable unused GSI instead of leaving it in unknown state --- sys/platform/pc32/apic/ioapic.c | 5 +++++ sys/platform/pc64/apic/ioapic.c | 5 +++++ 2 files changed, 10 insertions(+), 0 deletions(-) diff --git a/sys/platform/pc32/apic/ioapic.c b/sys/platform/pc32/apic/ioapic.c index c3f6316..a83f670 100644 --- a/sys/platform/pc32/apic/ioapic.c +++ b/sys/platform/pc32/apic/ioapic.c @@ -374,7 +374,12 @@ ioapic_gsi_setup(int gsi) * don't do the default configuration. * The configuration of the target GSI * will finally setup this IRQ. + * + * This GSI is not used, disable it. */ + ioapic_pin_setup(ioapic_gsi_ioaddr(gsi), + ioapic_gsi_pin(gsi), 0, + INTR_TRIGGER_EDGE, INTR_POLARITY_HIGH); return; } trig = INTR_TRIGGER_EDGE; diff --git a/sys/platform/pc64/apic/ioapic.c b/sys/platform/pc64/apic/ioapic.c index ad0dd2c..53adbfa 100644 --- a/sys/platform/pc64/apic/ioapic.c +++ b/sys/platform/pc64/apic/ioapic.c @@ -371,7 +371,12 @@ ioapic_gsi_setup(int gsi) * don't do the default configuration. * The configuration of the target GSI * will finally setup this IRQ. + * + * This GSI is not used, disable it. */ + ioapic_pin_setup(ioapic_gsi_ioaddr(gsi), + ioapic_gsi_pin(gsi), 0, + INTR_TRIGGER_EDGE, INTR_POLARITY_HIGH); return; } trig = INTR_TRIGGER_EDGE; -- 1.7.4.1