Why does kernel has different commandline options to disable Local APIC and I/O APIC?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I see that "noapic" and "nolapic" command line options are handled differently.

"noapic" is handled in function "disable_ioapic_support()" which does following:

```

void disable_ioapic_support(void)
{
#ifdef CONFIG_PCI
    noioapicquirk = 1;
    noioapicreroute = -1;
#endif
    skip_ioapic_setup = 1;
}

```


however, nolapic is handled in a different function, which sets
different variables:

```

/*
 * APIC command line parameters
 */
static int __init setup_disableapic(char *arg)
{
    disable_apic = 1;
    setup_clear_cpu_cap(X86_FEATURE_APIC);
    return 0;
}
```


I can also see that there's check to call "disable_ioapic_support" if
local APIC is disabled:

```

/**
 * setup_local_APIC - setup the local APIC
 *
 * Used to setup local APIC while initializing BSP or bringin up APs.
 * Always called with preemption disabled.
 */
void setup_local_APIC(void)
{
    int cpu = smp_processor_id();
    unsigned int value, queued;
    int i, j, acked = 0;
    unsigned long long tsc = 0, ntsc;
    long long max_loops = cpu_khz ? cpu_khz : 1000000;

    if (cpu_has_tsc)
        rdtscll(tsc);

    if (disable_apic) {
        disable_ioapic_support();
        return;
    }

```


but I don't see anywhere that kernel disabled Local APIC if "noapic"
commandline option is passed. Shouldn't Local APIC be disabled as
well, when there's a commandline option "noapic" to disable APIC? As
per my understand, at least IOAPIC is needed for local APICs to
function? If IO APIC is disabled, should Local APICs be also disabled?

-- 
Mushahid Hussain

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]

  Powered by Linux