Re: [PATCH v3 11/47] arm64: mpam: Add helpers to change a task or cpu's MPAM PARTID/PMG values
From: Gavin Shan
Date: Mon Jan 19 2026 - 01:57:04 EST
On 1/16/26 3:13 AM, Catalin Marinas wrote:
On Mon, Jan 12, 2026 at 04:58:38PM +0000, Ben Horgan wrote:
+static inline void mpam_set_task_partid_pmg(struct task_struct *tsk,
+ u16 partid_d, u16 partid_i,
+ u8 pmg_d, u8 pmg_i)
+{
+#ifdef CONFIG_ARM64_MPAM
+ u64 regval = __mpam_regval(partid_d, partid_i, pmg_d, pmg_i);
+
+ WRITE_ONCE(task_thread_info(tsk)->mpam_partid_pmg, regval);
+#endif
+}
Isn't this function, together with mpam_thread_switch(), in an enclosing
#ifdef already?
I think Catalin is correct that this ifdef inside mpam_set_task_partid_pmg()
can be dropped.
+
static inline void mpam_thread_switch(struct task_struct *tsk)
{
u64 oldregval;
--
2.43.0
Thanks,
Gavin