From nobody Sun Feb 8 11:59:19 2026 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DCF712C0269 for ; Tue, 13 Jan 2026 14:50:05 +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=1768315807; cv=none; b=uuuy/x+v6Yavk5m4xXcGCSpJh6L8CdZh//mHNjynp0b84jtt6R6KYmSN02K4jU1+r+6rTO5tUIh/4erq15j9sE6V33PpCZh66YGLs50pz3bux4/65NX8JsBXUaaJ8uNAYarVw1lnqFZPQSY4H9k0yctjO2vbcbO271Bzh8qLqqg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768315807; c=relaxed/simple; bh=GAejvYV+0hgDGzocfAsKkRZRMlSLfcWWnJGq62sSEu4=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=pyt+wORKCuL/Fc5hcMZUlbTDPehvk7NNbjGwHj0G6i1bmS5FZEjU2UAAofE8ck/YhMUin3GlC7fuPVdDrBh6g/8MTSC/2worgUW1NpOJnN6sT2OaABaImqX5gpW6YFasXeskLxY6igcQWKukZhLzEs7nqq9fsf3Z5YAeBbsL0SA= 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 7813D497; Tue, 13 Jan 2026 06:49:58 -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 BD2603F59E; Tue, 13 Jan 2026 06:50:03 -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, bp@alien8.de, Ben Horgan Subject: [PATCH v1] fs/resctrl: Add missing kconfig entry for CONFIG_RESCTRL_ASSIGN_FIXED Date: Tue, 13 Jan 2026 14:49:52 +0000 Message-ID: <20260113144952.47706-1-ben.horgan@arm.com> X-Mailer: git-send-email 2.43.0 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 commit 3b497c3f4f04 ("fs/resctrl: Introduce the interface to display monitoring modes") introduced CONFIG_RESCTRL_ASSIGN_FIXED but did not add the kconfig entry. Add this. Also, take the opportunity ensure that any user attempt to change the assign mode fails from the resctrl code rather than delegating to the arch specific code and let the user know by adding a message in last_cmd_status. Fixes: 3b497c3f4f04 ("fs/resctrl: Introduce the interface to display monito= ring modes") Signed-off-by: Ben Horgan --- fs/resctrl/Kconfig | 8 ++++++++ fs/resctrl/monitor.c | 6 ++++++ 2 files changed, 14 insertions(+) diff --git a/fs/resctrl/Kconfig b/fs/resctrl/Kconfig index 21671301bd8a..bdf9e11502fa 100644 --- a/fs/resctrl/Kconfig +++ b/fs/resctrl/Kconfig @@ -37,3 +37,11 @@ config RESCTRL_RMID_DEPENDS_ON_CLOSID Enabled by the architecture when the RMID values depend on the CLOSID. This causes the CLOSID allocator to search for CLOSID with clean RMID. + +config RESCTRL_ASSIGN_FIXED + bool + depends on RESCTRL_FS + help + Enabled by the architecture when the counter assignment mode is not + configurable. This ensures that counter assignment is not advertised as + configurable and configuration attempts fail. diff --git a/fs/resctrl/monitor.c b/fs/resctrl/monitor.c index 572a9925bd6c..888e303c18a2 100644 --- a/fs/resctrl/monitor.c +++ b/fs/resctrl/monitor.c @@ -1434,6 +1434,12 @@ ssize_t resctrl_mbm_assign_mode_write(struct kernfs_= open_file *of, char *buf, =20 rdt_last_cmd_clear(); =20 + if (IS_ENABLED(CONFIG_RESCTRL_ASSIGN_FIXED)) { + ret =3D -EINVAL; + rdt_last_cmd_puts("assign mode is not configurable\n"); + goto out_unlock; + } + if (!strcmp(buf, "default")) { enable =3D 0; } else if (!strcmp(buf, "mbm_event")) { --=20 2.43.0