Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp530993yba; Fri, 5 Apr 2019 11:28:06 -0700 (PDT) X-Google-Smtp-Source: APXvYqxvnbSXzEB1wK5q9JjJQUZmoPqrQDyMZA8om/OaY4Ui6yz3AbgQq6fhIASxk+l64joOUyIq X-Received: by 2002:a17:902:7785:: with SMTP id o5mr14598675pll.33.1554488886211; Fri, 05 Apr 2019 11:28:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554488886; cv=none; d=google.com; s=arc-20160816; b=lDd2No1317E8JwqgZxOq6rSZSr66IEqaVugHpOkNk7sXrIxk9MkPE50HZAY2DgrGSZ IQ3HILIrtJC0EenptjgNezEDtMbmYdhLEbGa4RbvkvC0C/f3PdKnGiL3ESI9czZ+oJcX PKSkS+6xa0KWtzc+P222mmArHVtboKu3y6pmTx2Cz4cOPbeLKpFPxcBXSFHw8VpRRxAH 7uVGChKjbaYwvj3g/L/fcO912ESE9HpaH3jq7Xj5z6cptyp13wdLQgzAWssBnVhObIZa oG8hQmCSoHzrNOZ7Rfqbw4dHlYnESP0bBUJoCRnppszKY0jT83xK9mFgtOp0lnLQrjRn q75A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date; bh=ozGnhYQlMc2JWbGI8hkIXLd7R9n0SbEltVxIwIvc3kk=; b=h4hc0XC91gwIuAXpLW+tKSCmQtZ+9wEZge1soydBnAjFWFNEByOCwKkecmDYdDbpIC QYM4bQfu4jZtCKBF2KYVAj/cgZSxy1b3UnnPZKIYDfiLYiZexBVHx4R4ms5D8xyVssJz 36sTEvByY0pvct13LHCGg+lKvbByVwE6wEcY1Fulxqmv7j3bFpD2VxWKCS3yZmQmlNZI hE2dtmZLIFuhT/tgyBjU2xNPSlkeL3pbvxj56dWusbCC4dopmAk/PjuRCdyvIch3QLz2 L19V6dojssWf4a/g9Zs8946Qgs1MvhP0i5Blpb75el6ZnRBRMdJia73gKbaYWj7ncvR7 eXqw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i64si3352507pge.179.2019.04.05.11.27.50; Fri, 05 Apr 2019 11:28:06 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731625AbfDES1J (ORCPT + 99 others); Fri, 5 Apr 2019 14:27:09 -0400 Received: from Galois.linutronix.de ([146.0.238.70]:49455 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731087AbfDES1I (ORCPT ); Fri, 5 Apr 2019 14:27:08 -0400 Received: from p5492e2fc.dip0.t-ipconnect.de ([84.146.226.252] helo=nanos) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1hCTYO-00021r-9n; Fri, 05 Apr 2019 20:27:04 +0200 Date: Fri, 5 Apr 2019 20:27:03 +0200 (CEST) From: Thomas Gleixner To: Len Brown cc: x86@kernel.org, linux-kernel@vger.kernel.org, Zhang Rui , Len Brown , linux-pm@vger.kernel.org Subject: Re: [PATCH 08/14] powercap/intel_rapl: Support multi-die/package In-Reply-To: <680e11fe0dcc65e4cfa5bfeaa0d1cdbe7896e3c0.1551160674.git.len.brown@intel.com> Message-ID: References: <680e11fe0dcc65e4cfa5bfeaa0d1cdbe7896e3c0.1551160674.git.len.brown@intel.com> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 26 Feb 2019, Len Brown wrote: > From: Zhang Rui > > On the new dual-die/package systems, the RAPL MSR becomes die-scope. > Thus instead of one powercap device per physical package, now there > should be one powercap device for each unique die on these systems. > > This patch introduces intel_rapl driver support for new > dual-die/package systems. This patch .... See Documentation/processs/ and this sentence is not really helpful either. > On the hardwares that do not have multi-die, topology_logical_die_id() > equals topology_physical_package_id(), thus there is no functional change. Something like this: To support this the RAPL package domain has to be identified by the die id instead of the package id. On single die CPUs the die id is the same as the physical package id. Hmm? > Signed-off-by: Zhang Rui > Signed-off-by: Len Brown > Acked-by: Rafael J. Wysocki > 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 6057d9695fed..8723e9ae7436 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(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) { > @@ -1457,7 +1457,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; > > -- > 2.18.0-rc0 > >