|
From: | Zhao Liu |
Subject: | Re: [PATCH v2 05/10] i386/topology: Introduce helpers for various topology info of different level |
Date: | Fri, 27 Dec 2024 15:51:55 +0800 |
> +static inline unsigned x86_module_per_pkg(X86CPUTopoInfo *topo_info) > +{ > + return topo_info->modules_per_die * topo_info->dies_per_pkg; > +} > + > +static inline unsigned x86_cores_per_pkg(X86CPUTopoInfo *topo_info) > +{ > + return topo_info->cores_per_module * x86_module_per_pkg(topo_info); > +} The above helpers can be ignored this time until someone wants them... > +static inline unsigned x86_threads_per_pkg(X86CPUTopoInfo *topo_info) > +{ > + return topo_info->threads_per_core * x86_cores_per_pkg(topo_info); > +} ...then this can be x86_threads_per_die(topo_info) * topo_info->dies_per_package > +static inline unsigned x86_threads_per_module(X86CPUTopoInfo *topo_info) > +{ > + return topo_info->threads_per_core * topo_info->cores_per_module; > +} > + > +static inline unsigned x86_threads_per_die(X86CPUTopoInfo *topo_info) > +{ > + return x86_threads_per_module(topo_info) * topo_info->modules_per_die; > +} > + >
[Prev in Thread] | Current Thread | [Next in Thread] |