Re: [PATCH 38/39] cpumask: Add enabled cpumask for present CPUs that can be brought online
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- To: Russell King <rmk+kernel@xxxxxxxxxxxxxxx>
- Subject: Re: [PATCH 38/39] cpumask: Add enabled cpumask for present CPUs that can be brought online
- From: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
- Date: Tue, 24 Oct 2023 18:32:40 +0300
- Cc: linux-pm@xxxxxxxxxxxxxxx, loongarch@xxxxxxxxxxxxxxx, linux-acpi@xxxxxxxxxxxxxxx, linux-arch@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, linux-arm-kernel@xxxxxxxxxxxxxxxxxxx, linux-riscv@xxxxxxxxxxxxxxxxxxx, kvmarm@xxxxxxxxxxxxxxx, x86@xxxxxxxxxx, linux-csky@xxxxxxxxxxxxxxx, linux-doc@xxxxxxxxxxxxxxx, linux-ia64@xxxxxxxxxxxxxxx, linux-parisc@xxxxxxxxxxxxxxx, Salil Mehta <salil.mehta@xxxxxxxxxx>, Jean-Philippe Brucker <jean-philippe@xxxxxxxxxx>, jianyong.wu@xxxxxxx, justin.he@xxxxxxx, James Morse <james.morse@xxxxxxx>, Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>, "Rafael J. Wysocki" <rafael@xxxxxxxxxx>, Yury Norov <yury.norov@xxxxxxxxx>, Rasmus Villemoes <linux@xxxxxxxxxxxxxxxxxx>, Thomas Gleixner <tglx@xxxxxxxxxxxxx>, Peter Zijlstra <peterz@xxxxxxxxxxxxx>
- In-reply-to: <E1qvJBk-00AqSW-R8@rmk-PC.armlinux.org.uk>
- Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo
- References: <ZTffkAdOqL2pI2la@shell.armlinux.org.uk> <E1qvJBk-00AqSW-R8@rmk-PC.armlinux.org.uk>
On Tue, Oct 24, 2023 at 04:19:24PM +0100, Russell King wrote:
> From: James Morse <james.morse@xxxxxxx>
>
> 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.
...
> +static ssize_t print_cpus_enabled(struct device *dev,
> + struct device_attribute *attr, char *buf)
> +{
> + return sysfs_emit(buf, "%*pbl\n", cpumask_pr_args(cpu_enabled_mask));
> +}
> +static DEVICE_ATTR(enabled, 0444, print_cpus_enabled, NULL);
Hmm... DEVICE_ATTR_RO() ?
--
With Best Regards,
Andy Shevchenko
[Index of Archives]
[Linux Kernel]
[Sparc Linux]
[DCCP]
[Linux ARM]
[Yosemite News]
[Linux SCSI]
[Linux x86_64]
[Linux for Ham Radio]