Files
linux/include/asm-generic
Huacai Chen b9802b54d4 asm-generic: Add sched.h inclusion in simd.h
Commit 7ba8df4781 ("asm-generic: Make simd.h more resilient")
causes a build error for PREEMPT_RT kernels:

  CC      lib/crypto/sha256.o
In file included from ./include/asm-generic/simd.h:6,
                 from ./arch/loongarch/include/generated/asm/simd.h:1,
                 from ./include/crypto/internal/simd.h:9,
                 from ./include/crypto/internal/sha2.h:6,
                 from lib/crypto/sha256.c:15:
./include/asm-generic/simd.h: In function 'may_use_simd':
./include/linux/preempt.h:111:34: error: 'current' undeclared (first use in this function)
  111 | # define softirq_count()        (current->softirq_disable_cnt & SOFTIRQ_MASK)
      |                                  ^~~~~~~
./include/linux/preempt.h:112:82: note: in expansion of macro 'softirq_count'
  112 | # define irq_count()            ((preempt_count() & (NMI_MASK | HARDIRQ_MASK)) | softirq_count())
      |                                                                                  ^~~~~~~~~~~~~
./include/linux/preempt.h:143:34: note: in expansion of macro 'irq_count'
  143 | #define in_interrupt()          (irq_count())
      |                                  ^~~~~~~~~
./include/asm-generic/simd.h:18:17: note: in expansion of macro 'in_interrupt'
   18 |         return !in_interrupt();
      |                 ^~~~~~~~~~~~

So add sched.h inclusion in simd.h to fix it.

Fixes: 7ba8df4781 ("asm-generic: Make simd.h more resilient")
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2025-05-30 20:56:48 +08:00
..
2022-02-25 09:36:06 +01:00
2023-02-13 22:13:29 +01:00
2024-05-07 14:20:48 +02:00
2023-12-15 16:25:55 -08:00
2024-01-17 17:52:29 -08:00
2021-12-11 23:31:51 +01:00
2024-09-01 20:26:13 -07:00
2024-09-03 21:15:32 -07:00
2022-07-22 17:34:57 -05:00
2025-01-25 20:22:24 -08:00
2024-11-11 07:33:20 -08:00
2025-03-19 08:03:06 -07:00
2025-02-18 10:16:00 +01:00
2024-11-11 07:33:20 -08:00
2024-11-11 21:51:42 +01:00