Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp3323458imj; Tue, 19 Feb 2019 01:12:45 -0800 (PST) X-Google-Smtp-Source: AHgI3IYCY5/n38I2fnAlTuuCvAvAsbPwm/hFG7tNy4F4aPH4DXDUUJD6HEufufU3wMEv5XCGMI6z X-Received: by 2002:a17:902:7293:: with SMTP id d19mr28698629pll.29.1550567565819; Tue, 19 Feb 2019 01:12:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550567565; cv=none; d=google.com; s=arc-20160816; b=fW2xZ/bCqwopu6RUuY8KNvV4YDWe3qQ5S2NUXWR8vRoh7Ltxef5VNKLcu2Brli9a5k L77K07frf0UH3Zq54Neq10AknA8toDefrp5CjfNyZKDitjM40+DOUdYKD9QAw59BBgmB PmlqCmEd4o4bpDIeorz4cLF3DAKw2Ts3dxKVCsFgEBf8vjQ4gFVzTMRBze8WEj13tdZ/ 63QvPdojZbnVGmXZxiJAva9UIqeqsHWn5ae3pcSElvUFcj97Y26FFurSx8WjU7RkdUo7 Hawi8T+GiPiFYrbaK4hh9MkBKrbYqNlddKQjPej6oIM6UyDJgW7kMWxCbW+XbVNl+eXk ZHLA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=fxDA+/dzu0nOfBkkmiudLRSxaWUAW+hOuZ4AgzPO4rc=; b=GB4+S3O/RrPL4gQ6+HviGPeyVrTmcKCEr6q/aDHcGMBdKf3TMcZKN4ONaB8gek+3fn X+tZU0A8ensmY+ouZHIrlbG+np1ljUnn9JQgjLVeIZEc5I8B4qomn6OBQn1mCuff8+Sb /321cRAp1f64LI1TRehA7pqblkIgswEK2ZAq/v5JwqJrOGKvub/JFjNsoAvJkFjOk8Lq gvaShgZCJm265ZYtBWVGlQjzNxa85vNmxuyGWpDVRI+VxuL6RTj7Hmfdz8NLV/AoiLY8 FEalTKX2Ev8QAl+kLxLxIwccgr6BNT+eetkufx/Cd65nXLBC21ClNcpQxlDOwoim8epK 0AMA== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q12si10294990pli.428.2019.02.19.01.12.30; Tue, 19 Feb 2019 01:12:45 -0800 (PST) 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727948AbfBSJLG (ORCPT + 99 others); Tue, 19 Feb 2019 04:11:06 -0500 Received: from mail-ot1-f65.google.com ([209.85.210.65]:46797 "EHLO mail-ot1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727831AbfBSJLG (ORCPT ); Tue, 19 Feb 2019 04:11:06 -0500 Received: by mail-ot1-f65.google.com with SMTP id c18so11408484otl.13; Tue, 19 Feb 2019 01:11:06 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=fxDA+/dzu0nOfBkkmiudLRSxaWUAW+hOuZ4AgzPO4rc=; b=bfVskMFpWtkgrZq8OJyO7W9b48oxOcitj4jvknAxK8CUTjlPlIh+wqprBGxLI/TfWT GHvIs+OW7JsVpg/USxoeWF7l1GFCM5bArGNt15Ib7yjeAQ24vay0efoj3jsrL78n74yx kkg8eG7PslBAAsJFx8MIbYlYo623HZDia/ACDkKttq3iwm5KHjukasw0ZJ/DqnCJUGAB PIYkgqt2RnRfKHDDxt8qLdntes8xAaRUelMEStoUUEinwFzEhczWX6zFbopO5y+6Efbl MtaJYmLJJCAFXzMc2r29RIh2HF9708HWa0ALJBu8VHyktp6VU9EAr8JmA2WBuymY9SmQ PuLg== X-Gm-Message-State: AHQUAuYq60xdpRWzCDJ7WVHNIyq+2r/s6GfvybDsINsR+L+3KlWZ/RcG NUhfgd2sbzqP+xgOTjwWcdY3DoSfLuR4V4XqsGA= X-Received: by 2002:aca:88d:: with SMTP id 135mr1823105oii.84.1550567465621; Tue, 19 Feb 2019 01:11:05 -0800 (PST) MIME-Version: 1.0 References: <635b2bf8b1151a191cd9299276b75791a818c0c2.1550545163.git.len.brown@intel.com> <3349c9e551eecbfe849320c0e938daf4e0126734.1550545163.git.len.brown@intel.com> In-Reply-To: <3349c9e551eecbfe849320c0e938daf4e0126734.1550545163.git.len.brown@intel.com> From: "Rafael J. Wysocki" Date: Tue, 19 Feb 2019 10:10:54 +0100 Message-ID: Subject: Re: [PATCH 08/11] powercap/intel_rapl: Support multi-die/package To: Len Brown Cc: "the arch/x86 maintainers" , Linux Kernel Mailing List , Zhang Rui , Len Brown , Linux PM Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Feb 19, 2019 at 4:40 AM 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. > > On the hardwares that do not have multi-die, topology_unique_die_id() > equals topology_physical_package_id(), thus there is no functional change. > > Signed-off-by: Zhang Rui > Signed-off-by: Len Brown > Cc: linux-pm@vger.kernel.org > Signed-off-by: Len Brown Acked-by: Rafael J. Wysocki > --- > 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..e004707283da 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_unique_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_unique_die_id(cpu); > struct rapl_package *rp; > int ret; > > -- > 2.18.0-rc0 >