From 8c3da820fb216ca0aa4f79018870f248733758c0 Mon Sep 17 00:00:00 2001 From: James Morse Date: Wed, 2 Nov 2022 16:15:24 +0000 Subject: cpumask: Add enabled cpumask for present CPUs that can be brought online 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 Signed-off-by: Russell King (Oracle) --- kernel/cpu.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'kernel/cpu.c') 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); -- cgit