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 D477437C10C for ; Thu, 15 Jan 2026 11:41:12 +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=1768477277; cv=none; b=J+A1qTZ+UbBN/y5128WyS9LNkMFozp3SlbzicwVRrX9ablhL/3KOuVx+zVB9mv3MnUvk8oDYeDbvAV1b3ybyOxFHHhkj14Q/MHd35BZh5jszHvawSMqf3ScIPmh0EL0iK/8+ctan0eA+EMykMExT3nPYCUeMCYYatCPihjP2rtQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768477277; c=relaxed/simple; bh=0goHy5vM/uTle37kZZMNlT7pelFgbdQ6vjIhGUc+R0s=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=hsVoZxTefmanvrxXQGM0k58vsjp3gb8XCaIqO9tnX7paGvBGi1hgpBmkARWoDBE8GA8tsw14EcVGtp21rvaabfTV0Sam4hMgij0KoADhGFis8Wdj7//8Fi+eJNva46swu1mgg7Jbm2PbTr603znC5ighjLG0LS0KsXR3W+RxjCg= 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 AFC7D1515; Thu, 15 Jan 2026 03:41:05 -0800 (PST) Received: from [10.1.196.46] (e134344.arm.com [10.1.196.46]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 1A2A93F694; Thu, 15 Jan 2026 03:41:10 -0800 (PST) Message-ID: Date: Thu, 15 Jan 2026 11:41:09 +0000 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v1] fs/resctrl: Add missing kconfig entry for CONFIG_RESCTRL_ASSIGN_FIXED To: Babu Moger , 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 References: <20260113144952.47706-1-ben.horgan@arm.com> From: Ben Horgan Content-Language: en-US In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Hi Babu, On 1/13/26 19:10, Babu Moger wrote: > Hi Ben, > > On 1/13/26 08:49, Ben Horgan wrote: >> 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. > Add this -> Add the missing configuration option  or Add the missing > Kconfig option. ? I'll update the commit message to make it clearer that the change is adding a Kconfig option that was previously intentionally left undefined. (As per Reinette's review comments.) >> >> 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 > > assign mode -> counter assignment mode Ack. > > >> specific code and let the user know by adding a message in >> last_cmd_status. >> >> Fixes: 3b497c3f4f04 ("fs/resctrl: Introduce the interface to display >> monitoring 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, >>         rdt_last_cmd_clear(); >>   +    if (IS_ENABLED(CONFIG_RESCTRL_ASSIGN_FIXED)) { >> +        ret = -EINVAL; >> +        rdt_last_cmd_puts("assign mode is not configurable\n"); > > assign mode -> counter assignment mode Ack > > >> +        goto out_unlock; >> +    } >> + >>       if (!strcmp(buf, "default")) { >>           enable = 0; >>       } else if (!strcmp(buf, "mbm_event")) { Thanks, Ben