i386/ioapic_abi: Disable interrupt load balance by default
authorSepherosa Ziehau <sephe@dragonflybsd.org>
Sun, 11 Dec 2011 13:48:15 +0000 (21:48 +0800)
committerSepherosa Ziehau <sephe@dragonflybsd.org>
Sun, 11 Dec 2011 13:48:15 +0000 (21:48 +0800)
This merges 2b195d6a566cb8441f5d6d66363235683bbd92af

sys/platform/pc32/apic/ioapic_abi.c

index 15a47ac..7c24f8b 100644 (file)
@@ -512,6 +512,7 @@ struct machintr_abi MachIntrABI_IOAPIC = {
 
 static int     ioapic_abi_extint_irq = -1;
 static int     ioapic_abi_line_irq_max;
+static int     ioapic_abi_gsi_balance;
 
 struct ioapic_irqinfo  ioapic_irqs[IOAPIC_HWI_VECTORS];
 
@@ -671,6 +672,8 @@ ioapic_abi_initmap(void)
 {
        int cpu;
 
+       kgetenv_int("hw.ioapic.gsi.balance", &ioapic_abi_gsi_balance);
+
        /*
         * NOTE: ncpus is not ready yet
         */
@@ -982,6 +985,9 @@ 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",