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-08-29 15:30:18 +0100
commitb74a4ba60fbf9e3f5fbcca347176c214dee19a68 (patch)
tree4e092e70cc20d43fe510aa6797a5bc60ade210dc /kernel/cpu.c
parent4713d1ec441c56edde6e9f9582848893087c8209 (diff)
cpumask: Add enabled cpumask for present CPUs that can be brought onlinevcpu-rmkaarch64/hotplug-vcpu/v6.5
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 88a7ede322bd..05616808f398 100644
--- a/kernel/cpu.c
+++ b/kernel/cpu.c
@@ -3013,6 +3013,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);