[PATCH v9 19/19] cpumask: Add enabled cpumask for present CPUs that can be brought online
Gavin Shan
gshan at redhat.com
Wed May 1 04:14:50 PDT 2024
On 5/1/24 00:24, Jonathan Cameron wrote:
> From: James Morse <james.morse at arm.com>
>
> 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 at arm.com>
> Tested-by: Miguel Luis <miguel.luis at oracle.com>
> Tested-by: Vishnu Pajjuri <vishnu at os.amperecomputing.com>
> Tested-by: Jianyong Wu <jianyong.wu at arm.com>
> Acked-by: Thomas Gleixner <tglx at linutronix.de>
> Signed-off-by: Russell King (Oracle) <rmk+kernel at armlinux.org.uk>
> Signed-off-by: Jonathan Cameron <Jonathan.Cameron at huawei.com>
>
> ---
> v9: No change
> ---
> .../ABI/testing/sysfs-devices-system-cpu | 6 +++++
> drivers/base/cpu.c | 10 ++++++++
> include/linux/cpumask.h | 25 +++++++++++++++++++
> kernel/cpu.c | 3 +++
> 4 files changed, 44 insertions(+)
>
Reviewed-by: Gavin Shan <gshan at redhat.com>
More information about the linux-arm-kernel
mailing list