Greg Kroah-Hartman wrote on Mon, Jun 23, 2025 at 03:08:44PM +0200:
5.10-stable review patch. If anyone has any objections, please let me know.
This fails to build on arm64 with the attached config (in particular arm64 defconfig works, I didn't check what's required to make this fail)
CC arch/arm64/kernel/asm-offsets.s In file included from ../arch/arm64/include/asm/alternative.h:6, from ../arch/arm64/include/asm/sysreg.h:1050, from ../arch/arm64/include/asm/cputype.h:194, from ../arch/arm64/include/asm/cache.h:8, from ../include/linux/cache.h:6, from ../include/linux/printk.h:9, from ../include/linux/kernel.h:17, from ../include/linux/list.h:9, from ../include/linux/kobject.h:19, from ../include/linux/of.h:17, from ../include/linux/irqdomain.h:35, from ../include/linux/acpi.h:13, from ../include/acpi/apei.h:9, from ../include/acpi/ghes.h:5, from ../include/linux/arm_sdei.h:8, from ../arch/arm64/kernel/asm-offsets.c:10: ../arch/arm64/include/asm/insn.h: In function ‘aarch64_insn_gen_atomic_ld_op’: ../arch/arm64/include/asm/insn.h:26:54: error: ‘FAULT_BRK_IMM’ undeclared (first use in this function) 26 | #define AARCH64_BREAK_FAULT (AARCH64_BREAK_MON | (FAULT_BRK_IMM << 5)) | ^~~~~~~~~~~~~ ../arch/arm64/include/asm/insn.h:573:16: note: in expansion of macro ‘AARCH64_BREAK_FAULT’ 573 | return AARCH64_BREAK_FAULT; | ^~~~~~~~~~~~~~~~~~~ ../arch/arm64/include/asm/insn.h:26:54: note: each undeclared identifier is reported only once for each function it appears in 26 | #define AARCH64_BREAK_FAULT (AARCH64_BREAK_MON | (FAULT_BRK_IMM << 5)) | ^~~~~~~~~~~~~ ../arch/arm64/include/asm/insn.h:573:16: note: in expansion of macro ‘AARCH64_BREAK_FAULT’ 573 | return AARCH64_BREAK_FAULT; | ^~~~~~~~~~~~~~~~~~~ ../arch/arm64/include/asm/insn.h: In function ‘aarch64_insn_gen_cas’: ../arch/arm64/include/asm/insn.h:26:54: error: ‘FAULT_BRK_IMM’ undeclared (first use in this function) 26 | #define AARCH64_BREAK_FAULT (AARCH64_BREAK_MON | (FAULT_BRK_IMM << 5)) | ^~~~~~~~~~~~~ ../arch/arm64/include/asm/insn.h:583:16: note: in expansion of macro ‘AARCH64_BREAK_FAULT’ 583 | return AARCH64_BREAK_FAULT; | ^~~~~~~~~~~~~~~~~~~ make[2]: *** [../scripts/Makefile.build:117: arch/arm64/kernel/asm-offsets.s] Error 1 make[1]: *** [/home/martinet/code/linux-5.15/Makefile:1262: prepare0] Error 2
From: Hou Tao houtao1@huawei.com
[ Upstream commit 97e58e395e9c074fd096dad13c54e9f4112cf71d ]
If CONFIG_ARM64_LSE_ATOMICS is off, encoders for LSE-related instructions can return AARCH64_BREAK_FAULT directly in insn.h. In order to access AARCH64_BREAK_FAULT in insn.h, we can not include debug-monitors.h in insn.h, because debug-monitors.h has already depends on insn.h, so just move AARCH64_BREAK_FAULT into insn-def.h.
It will be used by the following patch to eliminate unnecessary LSE-related encoders when CONFIG_ARM64_LSE_ATOMICS is off.
Signed-off-by: Hou Tao houtao1@huawei.com Link: https://lore.kernel.org/r/20220217072232.1186625-2-houtao1@huawei.com Signed-off-by: Will Deacon will@kernel.org [not exist insn-def.h file, move to insn.h]
insn-def.h has `#include <asm/brk-imm.h>` which defines FAULT_BRK_IMM, it'd make sense to add the same to insn.h
Thanks,