]> Git Repo - linux.git/commit
x86/acpi: Introduce persistent storage for cpuid <-> apicid mapping
authorGu Zheng <[email protected]>
Thu, 25 Aug 2016 08:35:16 +0000 (16:35 +0800)
committerThomas Gleixner <[email protected]>
Wed, 21 Sep 2016 19:18:38 +0000 (21:18 +0200)
commit8f54969dc8d6704632b42cbb5e47730cd75cc713
tree62703aca9b29687c588ba285ace9fd3f2cd70781
parentf7c28833c252031bc68a29e26a18a661797cf3a3
x86/acpi: Introduce persistent storage for cpuid <-> apicid mapping

The whole patch-set aims at making cpuid <-> nodeid mapping persistent. So that,
when node online/offline happens, cache based on cpuid <-> nodeid mapping such as
wq_numa_possible_cpumask will not cause any problem.
It contains 4 steps:
1. Enable apic registeration flow to handle both enabled and disabled cpus.
2. Introduce a new array storing all possible cpuid <-> apicid mapping.
3. Enable _MAT and MADT relative apis to return non-present or disabled cpus' apicid.
4. Establish all possible cpuid <-> nodeid mapping.

This patch finishes step 2.

In this patch, we introduce a new static array named cpuid_to_apicid[],
which is large enough to store info for all possible cpus.

And then, we modify the cpuid calculation. In generic_processor_info(),
it simply finds the next unused cpuid. And it is also why the cpuid <-> nodeid
mapping changes with node hotplug.

After this patch, we find the next unused cpuid, map it to an apicid,
and store the mapping in cpuid_to_apicid[], so that cpuid <-> apicid
mapping will be persistent.

And finally we will use this array to make cpuid <-> nodeid persistent.

cpuid <-> apicid mapping is established at local apic registeration time.
But non-present or disabled cpus are ignored.

In this patch, we establish all possible cpuid <-> apicid mapping when
registering local apic.

Signed-off-by: Gu Zheng <[email protected]>
Signed-off-by: Tang Chen <[email protected]>
Signed-off-by: Zhu Guihua <[email protected]>
Signed-off-by: Dou Liyang <[email protected]>
Acked-by: Ingo Molnar <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Thomas Gleixner <[email protected]>
arch/x86/include/asm/mpspec.h
arch/x86/kernel/acpi/boot.c
arch/x86/kernel/apic/apic.c
This page took 0.067253 seconds and 4 git commands to generate.