On 2025/6/24 18:24, Greg Kroah-Hartman wrote:
On Tue, Jun 24, 2025 at 11:34:02AM +0800, Pu Lehui wrote:
On 2025/6/23 21:08, Greg Kroah-Hartman wrote:
5.10-stable review patch. If anyone has any objections, please let me know.
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] Signed-off-by: Pu Lehui pulehui@huawei.com Signed-off-by: Greg Kroah-Hartman gregkh@linuxfoundation.org
arch/arm64/include/asm/debug-monitors.h | 12 ------------ arch/arm64/include/asm/insn.h | 12 ++++++++++++ 2 files changed, 12 insertions(+), 12 deletions(-)
--- a/arch/arm64/include/asm/debug-monitors.h +++ b/arch/arm64/include/asm/debug-monitors.h @@ -34,18 +34,6 @@ */ #define BREAK_INSTR_SIZE AARCH64_INSN_SIZE -/*
- BRK instruction encoding
- The #imm16 value should be placed at bits[20:5] within BRK ins
- */
-#define AARCH64_BREAK_MON 0xd4200000
-/*
- BRK instruction for provoking a fault on purpose
- Unlike kgdb, #imm16 value with unallocated handler is used for faulting.
- */
-#define AARCH64_BREAK_FAULT (AARCH64_BREAK_MON | (FAULT_BRK_IMM << 5))
- #define AARCH64_BREAK_KGDB_DYN_DBG \ (AARCH64_BREAK_MON | (KGDB_DYN_DBG_BRK_IMM << 5))
--- a/arch/arm64/include/asm/insn.h +++ b/arch/arm64/include/asm/insn.h @@ -13,6 +13,18 @@ /* A64 instructions are always 32 bits. */ #define AARCH64_INSN_SIZE 4 +/*
- BRK instruction encoding
- The #imm16 value should be placed at bits[20:5] within BRK ins
- */
+#define AARCH64_BREAK_MON 0xd4200000
+/*
- BRK instruction for provoking a fault on purpose
- Unlike kgdb, #imm16 value with unallocated handler is used for faulting.
- */
+#define AARCH64_BREAK_FAULT (AARCH64_BREAK_MON | (FAULT_BRK_IMM << 5))
Hi Greg,
Dominique just discovered a compilation problem [0] caused by not having `#include <asm/brk-imm.h>` in insn.h.
I have fixed it as shown below, should I resend the formal patch?
Link: https://lore.kernel.org/all/aFniFC7ywCoveOts@codewreck.org/ [0]
Let me see if I can just take this as-is...
Ok, it worked for 5.10.y, is this also needed in 5.15.y?
No need. 5.15.y has covered <asm/brk-imm.h> header file.
thanks
thanks,
greg k-h