[PATCH v2 08/12] lib/crc_kunit.c: add KUnit test suite for CRC library functions

Guenter Roeck linux at roeck-us.net
Mon Mar 24 03:18:58 AEDT 2025


On 3/23/25 08:35, Ard Biesheuvel wrote:
[ ... ]
>> kernel_neon_end() calls local_bh_enable() which apparently conflicts with
>> the local_irq_disable() in above code.
>>
> 
> This seems to be an oversight on my part. Can you try the below please?
> 
> diff --git a/arch/arm/include/asm/simd.h b/arch/arm/include/asm/simd.h
> index 82191dbd7e78..56ddbd3c4997 100644
> --- a/arch/arm/include/asm/simd.h
> +++ b/arch/arm/include/asm/simd.h
> @@ -4,5 +4,6 @@
> 
>   static __must_check inline bool may_use_simd(void)
>   {
> -       return IS_ENABLED(CONFIG_KERNEL_MODE_NEON) && !in_hardirq();
> +       return IS_ENABLED(CONFIG_KERNEL_MODE_NEON) &&
> +              !in_hardirq() && !irqs_disabled();
>   }
> 
Yes, that fixes the problem.

Thanks,
Guenter



More information about the Linuxppc-dev mailing list