mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git
synced 2026-10-28 12:53:14 +01:00
asm-generic: percpu: Add assembly guard
Currently, asm/percpu.h is directly or indirectly included by some assembly files on x86. Some of them (e.g., checksum_32.S) are also used on um. But x86 and um provide different versions of asm/percpu.h -- um uses asm-generic/percpu.h directly. When SMP is enabled, asm-generic/percpu.h will introduce C code that cannot be assembled. Since asm-generic/percpu.h currently is not designed for use in assembly, and these assembly files do not actually need asm/percpu.h on um, let's add the assembly guard in asm-generic/percpu.h to fix this issue. Cc: Arnd Bergmann <[email protected]> Cc: [email protected] Signed-off-by: Tiwei Bie <[email protected]> Acked-by: Arnd Bergmann <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Johannes Berg <[email protected]>
This commit is contained in:
1 parent
37f847b794
commit
8d74895527
1 file changed
+3
@@ -2,6 +2,8 @@
|
||||
#ifndef _ASM_GENERIC_PERCPU_H_
|
||||
#define _ASM_GENERIC_PERCPU_H_
|
||||
|
||||
#ifndef __ASSEMBLER__
|
||||
|
||||
#include <linux/compiler.h>
|
||||
#include <linux/threads.h>
|
||||
#include <linux/percpu-defs.h>
|
||||
@@ -557,4 +559,5 @@ do { \
|
||||
this_cpu_generic_cmpxchg(pcp, oval, nval)
|
||||
#endif
|
||||
|
||||
#endif /* __ASSEMBLER__ */
|
||||
#endif /* _ASM_GENERIC_PERCPU_H_ */
|
||||
Reference in new issue
Block a user