Re: [PATCH v2] arch_topology: Introduce nr_possible_packages
From: Sudeep Holla
Date: Tue Jul 21 2026 - 10:36:42 EST
On Tue, Jul 14, 2026 at 01:43:17PM +0800, Feng Tang wrote:
> For multi-sockets platforms kernel or driver code may need the number
> of packages to chose different code directions. Some architecture
> already provides such kind of interface like x86, which is being used
> in its architecture code and drivers.
>
> Add similar interface 'nr_possible_packages' for platforms which can
> get package topology information by parsing ACPI tables in boot phase,
> which was verified to show the correct number of packages on some
> 1-socket and 2-sockets production arm64 servers from different vendors.
>
> It has been used locally by some arm64 PMU driver, and cross-socket
> timer-consistency check code, which are to be posted.
>
> Signed-off-by: Feng Tang <feng.tang@xxxxxxxxxxxxxxxxx>
> ---
> since v1:
> * fix the potential overflow issue for 32b package ID (Sudeep)
> * add real use case in commit log (Sudeep)
>
> since RFC:
> * use EXPORT_SYMBOL_GPL instead of EXPORT_SYMBOL (Greg)
This is undone in this version, why ?
> * change the possible max package ID to 2047 (Greg)
> * remove the CONFIG_ARM64/RISCV limit for 'nr_possible_packages' (Greg)
Again this is still there, misleading or v2 is back to RFC, /me confused.
>
> v1: https://lore.kernel.org/lkml/20260515144435.93035-1-feng.tang@xxxxxxxxxxxxxxxxx/
Comments about users is still ignored.
--
Regards,
Sudeep
P.S.: Please avoid personal pings as it will not gain attention from other
interested parties.