From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2260A306B21 for ; Wed, 25 Feb 2026 20:19:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772050767; cv=none; b=KGPFXp/TE/L8Ii+BA31q2fMVDnQOceOp1lYHIiYCURN8EqgGkHdq4T7GziqtfV/yim7yIThTGDLfEJdXN31Y9bO+h97jFyBCzPaJEvdBlOWI1c6jDycZDz4YHSqqPgzbi95OoznUjppg/rifIpG+/rZEl9hfFdfYdPTvvxYo5a0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772050767; c=relaxed/simple; bh=JrmCt2XWTUBODCwHeagg1gPs+v2mhjzrwujZON0gDmM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=TbSNE1YNOMuIq3dWOGYpbcnLdy8dqLSVopN/sVL+XWCoMEUK8SO1gJ6aw7msf5zOxRMB08tBTEtbetWwtTsoTopoUx9DaF124L4f+APm+6bBXsTlnLoEF4G+oFLMfo7PQRIVhKJROfsDFC2iWEc59u1FDlqcTXRvi2rcOG9V4M8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 4E47D1650; Wed, 25 Feb 2026 12:19:17 -0800 (PST) Received: from e134344.cambridge.arm.com (e134344.arm.com [10.1.196.46]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 718423F73B; Wed, 25 Feb 2026 12:19:21 -0800 (PST) From: Ben Horgan To: linux-kernel@vger.kernel.org Cc: tony.luck@intel.com, reinette.chatre@intel.com, Dave.Martin@arm.com, james.morse@arm.com, babu.moger@amd.com, tglx@kernel.org, mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com, x86@kernel.org, hpa@zytor.com, ben.horgan@arm.com, fenghuay@nvidia.com, tan.shaopeng@fujitsu.com Subject: [PATCH v1 2/4] fs/resctrl: Only show 'event_filter' files if events are configurable Date: Wed, 25 Feb 2026 20:19:03 +0000 Message-ID: <20260225201905.3568624-3-ben.horgan@arm.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260225201905.3568624-1-ben.horgan@arm.com> References: <20260225201905.3568624-1-ben.horgan@arm.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 When the counter assignment mode is mbm_event resctrl assumes the mbm events are configurable and exposes the 'event_filter' files. These files live at info/L3_MON/event_configs//event_filter and are used to display and set the event configuration. ABMC always supports event configuration but for MPAM they are independent. Decouple event configuration from counter assignment by only showing the 'event_filter' interface when event configuration is supported at the same time as 'mbm_event' counter assignment. Remove only the 'event_filter' files and not the containing directories so that their names can still be used to identify the assignable counters. Signed-off-by: Ben Horgan --- fs/resctrl/rdtgroup.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fs/resctrl/rdtgroup.c b/fs/resctrl/rdtgroup.c index 5da305bd36c9..e79929d84317 100644 --- a/fs/resctrl/rdtgroup.c +++ b/fs/resctrl/rdtgroup.c @@ -2338,6 +2338,9 @@ static int resctrl_mkdir_event_configs(struct rdt_resource *r, struct kernfs_nod if (ret) goto out; + if (!resctrl_arch_is_evt_configurable(mevt->evtid, true)) + continue; + ret = rdtgroup_add_files(kn_subdir2, RFTYPE_ASSIGN_CONFIG); if (ret) break; -- 2.43.0