From nobody Wed Apr 1 09:43:43 2026 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.14]) (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 40B6E3A2546 for ; Mon, 30 Mar 2026 21:43:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.14 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774907016; cv=none; b=TuJxolKMhgaKALfENaY5bNGbx4ZQnUaeYpUG7A/uPVz3uN2XDrloQGwCgl7D3J0JiS/1zmYgUfqRKogDeWHTBhSSIMUceAs0QX/bdl/HF9kt1opnlmaePReXPUj7fMMfZcJjmXyvTADyyye0nB4EaQ5DTbBV0dcB2XGyEIOW1zY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774907016; c=relaxed/simple; bh=xvwMYcVdCqzLdQ4ED+pIfDk1uzwQGWdHDFFqCqDUAy8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=oSBjuem8xQNDiVU/TaPcoUSilIHTJBJH1GwcbuqXCZnKgKz7ER1sFe84Jw67O2AzNFOCW3bX2vj2EmDwv6dwKNP6po6hItKvDTSmpE+v02+YSFAdoNaOtmrrjJrsrMwoVwSjHgWpckZQPaTh3r5fK2ePNxNJZf8H8De2yhubasE= 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=e1eVaVfo; arc=none smtp.client-ip=198.175.65.14 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="e1eVaVfo" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1774907012; x=1806443012; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=xvwMYcVdCqzLdQ4ED+pIfDk1uzwQGWdHDFFqCqDUAy8=; b=e1eVaVfogF6jgy/NQnWQynb2B5WxzXJDDNyWf2BVgQTjJkXT1cLLTTW+ 8B5PZBcPOZ2263/MQiWS2ftHELSWo275goen0rXcKVFQvOQP8F+h4IF93 gP24DXQcfXR+8pw8xJxDfYb6JXyh5Fv1OwwGgnoN9ufVUNA7AVO7WKEUM ItpRLY+8CPSNbm9kK+8jBbHM/yflCrIqI7q1x4/3P0wgGO6vcQwMTGxxH /5v35lKsoc1FqGhpaQ9g/fMlfBtBixZSMR1i1xXnR86BbJR+oqj4eEdeS /roc5emY3BZNKAJVDtWuIJ4lyZZfTebDwAMIeuL1I1Ht3iu+VGc8xciFv w==; X-CSE-ConnectionGUID: EBdTF1LnStSEJcEeaFmcAQ== X-CSE-MsgGUID: XCGUNxUAR7upKFDmK4SeBA== X-IronPort-AV: E=McAfee;i="6800,10657,11744"; a="79772126" X-IronPort-AV: E=Sophos;i="6.23,150,1770624000"; d="scan'208";a="79772126" Received: from orviesa006.jf.intel.com ([10.64.159.146]) by orvoesa106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Mar 2026 14:43:32 -0700 X-CSE-ConnectionGUID: 8O1VqrF0QjOgNmSBEYXiGw== X-CSE-MsgGUID: TNr/jLuLRWKJP6uv69mWUg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.23,150,1770624000"; d="scan'208";a="225185934" Received: from spandruv-desk1.amr.corp.intel.com (HELO agluck-desk3.home.arpa) ([10.124.222.186]) by orviesa006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Mar 2026 14:43:31 -0700 From: Tony Luck To: Fenghua Yu , Reinette Chatre , Maciej Wieczor-Retman , Peter Newman , James Morse , Babu Moger , Drew Fustini , Dave Martin , Chen Yu , David E Box , x86@kernel.org Cc: linux-kernel@vger.kernel.org, patches@lists.linux.dev, Tony Luck Subject: [PATCH v4 1/7] platform/x86/intel/pmt: Export PMT enumeration functions as GPL Date: Mon, 30 Mar 2026 14:43:16 -0700 Message-ID: <20260330214322.96686-2-tony.luck@intel.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260330214322.96686-1-tony.luck@intel.com> References: <20260330214322.96686-1-tony.luck@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: quoted-printable Content-Type: text/plain; charset="utf-8" The symbol_get() function requires that objects be GPL licensed. Signed-off-by: Tony Luck --- drivers/platform/x86/intel/pmt/telemetry.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/platform/x86/intel/pmt/telemetry.c b/drivers/platform/= x86/intel/pmt/telemetry.c index a52803bfe124..4504fb9fd83c 100644 --- a/drivers/platform/x86/intel/pmt/telemetry.c +++ b/drivers/platform/x86/intel/pmt/telemetry.c @@ -287,13 +287,13 @@ struct pmt_feature_group *intel_pmt_get_regions_by_fe= ature(enum pmt_feature_id i =20 return no_free_ptr(feature_group); } -EXPORT_SYMBOL(intel_pmt_get_regions_by_feature); +EXPORT_SYMBOL_GPL(intel_pmt_get_regions_by_feature); =20 void intel_pmt_put_feature_group(struct pmt_feature_group *feature_group) { kref_put(&feature_group->kref, pmt_feature_group_release); } -EXPORT_SYMBOL(intel_pmt_put_feature_group); +EXPORT_SYMBOL_GPL(intel_pmt_put_feature_group); =20 int pmt_telem_read(struct telem_endpoint *ep, u32 id, u64 *data, u32 count) { --=20 2.53.0 From nobody Wed Apr 1 09:43:43 2026 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.14]) (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 B495F3A4532 for ; Mon, 30 Mar 2026 21:43:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.14 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774907014; cv=none; b=iN3yAoQHgv8qOc6prcO//zMJ0t2IRG7rFXcJ9ApZ7ZzQN6WW1g+GZ8vZgzDhlVGIqCS8TlppKneDkuMfQfAtug9ne0qeWqRvgg1qZFIAIGz3jRfGeqFdHL/xAtCe15aVEOTZPp85BDX/XNt6ZI0Z+0AJQ9EZFtVJ3gPSH1YUnlo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774907014; c=relaxed/simple; bh=8zNQaI5+5hl82nEhqMvTbAX163F7y9T3+XZ35TcbybM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Js+ibCf+h97NugvKDpjz/yIKlkOrhTVObjrl1AtLVxcnMLsHyxfeGnyVal5Nk5nChxAA5LrQU8kR3pZyOmRwbtN1B6QQYtss+CvSDmf029ex+z2YdSCG5UGwdGyYw5a/dH9W0D+Kh51MmzX0FvZ/45FYJeKrkeZe8XX8BYNtH8I= 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=WZ8tb5cl; arc=none smtp.client-ip=198.175.65.14 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="WZ8tb5cl" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1774907013; x=1806443013; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=8zNQaI5+5hl82nEhqMvTbAX163F7y9T3+XZ35TcbybM=; b=WZ8tb5clo+E6FckJ2F7q/uxqWzO5fRrK/W33Y3E7oYpZnOzcc/Vq0BOH NeOOLfqHj5gL0T4Hx01k3ovXbWyWAuwm4hugJxPubQxPsZ9+mOYcePeZr x8mKWsZh5OsIaxaADEMKW3Y1QaG2tm7lmXu3uVeLyLnszPiPPqMgIh6Xo ihR9DTokDRHx1zxzTH4tPdE6X46F1H4jWUZd0/H3UxQaI6B6afMQ6S445 nCm6KasNTAetgaunZRvINGzDtOR1apvqeACLtZBvOv9FJjn2pOGojjUEg GGRI4hw1rM06PWeg/LN2lH/BCOJ1cFDgu+IPFi4M9UKLxSvCjnxdRSSVc g==; X-CSE-ConnectionGUID: dNyW7yHET8yTF8D9+BDw0g== X-CSE-MsgGUID: gVt+vLMmTC+9f0KWKSiB9A== X-IronPort-AV: E=McAfee;i="6800,10657,11744"; a="79772134" X-IronPort-AV: E=Sophos;i="6.23,150,1770624000"; d="scan'208";a="79772134" Received: from orviesa006.jf.intel.com ([10.64.159.146]) by orvoesa106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Mar 2026 14:43:32 -0700 X-CSE-ConnectionGUID: VXyE2nADTL2SQCNBpVpb1w== X-CSE-MsgGUID: VKZHCZpaQD+KPAgEbxIrzw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.23,150,1770624000"; d="scan'208";a="225185938" Received: from spandruv-desk1.amr.corp.intel.com (HELO agluck-desk3.home.arpa) ([10.124.222.186]) by orviesa006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Mar 2026 14:43:32 -0700 From: Tony Luck To: Fenghua Yu , Reinette Chatre , Maciej Wieczor-Retman , Peter Newman , James Morse , Babu Moger , Drew Fustini , Dave Martin , Chen Yu , David E Box , x86@kernel.org Cc: linux-kernel@vger.kernel.org, patches@lists.linux.dev, Tony Luck Subject: [PATCH v4 2/7] x86/resctrl: Drop setting of event_group::force_off when insufficient RMIDs Date: Mon, 30 Mar 2026 14:43:17 -0700 Message-ID: <20260330214322.96686-3-tony.luck@intel.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260330214322.96686-1-tony.luck@intel.com> References: <20260330214322.96686-1-tony.luck@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: quoted-printable Content-Type: text/plain; charset="utf-8" Setting the force_off flag does not matter when AET features are only enumerated once (on first mount). In preparation for enumeration on every mount, drop this because it overrides user request with rdt=3D boot option to force enable a feature. Signed-off-by: Tony Luck --- arch/x86/kernel/cpu/resctrl/intel_aet.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/arch/x86/kernel/cpu/resctrl/intel_aet.c b/arch/x86/kernel/cpu/= resctrl/intel_aet.c index 89b8b619d5d5..015627401ed2 100644 --- a/arch/x86/kernel/cpu/resctrl/intel_aet.c +++ b/arch/x86/kernel/cpu/resctrl/intel_aet.c @@ -214,10 +214,8 @@ static bool all_regions_have_sufficient_rmid(struct ev= ent_group *e, struct pmt_f if (!p->regions[i].addr) continue; tr =3D &p->regions[i]; - if (tr->num_rmids < e->num_rmid) { - e->force_off =3D true; + if (tr->num_rmids < e->num_rmid) return false; - } } =20 return true; --=20 2.53.0 From nobody Wed Apr 1 09:43:43 2026 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.14]) (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 8088E3A5E84 for ; Mon, 30 Mar 2026 21:43:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.14 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774907015; cv=none; b=Rc30oN7TrafLB8SQhdK193wachvesf6w0YuCnqS0BDWPzCzZzSUpCldhwsUVkLsZwq0zl8a+4BVILQaepdVy28vvcLS7ZLVo9/vY1h6ezdIo0GhuCEikPC5C1iOvJFDuC6uToEsPRi5CnwVQn7LzKKROCvkpVq6USzpF5LkM32s= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774907015; c=relaxed/simple; bh=3ImAyxvnv0f1uzi+zUm8GU+iSobtAJ3OcTnC0JjVOWc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=UlX2vpFwKZETsAF2odLM7ukNh+Escxsnn03y/TzqclVXzTQiZkYdHebHQgCLIzk5aT10uPmEvYQq6KtfEfh29EEziWD20/y3VWPWTlg/UZhzVdFq8fSecGPZfUTjWpeElDcvaNBLFpxMtS7avwVYkskwdqwp4s0AyKCjFvDNTuA= 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=NeYlzwwe; arc=none smtp.client-ip=198.175.65.14 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="NeYlzwwe" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1774907014; x=1806443014; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=3ImAyxvnv0f1uzi+zUm8GU+iSobtAJ3OcTnC0JjVOWc=; b=NeYlzwweg+ZeisT9ISir8i5T86hmTrRQW4qu46TIE+Muhh/KsP/QWdNz ngEaIgttMmFfkrSwyFiQFo71tb5sM5fAJnm7FDidXk9M2H26qSr69VVtk oQSFw7KnMziTh3dOIORUMRFXIe11x5dqTS9uZx3emyRqpBAqs1v0aQi/j XSK9kVj7wYvwJgAGt2zQtHZ9mHdAMc1QuNnPZhAWTV5+x0vPWAJeiSFF8 Z30k9nVhrH9hZgHHs9HsiGR8pYvkqBNYqSrn45boixo0liOzjXU+Cedm5 /TT9e4K72ws1/Gt+26Pye/D11PvgB9oCO5/WjRmA3ve3k96KgqWoTlCFQ w==; X-CSE-ConnectionGUID: EIUUdAhaRviYZ6uZq0biVw== X-CSE-MsgGUID: sALxQYC5TMmoYkkrid9D6g== X-IronPort-AV: E=McAfee;i="6800,10657,11744"; a="79772144" X-IronPort-AV: E=Sophos;i="6.23,150,1770624000"; d="scan'208";a="79772144" Received: from orviesa006.jf.intel.com ([10.64.159.146]) by orvoesa106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Mar 2026 14:43:33 -0700 X-CSE-ConnectionGUID: pYlJ3XnnRDmuHyEIN1wK5w== X-CSE-MsgGUID: nofELbRVQJuLhNyKnTUgUg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.23,150,1770624000"; d="scan'208";a="225185942" Received: from spandruv-desk1.amr.corp.intel.com (HELO agluck-desk3.home.arpa) ([10.124.222.186]) by orviesa006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Mar 2026 14:43:32 -0700 From: Tony Luck To: Fenghua Yu , Reinette Chatre , Maciej Wieczor-Retman , Peter Newman , James Morse , Babu Moger , Drew Fustini , Dave Martin , Chen Yu , David E Box , x86@kernel.org Cc: linux-kernel@vger.kernel.org, patches@lists.linux.dev, Tony Luck Subject: [PATCH v4 3/7] fs/resctrl: Add interface to disable a monitor event Date: Mon, 30 Mar 2026 14:43:18 -0700 Message-ID: <20260330214322.96686-4-tony.luck@intel.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260330214322.96686-1-tony.luck@intel.com> References: <20260330214322.96686-1-tony.luck@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: quoted-printable Content-Type: text/plain; charset="utf-8" Architecture code can ask file system code to enable events. But there is no way to clean up and disable events. Add resctrl_disable_mon_event(). Adding/removing events is only possible when the file system is not mounted. Add a WARN_ON() to catch misuse. Signed-off-by: Tony Luck --- include/linux/resctrl.h | 1 + fs/resctrl/monitor.c | 16 ++++++++++++++++ 2 files changed, 17 insertions(+) diff --git a/include/linux/resctrl.h b/include/linux/resctrl.h index 006e57fd7ca5..b312aaf76974 100644 --- a/include/linux/resctrl.h +++ b/include/linux/resctrl.h @@ -416,6 +416,7 @@ int resctrl_arch_update_domains(struct rdt_resource *r,= u32 closid); =20 bool resctrl_enable_mon_event(enum resctrl_event_id eventid, bool any_cpu, unsigned int binary_bits, void *arch_priv); +void resctrl_disable_mon_event(enum resctrl_event_id eventid); =20 bool resctrl_is_mon_event_enabled(enum resctrl_event_id eventid); =20 diff --git a/fs/resctrl/monitor.c b/fs/resctrl/monitor.c index 49f3f6b846b2..50eb5534767c 100644 --- a/fs/resctrl/monitor.c +++ b/fs/resctrl/monitor.c @@ -990,6 +990,8 @@ struct mon_evt mon_event_all[QOS_NUM_EVENTS] =3D { bool resctrl_enable_mon_event(enum resctrl_event_id eventid, bool any_cpu, unsigned int binary_bits, void *arch_priv) { + if (WARN_ON(resctrl_mounted)) + return false; if (WARN_ON_ONCE(eventid < QOS_FIRST_EVENT || eventid >=3D QOS_NUM_EVENTS= || binary_bits > MAX_BINARY_BITS)) return false; @@ -1010,6 +1012,20 @@ bool resctrl_enable_mon_event(enum resctrl_event_id = eventid, bool any_cpu, return true; } =20 +void resctrl_disable_mon_event(enum resctrl_event_id eventid) +{ + if (WARN_ON(resctrl_mounted)) + return; + if (WARN_ON_ONCE(eventid < QOS_FIRST_EVENT || eventid >=3D QOS_NUM_EVENTS= )) + return; + if (!mon_event_all[eventid].enabled) { + pr_warn("Repeat disable for event %d\n", eventid); + return; + } + + mon_event_all[eventid].enabled =3D false; +} + bool resctrl_is_mon_event_enabled(enum resctrl_event_id eventid) { return eventid >=3D QOS_FIRST_EVENT && eventid < QOS_NUM_EVENTS && --=20 2.53.0 From nobody Wed Apr 1 09:43:43 2026 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.14]) (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 301C738425B for ; Mon, 30 Mar 2026 21:43:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.14 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774907016; cv=none; b=lhf0Xb1rZFPbw88QoJ58kBv8E8bACPztdn6p7Je7mPo1OKDqubowF26VCfKvw6HuBMd+JKM5d8Phz5xyeKYvifeW+dCTXUJxltvQMtkTJHPQK8J1Ta5Zyv3chZTDlkBD9ighFjS/PGv3CaTolmw/usEdMkxidVJCoLJKf+RD+kw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774907016; c=relaxed/simple; bh=ZmrW/lnrmraTGrG222FCq68z97lMPh4tb6hecweEEP4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=pGrcr6X39te1RDb1hN/ZreWkzicg8aomlUztzBEd7/1+MnMteztCIbgT7LEWjILXKit+qRVHL5ekOtHaBkXwOrXACajPptwNv64lDNUzHmEf43TO8+yn8KVkTpVkHZ7MWI1SyHPpv9/rXt8rWbEhOE9Ou+ALE0m20AOZfkh7ctk= 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=iKj71Ina; arc=none smtp.client-ip=198.175.65.14 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="iKj71Ina" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1774907014; x=1806443014; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=ZmrW/lnrmraTGrG222FCq68z97lMPh4tb6hecweEEP4=; b=iKj71InaqbFdEomivbFQZ7mFKzYVoGg2BVgQuPKsfWg4qITBEfQLCrG0 EaDHobrsszxXKii7oRZWgeEO3lPSII37Lo0oeue0SQmxEJVHhhkF9YEYb Wy/zr0HHXuIzSQcD5mG0McgPBrXnegYrV43qXqts3QLLuAQN98lKcS+uf x1wbQv8y4HZ5o1KBikanP3Yg8b6m5+1SagsOSiix9m9qtEG7VocopkIc2 9X++R0IpJNphWhyjSMb+wQCKwwub9dI6MdZeSMvTC/BjAv/8Vde6WXmmG CIVE+2aft9L60p8E4V0FE1LKD9zyu0ojm2iidnTmBnuqat2OEM909cde6 Q==; X-CSE-ConnectionGUID: /vFAJGwFTn6vOzX+WGNiZg== X-CSE-MsgGUID: YM2HND86Q12iSZpDenNpsQ== X-IronPort-AV: E=McAfee;i="6800,10657,11744"; a="79772152" X-IronPort-AV: E=Sophos;i="6.23,150,1770624000"; d="scan'208";a="79772152" Received: from orviesa006.jf.intel.com ([10.64.159.146]) by orvoesa106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Mar 2026 14:43:33 -0700 X-CSE-ConnectionGUID: GWFOHd8UQT2V+mDjRssSYw== X-CSE-MsgGUID: PaSeuy4iRaKBwwCGYBT+Aw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.23,150,1770624000"; d="scan'208";a="225185945" Received: from spandruv-desk1.amr.corp.intel.com (HELO agluck-desk3.home.arpa) ([10.124.222.186]) by orviesa006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Mar 2026 14:43:33 -0700 From: Tony Luck To: Fenghua Yu , Reinette Chatre , Maciej Wieczor-Retman , Peter Newman , James Morse , Babu Moger , Drew Fustini , Dave Martin , Chen Yu , David E Box , x86@kernel.org Cc: linux-kernel@vger.kernel.org, patches@lists.linux.dev, Tony Luck Subject: [PATCH v4 4/7] fs,x86/resctrl: Add architecture hooks for every mount/unmount Date: Mon, 30 Mar 2026 14:43:19 -0700 Message-ID: <20260330214322.96686-5-tony.luck@intel.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260330214322.96686-1-tony.luck@intel.com> References: <20260330214322.96686-1-tony.luck@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: quoted-printable Content-Type: text/plain; charset="utf-8" Add hooks for every mount/unmount of the resctrl file system so that architecture code can allocate on mount and free on unmount. Signed-off-by: Tony Luck --- Note this patch disables enumeration of AET monitor events because the new mount/unmount hooks do not call intel_aet_get_events() (which is not ready for the change from "just on first mount" to "called on every mount"). That is resolved in the next patch. include/linux/resctrl.h | 12 +++++-- arch/x86/kernel/cpu/resctrl/internal.h | 8 +++-- arch/x86/kernel/cpu/resctrl/core.c | 14 +++++++- arch/x86/kernel/cpu/resctrl/intel_aet.c | 13 ++++++++ fs/resctrl/rdtgroup.c | 43 ++++++++++++++++++------- 5 files changed, 74 insertions(+), 16 deletions(-) diff --git a/include/linux/resctrl.h b/include/linux/resctrl.h index b312aaf76974..489c7d4ae3e9 100644 --- a/include/linux/resctrl.h +++ b/include/linux/resctrl.h @@ -518,11 +518,19 @@ void resctrl_online_cpu(unsigned int cpu); void resctrl_offline_cpu(unsigned int cpu); =20 /* - * Architecture hook called at beginning of first file system mount attemp= t. - * No locks are held. + * Architecture hooks for resctrl mount/unmount. + * Each is called with resctrl_mount_lock held. */ + +/* Called at beginning of each file system mount attempt. */ void resctrl_arch_pre_mount(void); =20 +/* Called to report success/failure of mount. */ +void resctrl_arch_mount_result(int ret); + +/* Called to report unmount. */ +void resctrl_arch_unmount(void); + /** * resctrl_arch_rmid_read() - Read the eventid counter corresponding to rm= id * for this resource and domain. diff --git a/arch/x86/kernel/cpu/resctrl/internal.h b/arch/x86/kernel/cpu/r= esctrl/internal.h index e3cfa0c10e92..6f322818a9e6 100644 --- a/arch/x86/kernel/cpu/resctrl/internal.h +++ b/arch/x86/kernel/cpu/resctrl/internal.h @@ -234,14 +234,18 @@ void rdt_domain_reconfigure_cdp(struct rdt_resource *= r); void resctrl_arch_mbm_cntr_assign_set_one(struct rdt_resource *r); =20 #ifdef CONFIG_X86_CPU_RESCTRL_INTEL_AET -bool intel_aet_get_events(void); +bool intel_aet_pre_mount(void); +void intel_aet_mount_result(int ret); +void intel_aet_unmount(void); void __exit intel_aet_exit(void); int intel_aet_read_event(int domid, u32 rmid, void *arch_priv, u64 *val); void intel_aet_mon_domain_setup(int cpu, int id, struct rdt_resource *r, struct list_head *add_pos); bool intel_handle_aet_option(bool force_off, char *tok); #else -static inline bool intel_aet_get_events(void) { return false; } +static inline bool intel_aet_pre_mount(void) { return false; } +static inline void intel_aet_mount_result(int ret) { } +static inline void intel_aet_unmount(void) { } static inline void __exit intel_aet_exit(void) { } static inline int intel_aet_read_event(int domid, u32 rmid, void *arch_pri= v, u64 *val) { diff --git a/arch/x86/kernel/cpu/resctrl/core.c b/arch/x86/kernel/cpu/resct= rl/core.c index 7667cf7c4e94..162eca2cfcdb 100644 --- a/arch/x86/kernel/cpu/resctrl/core.c +++ b/arch/x86/kernel/cpu/resctrl/core.c @@ -769,8 +769,10 @@ void resctrl_arch_pre_mount(void) struct rdt_resource *r =3D &rdt_resources_all[RDT_RESOURCE_PERF_PKG].r_re= sctrl; int cpu; =20 - if (!intel_aet_get_events()) + if (!intel_aet_pre_mount()) { + r->mon_capable =3D false; return; + } =20 /* * Late discovery of telemetry events means the domains for the @@ -786,6 +788,16 @@ void resctrl_arch_pre_mount(void) cpus_read_unlock(); } =20 +void resctrl_arch_mount_result(int ret) +{ + intel_aet_mount_result(ret); +} + +void resctrl_arch_unmount(void) +{ + intel_aet_unmount(); +} + enum { RDT_FLAG_CMT, RDT_FLAG_MBM_TOTAL, diff --git a/arch/x86/kernel/cpu/resctrl/intel_aet.c b/arch/x86/kernel/cpu/= resctrl/intel_aet.c index 015627401ed2..743a1894fe9a 100644 --- a/arch/x86/kernel/cpu/resctrl/intel_aet.c +++ b/arch/x86/kernel/cpu/resctrl/intel_aet.c @@ -335,6 +335,19 @@ void __exit intel_aet_exit(void) } } =20 +bool intel_aet_pre_mount(void) +{ + return false; // Temporary stub +} + +void intel_aet_mount_result(int ret) +{ +} + +void intel_aet_unmount(void) +{ +} + #define DATA_VALID BIT_ULL(63) #define DATA_BITS GENMASK_ULL(62, 0) =20 diff --git a/fs/resctrl/rdtgroup.c b/fs/resctrl/rdtgroup.c index 5da305bd36c9..2ce11ae2d2cd 100644 --- a/fs/resctrl/rdtgroup.c +++ b/fs/resctrl/rdtgroup.c @@ -18,7 +18,6 @@ #include #include #include -#include #include #include #include @@ -30,6 +29,9 @@ =20 #include "internal.h" =20 +/* Mutex protecting mount/unmount operations */ +static DEFINE_MUTEX(resctrl_mount_lock); + /* Mutex to protect rdtgroup access. */ DEFINE_MUTEX(rdtgroup_mutex); =20 @@ -2788,17 +2790,8 @@ static int rdt_get_tree(struct fs_context *fc) struct rdt_resource *r; int ret; =20 - DO_ONCE_SLEEPABLE(resctrl_arch_pre_mount); - cpus_read_lock(); mutex_lock(&rdtgroup_mutex); - /* - * resctrl file system can only be mounted once. - */ - if (resctrl_mounted) { - ret =3D -EBUSY; - goto out; - } =20 ret =3D setup_rmid_lru_list(); if (ret) @@ -2900,6 +2893,30 @@ static int rdt_get_tree(struct fs_context *fc) return ret; } =20 +static int rdt_get_tree_wrapper(struct fs_context *fc) +{ + int ret; + + mutex_lock(&resctrl_mount_lock); + + /* + * resctrl file system can only be mounted once. + */ + if (resctrl_mounted) { + mutex_unlock(&resctrl_mount_lock); + return -EBUSY; + } + + resctrl_arch_pre_mount(); + + ret =3D rdt_get_tree(fc); + + resctrl_arch_mount_result(ret); + mutex_unlock(&resctrl_mount_lock); + + return ret; +} + enum rdt_param { Opt_cdp, Opt_cdpl2, @@ -2959,7 +2976,7 @@ static void rdt_fs_context_free(struct fs_context *fc) static const struct fs_context_operations rdt_fs_context_ops =3D { .free =3D rdt_fs_context_free, .parse_param =3D rdt_parse_param, - .get_tree =3D rdt_get_tree, + .get_tree =3D rdt_get_tree_wrapper, }; =20 static int rdt_init_fs_context(struct fs_context *fc) @@ -3169,6 +3186,7 @@ static void rdt_kill_sb(struct super_block *sb) { struct rdt_resource *r; =20 + mutex_lock(&resctrl_mount_lock); cpus_read_lock(); mutex_lock(&rdtgroup_mutex); =20 @@ -3187,6 +3205,9 @@ static void rdt_kill_sb(struct super_block *sb) kernfs_kill_sb(sb); mutex_unlock(&rdtgroup_mutex); cpus_read_unlock(); + + resctrl_arch_unmount(); + mutex_unlock(&resctrl_mount_lock); } =20 static struct file_system_type rdt_fs_type =3D { --=20 2.53.0 From nobody Wed Apr 1 09:43:43 2026 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.14]) (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 4CFFA3A4F48 for ; Mon, 30 Mar 2026 21:43:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.14 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774907016; cv=none; b=cdabPQI6KCUUjYp4ldegm70EwNkeY+s6mnD3LofctqedvepmeF8R3bm1izFeR2LtOmYMIEb/OxxGZ63wTbWi+iU1aaMujj/fEquUU5wZFJh/dmDutjFKiSW/eR8jZS/LwOjXprjJVkxtI27dEcp0NEAhYWHbdNHaKYOrHacfRDc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774907016; c=relaxed/simple; bh=csRUE11ocLzItOsYrwL4+mhKQY6L45tfuJmxgVxembA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=NeytjoslYMvlmN6GFlLzhTtxEJ5mRVre5SHOLE5dQ1EkxRNIzuOVSLaLTY4nu94sTrxiuo3qVo58ZqaGezB94S6UBd9TQ1Djx65wH75qahzc6c0TZBOdq6C/MRIxePnIf5V3MV02k14Rcq3RQYmwysCXOy/61sC47ADKkNlBqKs= 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=E/2VC0VV; arc=none smtp.client-ip=198.175.65.14 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="E/2VC0VV" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1774907015; x=1806443015; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=csRUE11ocLzItOsYrwL4+mhKQY6L45tfuJmxgVxembA=; b=E/2VC0VVF3+9v1m5zCW6gMyYMZfALJu+oqJc8SX4R4nmXZEZx3ltRa8Z pq1e1N6Sj3jLLbhsd359kHAIxzZamsjJ2KO7mVbJH1hPWvkdv0j6CxkWz /FfVG6lFBCQTUnKEGZHfDSoJVyMeTzysuomvwYu7LR/XQlRnrosqxv1XQ O0pGS8uSES7ITnTBB1i1aSmKg+fxgXIvhzza15XfSrocIBhXtXVmgCPM1 LHnpAYKeQPpKbyLf3vqCNihox4ZTqSiAvHBUUKIefHoHSh7JvTrg1XnEf aaUvg+9n1YBUc7oXI210aowPQjqEN8jldBFTGq+waCzu/zYwwqlaLezLf A==; X-CSE-ConnectionGUID: hH08CyN3QAyQwpg7OAbhAg== X-CSE-MsgGUID: /qsp/YGQRLGX13FKAhtSHg== X-IronPort-AV: E=McAfee;i="6800,10657,11744"; a="79772162" X-IronPort-AV: E=Sophos;i="6.23,150,1770624000"; d="scan'208";a="79772162" Received: from orviesa006.jf.intel.com ([10.64.159.146]) by orvoesa106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Mar 2026 14:43:34 -0700 X-CSE-ConnectionGUID: LD3UUsamSYeV2fttorrRdQ== X-CSE-MsgGUID: d6lmtt29QBqNb7sCQRidYg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.23,150,1770624000"; d="scan'208";a="225185948" Received: from spandruv-desk1.amr.corp.intel.com (HELO agluck-desk3.home.arpa) ([10.124.222.186]) by orviesa006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Mar 2026 14:43:33 -0700 From: Tony Luck To: Fenghua Yu , Reinette Chatre , Maciej Wieczor-Retman , Peter Newman , James Morse , Babu Moger , Drew Fustini , Dave Martin , Chen Yu , David E Box , x86@kernel.org Cc: linux-kernel@vger.kernel.org, patches@lists.linux.dev, Tony Luck Subject: [PATCH v4 5/7] x86/resctrl: Resolve PMT and TPMI symbols at runtime Date: Mon, 30 Mar 2026 14:43:20 -0700 Message-ID: <20260330214322.96686-6-tony.luck@intel.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260330214322.96686-1-tony.luck@intel.com> References: <20260330214322.96686-1-tony.luck@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: quoted-printable Content-Type: text/plain; charset="utf-8" The resctrl subsystem is always built-in. Currently, it has a direct dependency on INTEL_PMT_TELEMETRY and INTEL_TPMI for Application Event Telemetry (AET) features. This forces these drivers to be built-in as well, even though they are logically separate. Switch to using symbol_request() to resolve AET-related symbols at runtime. This allows PMT and TPMI to be built as loadable modules. Update the mount/unmount logic to manage these references: - Acquire symbol references and pin the modules during resctrl mount. - Ensure AET structures are cleaned up and events disabled on unmount. - Release symbol references and unpin modules on unmount or if mounting fails. Signed-off-by: Tony Luck --- arch/x86/kernel/cpu/resctrl/intel_aet.c | 93 ++++++++++++++++++++++--- 1 file changed, 83 insertions(+), 10 deletions(-) diff --git a/arch/x86/kernel/cpu/resctrl/intel_aet.c b/arch/x86/kernel/cpu/= resctrl/intel_aet.c index 743a1894fe9a..14b472106f52 100644 --- a/arch/x86/kernel/cpu/resctrl/intel_aet.c +++ b/arch/x86/kernel/cpu/resctrl/intel_aet.c @@ -23,6 +23,7 @@ #include #include #include +#include #include #include #include @@ -289,6 +290,9 @@ static enum pmt_feature_id lookup_pfid(const char *pfna= me) return FEATURE_INVALID; } =20 +static struct pmt_feature_group *(*get_feature)(enum pmt_feature_id id); +static void (*put_feature)(struct pmt_feature_group *p); + /* * Request a copy of struct pmt_feature_group for each event group. If the= re is * one, the returned structure has an array of telemetry_region structures, @@ -300,7 +304,7 @@ static enum pmt_feature_id lookup_pfid(const char *pfna= me) * struct pmt_feature_group to indicate that its events are successfully * enabled. */ -bool intel_aet_get_events(void) +static bool aet_get_events(void) { struct pmt_feature_group *p; enum pmt_feature_id pfid; @@ -309,14 +313,14 @@ bool intel_aet_get_events(void) =20 for_each_event_group(peg) { pfid =3D lookup_pfid((*peg)->pfname); - p =3D intel_pmt_get_regions_by_feature(pfid); + p =3D get_feature(pfid); if (IS_ERR_OR_NULL(p)) continue; if (enable_events(*peg, p)) { (*peg)->pfg =3D p; ret =3D true; } else { - intel_pmt_put_feature_group(p); + put_feature(p); } } =20 @@ -325,27 +329,96 @@ bool intel_aet_get_events(void) =20 void __exit intel_aet_exit(void) { - struct event_group **peg; +} =20 - for_each_event_group(peg) { - if ((*peg)->pfg) { - intel_pmt_put_feature_group((*peg)->pfg); - (*peg)->pfg =3D NULL; - } +static bool get_pmt_references(void) +{ + get_feature =3D symbol_request(intel_pmt_get_regions_by_feature); + if (!get_feature) + return false; + put_feature =3D symbol_request(intel_pmt_put_feature_group); + if (!put_feature) { + symbol_put(intel_pmt_get_regions_by_feature); + get_feature =3D NULL; + return false; + } + + return true; +} + +static void put_pmt_references(void) +{ + if (get_feature) { + symbol_put(intel_pmt_get_regions_by_feature); + get_feature =3D NULL; + } + if (put_feature) { + symbol_put(intel_pmt_put_feature_group); + put_feature =3D NULL; } } =20 +static enum { + AET_UNINITIALIZED, + AET_PRESENT, + AET_NOT_PRESENT +} aet_state; + bool intel_aet_pre_mount(void) { - return false; // Temporary stub + bool ret; + + if (aet_state =3D=3D AET_PRESENT) + return true; + + if (aet_state =3D=3D AET_NOT_PRESENT || !get_pmt_references()) + return false; + + ret =3D aet_get_events(); + + if (ret) { + aet_state =3D AET_PRESENT; + } else { + aet_state =3D AET_NOT_PRESENT; + put_pmt_references(); + } + + return ret; +} + +static void aet_cleanup(void) +{ + struct event_group **peg; + + if (aet_state =3D=3D AET_PRESENT) { + for_each_event_group(peg) { + if ((*peg)->pfg) { + struct event_group *e =3D *peg; + + for (int j =3D 0; j < e->num_events; j++) + resctrl_disable_mon_event(e->evts[j].id); + put_feature((*peg)->pfg); + (*peg)->pfg =3D NULL; + } + } + put_pmt_references(); + aet_state =3D AET_UNINITIALIZED; + } } =20 void intel_aet_mount_result(int ret) { + struct rdt_resource *r =3D &rdt_resources_all[RDT_RESOURCE_PERF_PKG].r_re= sctrl; + + if (ret) { + r->mon_capable =3D false; + aet_cleanup(); + } } =20 void intel_aet_unmount(void) { + aet_cleanup(); } =20 #define DATA_VALID BIT_ULL(63) --=20 2.53.0 From nobody Wed Apr 1 09:43:43 2026 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.14]) (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 337B03A4F2F for ; Mon, 30 Mar 2026 21:43:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.14 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774907017; cv=none; b=npIVvauxcBA+hmQNmHP/6p4MbdBB1doBWKrZdFoZQpYUN0qNfqDsaDnd3ujaSf8DtmYyhIsn7oKVHcWZTgkiMp4V/fn+odjXcDZxFyxR1tBqMqtWRAiSx+rUuA1nABrVfCnzjMFgbHDKHK4/SMAsUT8dp4jUhWeyw6/3saB4JAI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774907017; c=relaxed/simple; bh=xtE44q2ZzCMv7I6kbznslRjiV+xZN4F/4mn+Kkwu6zc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=TdcmMDlpstTZ5bP1UgSv5BZSy2PaP6z8Qp3F4lypTrmylO5fNjPAs1lvV/TJW4UreA0glfG1lGe172Ebil/VYwenG08UDysOXsQm85Jr2DCLH+JiP7uZn5NxiFS6eypHNQ47To/8KZpe/WOB0Y5Y+kmnW71qohKsrpva7l4CfYA= 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=gp7mJySp; arc=none smtp.client-ip=198.175.65.14 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="gp7mJySp" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1774907016; x=1806443016; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=xtE44q2ZzCMv7I6kbznslRjiV+xZN4F/4mn+Kkwu6zc=; b=gp7mJySpTxJU9zQBaGYKGvzX2F8U8z8gvIMA6GkXg+lCAqb4zYpzKLQr qHOCdVEvqtrSZVqmGb0BCz8gDuTsVBqjjv7RvLbBKvII9cbPKvSc6DPrO TrR3YKfVj/7tuSWPaZy9Em7Hmys1hoTBAbzD83QRyVev4kOUrxSs1gFxa WPveHpfryNHTwSMMeOnmDAIhkk21nGJqSIGGRDfTD7xdJ+2THKHyDHOUS Pq6iMBZD+ZPLVOQd3h2oUSQY4ZYdibHz3wqpDWf4eR1ht+NH0nufS6VeW V3a0mRev189jBe7438fgCK3TmgoBJATOYhglixHneQWQeOy9wDsPfd04f Q==; X-CSE-ConnectionGUID: N9ulZOfnQQCTxt38MRkBiA== X-CSE-MsgGUID: Yky/VHQjSLyRXrZZW7prmw== X-IronPort-AV: E=McAfee;i="6800,10657,11744"; a="79772170" X-IronPort-AV: E=Sophos;i="6.23,150,1770624000"; d="scan'208";a="79772170" Received: from orviesa006.jf.intel.com ([10.64.159.146]) by orvoesa106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Mar 2026 14:43:34 -0700 X-CSE-ConnectionGUID: 5EY3sljkSMi0YeWwcu5PXQ== X-CSE-MsgGUID: n5e0aSZKRxeD11wK7lqG4Q== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.23,150,1770624000"; d="scan'208";a="225185952" Received: from spandruv-desk1.amr.corp.intel.com (HELO agluck-desk3.home.arpa) ([10.124.222.186]) by orviesa006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Mar 2026 14:43:34 -0700 From: Tony Luck To: Fenghua Yu , Reinette Chatre , Maciej Wieczor-Retman , Peter Newman , James Morse , Babu Moger , Drew Fustini , Dave Martin , Chen Yu , David E Box , x86@kernel.org Cc: linux-kernel@vger.kernel.org, patches@lists.linux.dev, Tony Luck Subject: [PATCH v4 6/7] x86/resctrl: Delete intel_aet_exit() Date: Mon, 30 Mar 2026 14:43:21 -0700 Message-ID: <20260330214322.96686-7-tony.luck@intel.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260330214322.96686-1-tony.luck@intel.com> References: <20260330214322.96686-1-tony.luck@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: quoted-printable Content-Type: text/plain; charset="utf-8" All cleanup for AET is now handled during file system unmount. Drop intel_aet_exit(). Signed-off-by: Tony Luck --- arch/x86/kernel/cpu/resctrl/internal.h | 2 -- arch/x86/kernel/cpu/resctrl/core.c | 2 -- arch/x86/kernel/cpu/resctrl/intel_aet.c | 4 ---- 3 files changed, 8 deletions(-) diff --git a/arch/x86/kernel/cpu/resctrl/internal.h b/arch/x86/kernel/cpu/r= esctrl/internal.h index 6f322818a9e6..2230b64fa2ba 100644 --- a/arch/x86/kernel/cpu/resctrl/internal.h +++ b/arch/x86/kernel/cpu/resctrl/internal.h @@ -237,7 +237,6 @@ void resctrl_arch_mbm_cntr_assign_set_one(struct rdt_re= source *r); bool intel_aet_pre_mount(void); void intel_aet_mount_result(int ret); void intel_aet_unmount(void); -void __exit intel_aet_exit(void); int intel_aet_read_event(int domid, u32 rmid, void *arch_priv, u64 *val); void intel_aet_mon_domain_setup(int cpu, int id, struct rdt_resource *r, struct list_head *add_pos); @@ -246,7 +245,6 @@ bool intel_handle_aet_option(bool force_off, char *tok); static inline bool intel_aet_pre_mount(void) { return false; } static inline void intel_aet_mount_result(int ret) { } static inline void intel_aet_unmount(void) { } -static inline void __exit intel_aet_exit(void) { } static inline int intel_aet_read_event(int domid, u32 rmid, void *arch_pri= v, u64 *val) { return -EINVAL; diff --git a/arch/x86/kernel/cpu/resctrl/core.c b/arch/x86/kernel/cpu/resct= rl/core.c index 162eca2cfcdb..1951df519dea 100644 --- a/arch/x86/kernel/cpu/resctrl/core.c +++ b/arch/x86/kernel/cpu/resctrl/core.c @@ -1172,8 +1172,6 @@ late_initcall(resctrl_arch_late_init); =20 static void __exit resctrl_arch_exit(void) { - intel_aet_exit(); - cpuhp_remove_state(rdt_online); =20 resctrl_exit(); diff --git a/arch/x86/kernel/cpu/resctrl/intel_aet.c b/arch/x86/kernel/cpu/= resctrl/intel_aet.c index 14b472106f52..b708c94a4a83 100644 --- a/arch/x86/kernel/cpu/resctrl/intel_aet.c +++ b/arch/x86/kernel/cpu/resctrl/intel_aet.c @@ -327,10 +327,6 @@ static bool aet_get_events(void) return ret; } =20 -void __exit intel_aet_exit(void) -{ -} - static bool get_pmt_references(void) { get_feature =3D symbol_request(intel_pmt_get_regions_by_feature); --=20 2.53.0 From nobody Wed Apr 1 09:43:43 2026 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.14]) (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 7AD413A641B for ; Mon, 30 Mar 2026 21:43:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.14 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774907017; cv=none; b=Y0+XMcYxj6kJ1kckMFbjcAnpg/YLr5VOcpyzIjh4mHIpVtezhrC8GelVGdJusB3ShbcP60mDLVbrsXE7aCeCneeH2ZlYOc4rVbm3GzIq3JHjMcUpO773uvZ6EOK+wcFQtphSMBW3aj3kdkKnCXsKhjw3e8+EC6u6XAynoCA5xjk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774907017; c=relaxed/simple; bh=p1P+ZN8u2jBEwcuU+cz9O1GwBYuc8jFJvKjGneOz9qA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=OHH7zX7RfIvo1TcCHsTU12NqzR+ZUeva4Xsme63kYQoTtx5suxhGuuZWZSDwx56DOxnPdwqRO/kgnZShcgwch/bWa2X2CJUHe0Ji90HwTl8X8VvaDz3+UALUuYjT7ogRu35zue4QreHVVuJOqQLBSuUFlcPxp2mXK5mCMq7UcaE= 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=UhF7v8cv; arc=none smtp.client-ip=198.175.65.14 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="UhF7v8cv" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1774907017; x=1806443017; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=p1P+ZN8u2jBEwcuU+cz9O1GwBYuc8jFJvKjGneOz9qA=; b=UhF7v8cv9e4TBs6G4JEDdN81Jqu0rCHmQRvAct4yN3N2078H8fJDEAS5 8GQQoVtlre1D/eR39s9GYFGC1pFAbqQl2JXe45bdG8w3F+SRY3Oc9rDLp Q0AeI2gsZsjpqUpjZqoCaUsk+I22oCXvn0iQKTrOFRImcBBE380zBqKxk dqA3lYQUsBmLZAg2UAlh57tiv84KMiq7hi+ixnA78cRi3/l1YPwDdPIdX lV3+A+7YvfsvwGD7gBWJHjuAglH1n8F4afdJjeAITh5l1mWO8LPr8NXZ1 e0n+v+w+aTHG27LhMo1lSsv4neI+8/41AdWPGgypGiyusleh963aC6HqP Q==; X-CSE-ConnectionGUID: cu3dFzNhRiG2/RldlDJoRQ== X-CSE-MsgGUID: cy+W+vCwSZOs5ociipal1A== X-IronPort-AV: E=McAfee;i="6800,10657,11744"; a="79772178" X-IronPort-AV: E=Sophos;i="6.23,150,1770624000"; d="scan'208";a="79772178" Received: from orviesa006.jf.intel.com ([10.64.159.146]) by orvoesa106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Mar 2026 14:43:35 -0700 X-CSE-ConnectionGUID: TZExhEX2QB2qJncrOL0Jmw== X-CSE-MsgGUID: 2RfCne/uRi6uMvJE6GACxQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.23,150,1770624000"; d="scan'208";a="225185956" Received: from spandruv-desk1.amr.corp.intel.com (HELO agluck-desk3.home.arpa) ([10.124.222.186]) by orviesa006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Mar 2026 14:43:35 -0700 From: Tony Luck To: Fenghua Yu , Reinette Chatre , Maciej Wieczor-Retman , Peter Newman , James Morse , Babu Moger , Drew Fustini , Dave Martin , Chen Yu , David E Box , x86@kernel.org Cc: linux-kernel@vger.kernel.org, patches@lists.linux.dev, Tony Luck Subject: [PATCH v4 7/7] x86/resctrl: Downgrade dependency of AET on INTEL_PMT Date: Mon, 30 Mar 2026 14:43:22 -0700 Message-ID: <20260330214322.96686-8-tony.luck@intel.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260330214322.96686-1-tony.luck@intel.com> References: <20260330214322.96686-1-tony.luck@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: quoted-printable Content-Type: text/plain; charset="utf-8" The INTEL_AET code now using symbol_get() to access the INTEL_PMT enumeration functions so no requirement that they be built-in to the base kernel. Update the Kconfig dependencies. Signed-off-by: Tony Luck --- arch/x86/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index e2df1b147184..1a60da62da33 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -542,7 +542,7 @@ config X86_CPU_RESCTRL =20 config X86_CPU_RESCTRL_INTEL_AET bool "Intel Application Energy Telemetry" - depends on X86_64 && X86_CPU_RESCTRL && CPU_SUP_INTEL && INTEL_PMT_TELEME= TRY=3Dy && INTEL_TPMI=3Dy + depends on X86_64 && X86_CPU_RESCTRL && CPU_SUP_INTEL && INTEL_PMT_TELEME= TRY !=3D n && INTEL_TPMI !=3D n help Enable per-RMID telemetry events in resctrl. =20 --=20 2.53.0