diff options
author | James Morse <james.morse@arm.com> | 2022-11-02 16:15:24 +0000 |
---|---|---|
committer | Russell King (Oracle) <rmk+kernel@armlinux.org.uk> | 2023-11-15 10:11:58 +0000 |
commit | 7cd0d2ba4b60697c90c4328a7377ce411568299e (patch) | |
tree | 2c77e1a9504e70f3e5bf0d89dd93fb6e0335a6a9 /kernel/cpu.c | |
parent | 14c87bb96df0d5d15ee8cea9114bcc9183d5dc4f (diff) |
cpumask: Add enabled cpumask for present CPUs that can be brought onlineaarch64/hotplug-vcpu/v6.7-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 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>
Diffstat (limited to 'kernel/cpu.c')
-rw-r--r-- | kernel/cpu.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/kernel/cpu.c b/kernel/cpu.c index 9e4c6780adde..42bfe7a2cf9e 100644 --- a/kernel/cpu.c +++ b/kernel/cpu.c @@ -3116,6 +3116,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); |