summaryrefslogtreecommitdiff
path: root/kernel/cpu.c
diff options
context:
space:
mode:
authorJames Morse <james.morse@arm.com>2022-11-02 16:15:24 +0000
committerRussell King (Oracle) <rmk+kernel@armlinux.org.uk>2023-09-11 10:05:31 +0100
commit8c3da820fb216ca0aa4f79018870f248733758c0 (patch)
tree172bf84d18939e15abeeb979595bc8da66876440 /kernel/cpu.c
parent63b033436873de07c7027c200e70ef5d506702a3 (diff)
cpumask: Add enabled cpumask for present CPUs that can be brought onlineaarch64/hotplug-vcpu/v6.6-rc1
The 'offline' file in sysfs shows all offline CPUs, including those that aren't present. User-space is expected to remove not-present CPUs from thie list to learn which CPUs could be brought online. CPUs can be present but not-enabled. These CPUs can't be brought online until the firmware policy changes, which comes with an ACPI notification that will register the CPUs. With only the offline and present files, user-space is unable to determine which CPUs it can try to bring online. Add a new CPU mask that shows this based on all the registered CPUs. Signed-off-by: James Morse <james.morse@arm.com> Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Diffstat (limited to 'kernel/cpu.c')
-rw-r--r--kernel/cpu.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/kernel/cpu.c b/kernel/cpu.c
index 6de7c6bb74ee..2201a6a449b5 100644
--- a/kernel/cpu.c
+++ b/kernel/cpu.c
@@ -3101,6 +3101,9 @@ EXPORT_SYMBOL(__cpu_possible_mask);
struct cpumask __cpu_online_mask __read_mostly;
EXPORT_SYMBOL(__cpu_online_mask);
+struct cpumask __cpu_enabled_mask __read_mostly;
+EXPORT_SYMBOL(__cpu_enabled_mask);
+
struct cpumask __cpu_present_mask __read_mostly;
EXPORT_SYMBOL(__cpu_present_mask);