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>2024-01-08 12:37:57 +0000
commit8fc7aed65dda1d73bd1423f9b82029b354ce027d (patch)
treec265d21faf32a713924f60a84d1b5c5e4e5f63c0 /kernel/cpu.c
parent9284d86885edc8e60ac6f27dc5e76c48a017e765 (diff)
cpumask: Add enabled cpumask for present CPUs that can be brought onlineaarch64/hotplug-vcpu/v6.7
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 this 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> Tested-by: Miguel Luis <miguel.luis@oracle.com> Tested-by: Vishnu Pajjuri <vishnu@os.amperecomputing.com> Tested-by: Jianyong Wu <jianyong.wu@arm.com> Acked-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> --- Changes since RFCv3 (smaller series); * Added Documentation/ABI/testing/sysfs-devices-system-cpu entry
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 a86972a91991..fe0a5189f8ae 100644
--- a/kernel/cpu.c
+++ b/kernel/cpu.c
@@ -3122,6 +3122,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);