kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
* Why does kernel has different commandline options to disable Local APIC and I/O APIC?
@ 2023-10-05 17:01 Mushahid Hussain
  0 siblings, 0 replies; only message in thread
From: Mushahid Hussain @ 2023-10-05 17:01 UTC (permalink / raw)
  To: kernelnewbies

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@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-10-05 17:03 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-05 17:01 Why does kernel has different commandline options to disable Local APIC and I/O APIC? Mushahid Hussain

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).