[RFC PATCH v2 12/45] arm64: interrupts: Add common exception state helpers
Vladimir Murzin
vladimir.murzin at arm.com
Fri Aug 21 04:08:16 PDT 2026
On 8/11/26 08:39, Jinjie Ruan wrote:
>
> 在 2026/8/3 17:40, Vladimir Murzin 写道:
>> Hi Jinjie,
>>
>> On 7/28/26 09:20, Jinjie Ruan wrote:
>>> Hi Vladimir,
>>>
>>> Using two tables as below to map different contexts to the hwstate
>>> status makes the code appear more concise and clear. What do you think?
>> I think I already tried something like that and IIRC it hurts code
>> generation... I'll have another look before posting next version.
> Thank you for very much.
>
Interestingly, with CONFIG_ARM64_PSEUDO_NMI=n both versions seem to
have the same codegen, which is not different from the original code.
However, once CONFIG_ARM64_PSEUDO_NMI=y, codegen starts suffering from
static branches, with the table approach being slightly worse. Since
whether we use {p}NMI or not is a runtime decision, the compiler seems
unable to fully optimize things out.
Perhaps this is the price we have to pay for flexibility, but if
someone has ideas on how to tune the code generation, I'm all ears.
Cheers
Vladimir
>> Cheers
>> Vladimir
>>
More information about the linux-arm-kernel
mailing list