[PATCH v3 1/8] arm64/sysreg: Add definitions for immediate versions of MSR ALLINT

Mark Brown broonie at kernel.org
Tue May 7 07:52:28 PDT 2024


On Tue, May 07, 2024 at 03:41:08PM +0800, Liao, Chang wrote:
> 在 2024/5/6 23:15, Mark Brown 写道:
> > On Fri, May 03, 2024 at 05:00:49PM +0100, Mark Rutland wrote:

> >> +#define set_pstate_allint(x)           asm volatile(SET_PSTATE_ALLINT(x))

> > Hrm, those helpers are not ideally discoverable, partly due to the
> > system register description for ALLINT not providing any references to
> > this being a general scheme (which is fixable there) and partly due to

> Based on the Arm ISA reference manual, the instruction accessing the ALLINT
> field of PSTATE uses the following encoding:

I'm not saying the suggestion is wrong, I'm saying that between the ARM
and the way the code is written the helpers aren't as discoverable as
they should be, like I say from a code point of view that's mainly
because...

>                     op0  op1   CRn    CRm    op2
> MSR ALLINT, #<imm>  0b00 0b001 0b0100 0b000x 0b000

...we only have the encoding for the MSR and don't mention the letters
'msr' anywhere.  We should improve that to say what we're encoding in
the code (in general I'd say that's true for any __emit_inst(), not just
these ones).
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20240507/db78b4f7/attachment.sig>


More information about the linux-arm-kernel mailing list