Received: by 2002:ab2:3350:0:b0:1f4:6588:b3a7 with SMTP id o16csp1113187lqe; Sun, 7 Apr 2024 20:52:42 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCW3F2l7pfxZUb7Sp46PZ4DJPpi84If54XeOUBk9gKg5/NRf9XT7n3GRpZWp3fc1N964JOAdbEESEb+dLAJY93aZntntQf4LfPgZRI9rlQ== X-Google-Smtp-Source: AGHT+IHZddqai2YIkkGEPEiq0Wz815jQvVTTiSFMqmOTS669g/3zk9OLsxZhkLz+3letti54yBQK X-Received: by 2002:a05:6214:1c48:b0:696:4771:9b57 with SMTP id if8-20020a0562141c4800b0069647719b57mr14004009qvb.23.1712548362323; Sun, 07 Apr 2024 20:52:42 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712548362; cv=pass; d=google.com; s=arc-20160816; b=GbvcAMf1PMbkoXn0lJoN4U6XmQffH8XHTfAHvVX6SCpZ4c3GOA4TirkbZlTSU4+aHC 95z/QzRYitcWv4uLLaLs2lVVf/iAcl3nMQ7QBS/Q5Pj0aa3JgedmEzYWTkM1t3crw9ei epJRntQDxDZpxIzl6AOAILzZWxGj+kltyIScO0PJWTDyISFrd7mzeF0JSgMYEFX/qcgr sBTidSbrsxjmv2PZH2yLv6vdZovZBCKR8Q/GMEiFTK3nY+L7SvwG9OHTgPsYDDZlDtGG aruhfl51LTk0udf8JrJFeT/cHVQsBS6HtwiPL0K7u4oU7X8LL4Y5QWD5KXRqxM2fXVXz sm4g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=FtOK84qgKesZD2JOeVd7adkncEpmxoUv1DIhze2OxVg=; fh=XRyktAWfBDGbJ1xUPdkSh8aAML3CriornvGZAw15ShM=; b=jdzGkuEfiQFUpFBhKTFQcgyeXbpQnQnVZbcxp/LZxY8u7GPY0eA1h87tJ0DLFNCcp6 whu0B7OdwmA/dKuoevKjui+dhie0XUvQmnn5xr/0uBFjmVCqJo5f8IeIhSqlqtm8J/Ma DnjLLCvGRLU/owYqPmfCIQvaDAMz1rxa2l4QH8kDFTCXylTln1d/tP7Wc9OeSqHTbhgO Xwt5lMIgsRSKqWWgb/dVOM3H0APT0XA+wMipJGwJ1h9Buss6btbVeg9bMboY+OJcyUa9 RZQKYptK8quZPLzpNa+7IoP0nC+GgThdqTO9M59vq3ZpKYGNhAjb5pfe4J5/8rsJRBqR 6UpQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=mOjSCb5U; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-kernel+bounces-134766-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-134766-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id ev4-20020a0562140a8400b0069b0f06aab8si3608528qvb.536.2024.04.07.20.52.41 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 07 Apr 2024 20:52:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-134766-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=mOjSCb5U; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-kernel+bounces-134766-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-134766-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id C69D71C20C08 for ; Mon, 8 Apr 2024 03:52:41 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 98879F503; Mon, 8 Apr 2024 03:52:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="mOjSCb5U" Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 596C98F4A; Mon, 8 Apr 2024 03:52:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.17 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712548322; cv=none; b=SA/sxGuNulcE3onoOwTSBidZi3E1VybBsff2THMQI6eczHshs6XiLiv0P9Gf7uAi4//t6EadaNN53ogLyD9HMjgL5dvCXm3t86rWneHwtMD+LSsQljvzhUb6i/lgCrBJCZQ0y73ZLHkUO2CN/1gTMZt+6jCbnluhkLalMBQF9oU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712548322; c=relaxed/simple; bh=b99iJg1A5bvxRUOumWSxLIxtvCLHK+sA+lw4WRmUyxA=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=BNsybEHIXTfsVpRc+Iu/PTFdBh/YFeelnLug/vbD7emJArYRyLdpMurTvhgsrzHEsO5d/jE7rUUQLG5MZfVwY8rQDwgM94mogp0OgHKJ1yVsmNgV7plklDaSjBL8AVlWIe9kTWpZUtAV0N2OyWwHAtbeyrcNz8UOZJEP83oUDaE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=mOjSCb5U; arc=none smtp.client-ip=198.175.65.17 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1712548322; x=1744084322; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=b99iJg1A5bvxRUOumWSxLIxtvCLHK+sA+lw4WRmUyxA=; b=mOjSCb5U2Kt42zF7bc+eQOvryf9cRF4O3lC2dMBNYk8JMqmo9eqO7h5y vQ0VFueR0hx/Vp5bmicIoOgkVJ6d/y1/uRueKYSzra1Cu5EcHXZuZNpBT MctYWxb4dqy2JJuMJ5KZO2ithQO7ACiWD3DTbMWElu3GsPlSiZv2UXMoT RnSkhCPwxaRfw7NcfWA9Ebzb85eE9gozR9Sf092tCMgQhTxE1xyInHUFY pWU/QHAG9BctLcvoGvl9XaZtbHv40H3HQ9bfyV3A8Mp46yGnjAZnf17Cg XeMzqFUawxb8nkEOmW0h7vpJvpmpUKLpNOwmfdtBb+epTxG6X1geS/v3v Q==; X-CSE-ConnectionGUID: XTIoPchySoamnQniAOJIPw== X-CSE-MsgGUID: 7o7qoMyXTKyxhd7K1t+cZQ== X-IronPort-AV: E=McAfee;i="6600,9927,11037"; a="7909942" X-IronPort-AV: E=Sophos;i="6.07,186,1708416000"; d="scan'208";a="7909942" Received: from fmviesa008.fm.intel.com ([10.60.135.148]) by orvoesa109.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Apr 2024 20:52:01 -0700 X-CSE-ConnectionGUID: vDongyGvQ++vYf9MoiPBsQ== X-CSE-MsgGUID: QMAjILr8TlyXmz49YFW7Ig== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,186,1708416000"; d="scan'208";a="19870377" Received: from lihon19x-mobl.ccr.corp.intel.com (HELO rzhang1-mobl7.ccr.corp.intel.com) ([10.249.173.91]) by fmviesa008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Apr 2024 20:51:59 -0700 From: Zhang Rui To: rafael.j.wysocki@intel.com Cc: linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, srinivas.pandruvada@intel.com Subject: [PATCH V2 3/3] powercap: intel_rapl_tpmi: Enable PMU support Date: Mon, 8 Apr 2024 11:51:41 +0800 Message-Id: <20240408035141.248644-4-rui.zhang@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240408035141.248644-1-rui.zhang@intel.com> References: <20240408035141.248644-1-rui.zhang@intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Enable RAPL PMU support for TPMI RAPL driver. Signed-off-by: Zhang Rui --- drivers/powercap/intel_rapl_tpmi.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/powercap/intel_rapl_tpmi.c b/drivers/powercap/intel_rapl_tpmi.c index f6b7f085977c..947544e4d229 100644 --- a/drivers/powercap/intel_rapl_tpmi.c +++ b/drivers/powercap/intel_rapl_tpmi.c @@ -302,6 +302,8 @@ static int intel_rapl_tpmi_probe(struct auxiliary_device *auxdev, goto err; } + rapl_package_add_pmu(trp->rp); + auxiliary_set_drvdata(auxdev, trp); return 0; @@ -314,6 +316,7 @@ static void intel_rapl_tpmi_remove(struct auxiliary_device *auxdev) { struct tpmi_rapl_package *trp = auxiliary_get_drvdata(auxdev); + rapl_package_remove_pmu(trp->rp); rapl_remove_package(trp->rp); trp_release(trp); } -- 2.34.1