Re: [PATCH v2 12/45] arm64: mpam: Add helpers to change a task or cpu's MPAM PARTID/PMG values
From: Jonathan Cameron
Date: Mon Jan 05 2026 - 12:26:37 EST
On Fri, 19 Dec 2025 18:11:14 +0000
Ben Horgan <ben.horgan@xxxxxxx> wrote:
> From: James Morse <james.morse@xxxxxxx>
>
> Care must be taken when modifying the PARTID and PMG of a task in any
> per-task structure as writing these values may race with the task being
> scheduled in, and reading the modified values.
>
> Add helpers to set the task properties, and the CPU default value. These
> use WRITE_ONCE() that pairs with the READ_ONCE() in mpam_get_regval() to
> avoid causing torn values.
>
> CC: Dave Martin <Dave.Martin@xxxxxxx>
> Signed-off-by: James Morse <james.morse@xxxxxxx>
> Signed-off-by: Ben Horgan <ben.horgan@xxxxxxx>
Reviewed-by: Jonathan Cameron <jonathan.cameron@xxxxxxxxxx>