lkml.org 
[lkml]   [2019]   [May]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 10/22] powercap/intel_rapl: Support multi-die/package
On Mon, May 06, 2019 at 05:26:05PM -0400, Len Brown wrote:
> From: Zhang Rui <rui.zhang@intel.com>
>
> RAPL "package" domains are actually implemented in hardware per-die.
> Thus, the new multi-die/package systems have mulitple domains
> within each physical package.
>
> Update the intel_rapl driver to be "die aware" -- exporting multiple
> domains within a single package, when present.
> No change on single die/package systems.
>
> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
> Signed-off-by: Len Brown <len.brown@intel.com>
> Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> Cc: linux-pm@vger.kernel.org
> ---
> drivers/powercap/intel_rapl.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/powercap/intel_rapl.c b/drivers/powercap/intel_rapl.c
> index 3c3c0c23180b..9202dbcef96d 100644
> --- a/drivers/powercap/intel_rapl.c
> +++ b/drivers/powercap/intel_rapl.c
> @@ -266,7 +266,7 @@ static struct rapl_domain *platform_rapl_domain; /* Platform (PSys) domain */
> /* caller to ensure CPU hotplug lock is held */
> static struct rapl_package *rapl_find_package_domain(int cpu)
> {
> - int id = topology_physical_package_id(cpu);
> + int id = topology_logical_die_id(cpu);
> struct rapl_package *rp;
>
> list_for_each_entry(rp, &rapl_packages, plist) {
> @@ -1459,7 +1459,7 @@ static void rapl_remove_package(struct rapl_package *rp)
> /* called from CPU hotplug notifier, hotplug lock held */
> static struct rapl_package *rapl_add_package(int cpu)
> {
> - int id = topology_physical_package_id(cpu);
> + int id = topology_logical_die_id(cpu);
> struct rapl_package *rp;
> int ret;

Both functions are still misnomers. rapl_find_package_domain() does in
fact now do rapl_find_die_domain(), right? Same for rapl_add_package()

\
 
 \ /
  Last update: 2019-05-07 14:16    [W:0.137 / U:1.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site