From: Andre Przywara <andre.przywara@arm.com>
To: stable@vger.kernel.org
Cc: Ben Horgan <ben.horgan@arm.com>,
James Morse <james.morse@arm.com>,
Reinette Chatre <reinette.chatre@intel.com>,
Fenghua Yu <fenghuay@nvidia.com>, Sasha Levin <sashal@kernel.org>,
linux-kernel@vger.kernel.org
Subject: [PATCH 7.3.y] arm_mpam: On saving mbwu state read the monitors before clearing CFG_MBWU_CTL
Date: Thu, 19 Nov 2026 16:19:31 +0100 [thread overview]
Message-ID: <20261119151931.335561-1-andre.przywara@arm.com> (raw)
From: Ben Horgan <ben.horgan@arm.com>
commit 197a7a41e6e006916fe68c952e96d768933104fe upstream
In mpam_save_mbwu_state() the monitor values are read using
__ris_msmon_read_locked() which checks if the configuration provided
matches that in the hardware and if not then resets the monitor. To avoid
resetting the monitor before reading the value that needs saving only clear
the configuration after the monitor is read.
Fixes: d056d29aefbe ("arm_mpam: Use __ris_msmon_read() for saving MBWU state")
Signed-off-by: Ben Horgan <ben.horgan@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
[backport: drop error returns, adjust to changed context]
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
---
Hi,
this is the backport version of this patch for v7.3, as discussed on the
list before. This avoids backporting two lengthy patches that do not
make any sense for v7.3 (introduction of error return checks only used
in v7.4-rc1 code).
Applies on top of stable-rc/linux-7.3.y (commit "Linux 7.3.6-rc1").
Please apply for v7.3.6!
Cheers,
Andre
drivers/resctrl/mpam_devices.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/resctrl/mpam_devices.c b/drivers/resctrl/mpam_devices.c
index 30d08d1634a2b..aabbe2ad8f1af 100644
--- a/drivers/resctrl/mpam_devices.c
+++ b/drivers/resctrl/mpam_devices.c
@@ -1716,7 +1716,6 @@ static int mpam_save_mbwu_state(void *arg)
cur_flt = mpam_read_monsel_reg(msc, CFG_MBWU_FLT);
cur_ctl = mpam_read_monsel_reg(msc, CFG_MBWU_CTL);
- mpam_write_monsel_reg(msc, CFG_MBWU_CTL, 0);
cfg->mon = i;
cfg->pmg = FIELD_GET(MSMON_CFG_x_FLT_PMG, cur_flt);
@@ -1748,6 +1747,8 @@ static int mpam_save_mbwu_state(void *arg)
mbwu_state->correction = val;
}
+ mpam_write_monsel_reg(msc, CFG_MBWU_CTL, 0);
+
mpam_mon_sel_unlock(msc);
}
base-commit: 62eba995b019cddac60e54392601f157010821e9
--
2.43.0
reply other threads:[~2026-11-19 15:19 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261119151931.335561-1-andre.przywara@arm.com \
--to=andre.przywara@arm.com \
--cc=ben.horgan@arm.com \
--cc=fenghuay@nvidia.com \
--cc=james.morse@arm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=reinette.chatre@intel.com \
--cc=sashal@kernel.org \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®