From nobody Mon Feb 9 15:32:51 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 DDBBB134AC for ; Wed, 21 May 2025 22:51:00 +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=1747867862; cv=none; b=c6IZ3sUbn6xsD0g7NKwQ/BPIeaxFp73v/PA7H2Glpfy6Honv7NcTatbyP3Y9FMjYPQf0IXOL7isfjuFYK4PvR/o8rnlsA71ZUACH0RoL07YZIFA58x+LG4dozxpB9FRaj+dStZ66sdMkzn4cmWsx+UTDRS3H8q7DL0dOQn/aG0k= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1747867862; c=relaxed/simple; bh=IVy4LhDAZM5Nxy/pPdww1lQYsqOkYwzTZTnTQf1NwTM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=aS1rgS6flD7Wnk2X+d1OAMG+UftDRCYPTjPEr8akGLvruSxdFIcnHOsXgmwFbK28yEIBaIPmdjINlpHr7Uvs12Ro04uxROPjinO8i11plrxy8m1SCWlFmujLuuWqFnoJ8Z6KjDJ8h6q2FPG9kJP6OA/t5bH9PAoOANLsNvPoCF0= 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=VHWBMNNG; 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="VHWBMNNG" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1747867861; x=1779403861; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=IVy4LhDAZM5Nxy/pPdww1lQYsqOkYwzTZTnTQf1NwTM=; b=VHWBMNNGUK//VMG0ah140w5m+vgo5Tp55yQnDBhWIJwMXNWHZLImo52+ +NpJ5dcFYNQ9aVx8auWtHXA4CMBM14PlbVt7pEmJ581N5u8dgVha+FzK5 tq58PRn+6gEoBYu57L9OKt/Oc3K3TP3Qe6xxlzPTiaq7YpcYPyN2BpKnP T+UAcFUfpIzyjNruPZXY81iUrKCjbb8VS9ONFdAU/f09uA4IFM3pCM4Ra IF1JcBFDe4wMfXn0pp/U+NMDaPTmsPCjeB/Hac/rASBz+ATR9zhxz6VHl wJ+IYugN3H/wHcw0/TzKNPUsACIBBe+ObdTaiqo2WajHv/owR5nQwzSeu Q==; X-CSE-ConnectionGUID: g24lcoQBRPKA7WodIuZPPg== X-CSE-MsgGUID: XwWa6ZZ5RGKxRYtDJjf5jA== X-IronPort-AV: E=McAfee;i="6700,10204,11440"; a="53677622" X-IronPort-AV: E=Sophos;i="6.15,304,1739865600"; d="scan'208";a="53677622" Received: from fmviesa009.fm.intel.com ([10.60.135.149]) by orvoesa106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 May 2025 15:50:57 -0700 X-CSE-ConnectionGUID: Iw9HxtXpReKbTAMpGKTWqw== X-CSE-MsgGUID: 3AcI84ZHSZy3N/Ce6wn3vQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.15,304,1739865600"; d="scan'208";a="141352129" Received: from agluck-desk3.sc.intel.com ([172.25.103.51]) by fmviesa009-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 May 2025 15:50:56 -0700 From: Tony Luck To: Fenghua Yu , Reinette Chatre , Maciej Wieczor-Retman , Peter Newman , James Morse , Babu Moger , Drew Fustini , Dave Martin , Anil Keshavamurthy , Chen Yu Cc: x86@kernel.org, linux-kernel@vger.kernel.org, patches@lists.linux.dev, Tony Luck Subject: [PATCH v5 03/29] x86/resctrl: Remove 'rdt_mon_features' global variable Date: Wed, 21 May 2025 15:50:21 -0700 Message-ID: <20250521225049.132551-4-tony.luck@intel.com> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250521225049.132551-1-tony.luck@intel.com> References: <20250521225049.132551-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" This variable was used as a bitmask of enabled monitor events. But that function is now provided by the filesystem mon_event_all[] array. Remove the remaining uses of this variable. Signed-off-by: Tony Luck --- arch/x86/include/asm/resctrl.h | 1 - arch/x86/kernel/cpu/resctrl/core.c | 9 +++++---- arch/x86/kernel/cpu/resctrl/monitor.c | 5 ----- 3 files changed, 5 insertions(+), 10 deletions(-) diff --git a/arch/x86/include/asm/resctrl.h b/arch/x86/include/asm/resctrl.h index 9c889f51b7f1..089742970cc1 100644 --- a/arch/x86/include/asm/resctrl.h +++ b/arch/x86/include/asm/resctrl.h @@ -42,7 +42,6 @@ DECLARE_PER_CPU(struct resctrl_pqr_state, pqr_state); =20 extern bool rdt_alloc_capable; extern bool rdt_mon_capable; -extern unsigned int rdt_mon_features; =20 DECLARE_STATIC_KEY_FALSE(rdt_enable_key); DECLARE_STATIC_KEY_FALSE(rdt_alloc_enable_key); diff --git a/arch/x86/kernel/cpu/resctrl/core.c b/arch/x86/kernel/cpu/resct= rl/core.c index f4f4c1d42710..819bc7a09327 100644 --- a/arch/x86/kernel/cpu/resctrl/core.c +++ b/arch/x86/kernel/cpu/resctrl/core.c @@ -860,21 +860,22 @@ static __init bool get_rdt_alloc_resources(void) static __init bool get_rdt_mon_resources(void) { struct rdt_resource *r =3D &rdt_resources_all[RDT_RESOURCE_L3].r_resctrl; + bool ret =3D false; =20 if (rdt_cpu_has(X86_FEATURE_CQM_OCCUP_LLC)) { resctrl_enable_mon_event(QOS_L3_OCCUP_EVENT_ID); - rdt_mon_features |=3D (1 << QOS_L3_OCCUP_EVENT_ID); + ret =3D true; } if (rdt_cpu_has(X86_FEATURE_CQM_MBM_TOTAL)) { resctrl_enable_mon_event(QOS_L3_MBM_TOTAL_EVENT_ID); - rdt_mon_features |=3D (1 << QOS_L3_MBM_TOTAL_EVENT_ID); + ret =3D true; } if (rdt_cpu_has(X86_FEATURE_CQM_MBM_LOCAL)) { resctrl_enable_mon_event(QOS_L3_MBM_LOCAL_EVENT_ID); - rdt_mon_features |=3D (1 << QOS_L3_MBM_LOCAL_EVENT_ID); + ret =3D true; } =20 - if (!rdt_mon_features) + if (!ret) return false; =20 return !rdt_get_mon_l3_config(r); diff --git a/arch/x86/kernel/cpu/resctrl/monitor.c b/arch/x86/kernel/cpu/re= sctrl/monitor.c index a1296ee7d508..fda579251dba 100644 --- a/arch/x86/kernel/cpu/resctrl/monitor.c +++ b/arch/x86/kernel/cpu/resctrl/monitor.c @@ -30,11 +30,6 @@ */ bool rdt_mon_capable; =20 -/* - * Global to indicate which monitoring events are enabled. - */ -unsigned int rdt_mon_features; - #define CF(cf) ((unsigned long)(1048576 * (cf) + 0.5)) =20 static int snc_nodes_per_l3_cache =3D 1; --=20 2.49.0