riscv: don't include kernel.h into alternative.h
From: Heiko Stuebner <heiko.stuebner@...> Date: Thu, 11 May 2023 14:58:45 +0200
Commit-Message
This include is not currently needed for alternatives and creates possible issues when we want to add alternatives to deeper kernel infrastructure. The issue in question came from trying to introduce Zawrs alternatives, which resulted in a somewhat circular dependency like: In file included from ../include/linux/bitops.h:34, from ../include/linux/kernel.h:22, from ../arch/riscv/include/asm/alternative.h:16, from ../arch/riscv/include/asm/errata_list.h:8, from ../arch/riscv/include/asm/barrier.h:15, from ../include/linux/list.h:11, from ../include/linux/preempt.h:11, from ../include/linux/spinlock.h:56, from ../include/linux/mmzone.h:8, from ../include/linux/gfp.h:7, from ../include/linux/mm.h:7, from ../arch/riscv/kernel/asm-offsets.c:10: ../include/asm-generic/bitops/generic-non-atomic.h: In function ‘generic_test_bit_acquire’: ../include/asm-generic/bitops/generic-non-atomic.h:140:23: error: implicit declaration of function ‘smp_load_acquire’ [-Werror=implicit-function-declaration] 140 | return 1UL & (smp_load_acquire(p) >> (nr & (BITS_PER_LONG-1))); | ^~~~~~~~~~~~~~~~ Signed-off-by: Heiko Stuebner <heiko.stuebner@...>
Patch-Comment
arch/riscv/include/asm/alternative.h | 1 - 1 file changed, 1 deletion(-)
Statistics
- 0 lines added
- 1 lines removed