Re: [PATCH v3 11/47] arm64: mpam: Add helpers to change a task or cpu's MPAM PARTID/PMG values

Catalin Marinas
2026-01-15T19:13:54Z

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?

> +
> static inline void mpam_thread_switch(struct task_struct *tsk)
> {
> u64 oldregval;
> --
> 2.43.0
>

--
Catalin