From: Sepherosa Ziehau Date: Tue, 13 Dec 2011 13:34:45 +0000 (+0800) Subject: i386/ioapic: Always allow user to specify GSI's target CPU X-Git-Tag: v3.0.0~400 X-Git-Url: http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff_plain/b18d6a136f87561e16ca451af494aa5c4da2f469 i386/ioapic: Always allow user to specify GSI's target CPU This merges b8dfb6b1be7001e8dc00e5bc9e6efb85a5e0f4ab --- diff --git a/sys/platform/pc32/apic/ioapic_abi.c b/sys/platform/pc32/apic/ioapic_abi.c index 55cff36..77110ae 100644 --- a/sys/platform/pc32/apic/ioapic_abi.c +++ b/sys/platform/pc32/apic/ioapic_abi.c @@ -991,9 +991,6 @@ ioapic_abi_gsi_cpuid(int irq, int gsi) KKASSERT(gsi >= 0); - if (!ioapic_abi_gsi_balance) - return 0; - if (irq == 0 || gsi == 0) { if (bootverbose) { kprintf("IOAPIC: irq %d, gsi %d -> cpu0 (0)\n", @@ -1014,6 +1011,14 @@ ioapic_abi_gsi_cpuid(int irq, int gsi) kgetenv_int(envpath, &cpuid); if (cpuid < 0) { + if (!ioapic_abi_gsi_balance) { + if (bootverbose) { + kprintf("IOAPIC: irq %d, gsi %d -> cpu0 " + "(fixed)\n", irq, gsi); + } + return 0; + } + cpuid = gsi % ncpus; if (bootverbose) { kprintf("IOAPIC: irq %d, gsi %d -> cpu%d (auto)\n",