[RFC PATCH 12/36] arm64: entry: replace DAIF helpers with entry helpers
Vladimir Murzin
vladimir.murzin at arm.com
Tue Jul 14 05:00:38 PDT 2026
On 7/10/26 11:01, Jinjie Ruan wrote:
>
> On 7/9/2026 8:13 PM, Vladimir Murzin wrote:
>> From: Ada Couprie Diaz <ada.coupriediaz at arm.com>
>>
>> Replace all uses of the `local_daif_...` helpers in `entry-common.c`
>> with the new entry-specific exception masking helpers.
>>
>> Also replace `local_irq_disable()` with a switch to NOIRQ context
>> using the new helpers. This provides:
>>
>> - consistency checks for hardware state
>>
>> - a unified style for managing exception context
>>
>> Now that exception context is tracked explicitly, involuntary kernel
>> preemption can be optimized. We either preempt:
>>
>> - from PROCESS exception context, or
>>
>> - when returning from an interrupt handler, where the GIC code
>> switches from NONMI to NOIRQ exception context
>>
>> To support this split, divide `arm64_exit_to_kernel_mode()` into
>> preempt, non-preempt, and dispatch parts.
>>
>> Remove `local_daif_inherit()`, since it is no longer used.
>>
>> Now that both the irqflags API and entry code handle DAIF and PMR
>> correctly, remove `GIC_PRIO_PSR_I_SET` from the PMR value set by
>> `kernel_entry` in `entry.S` and by `init_gic_priority_masking()` in
>> `kernel/smp.c`.
>>
>> The `local_daif_...` helpers and other specialized code still use
>> `GIC_PRIO_PSR_I_SET` for now; this commit does not change their
>> behavior.
>>
>> Signed-off-by: Ada Couprie Diaz <ada.coupriediaz at arm.com>
>> Signed-off-by: Vladimir Murzin <vladimir.murzin at arm.com>
>
> I think this patch and the previous one have too many changes, making it
> difficult to review.
>
Really sorry about that!
> Can it be broken down into smaller patches with modifications that
> include the original context? Otherwise, it will be hard to identify
> what changes have been made.
I'll have a look what can be done with this patch (and previous one).
Thanks
Vladimir
More information about the linux-arm-kernel
mailing list