Re: Dont record local apic ids when they are disabled in MADT

From: Ashok Raj
Date: Thu Jan 26 2006 - 11:12:35 EST


On Thu, Jan 26, 2006 at 03:34:54PM +0100, Andi Kleen wrote:
>
> How? All the code who could do this is __init.

Where? all code that handles cpu hotplug is located in
drivers/acpi/processor_core.c under #ifdef CONFIG_ACPI_HOTPLUG_CPU handles
this.

Just to clarify when we say hotplug cpu support in kernel, today it means
logical cpu hotplug. I hope when physical hotplug is supported that
platform will have supporting ACPI based or some equivalent implementation.

>
> > (although i would say we tested this only on ia64 so far, the code is
> > generic to x86_64 as well, but i havent gone around testing physical hotplug
> > via emulation patches we have internally)
>
> I doubt it will work on x86-64.

In x86_64, we need to implement one mapping function acpi_map_lsapic()
defined in arch/i386/kernel/acpi/boot.c. Today this is only a stub
function. Its fully implemented for ia64. (As i mentioned this is
untested yet, and needs some more code and test)

acpi_processor_hotadd_init() in processor_core.c also does arch_register_cpu()
to create appropriate sysfs entries in /sys/devices/system/cpu/cpuX

When a platform supports hotplug, the BIOS should support appropriate ACPI
methods, or some equilvalent to do similar things.
>
> And you're breaking the CPU hotplug spec in Documentation/x86-64/cpu-hotplug-spec.
> I think the BIOS bugs need to be workarounded without breaking that.

ACPI spec states that if an entry is marked disabled, then dont use it at all.
We could use that to count the number of disabled CPUs in the system, which is
an acceptable deviation from the real intent, but i dont think we can ask the
BIOS to also have valid apic ids in them (especially platforms already
released)

Forcing even existing BIOSs to change wouldnt be nice.

Alternately you can add the counting of disabled CPUs logic only when
CONFIG_ACPI_HOTPLUG_CPU is enabled, so it doesnt hurt existing platforms.

--
Cheers,
Ashok Raj
- Open Source Technology Center
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/