From fed4e5664b0a79f66b6544d2ec6914462d6e4a7b Mon Sep 17 00:00:00 2001 From: caelli Date: Fri, 7 Jun 2024 14:56:21 +0800 Subject: [PATCH] arm64: remove debug for alignment fix Ampere added extra code for arm64 alignment fix, debug and stacktrace was print after fix failure, which may not suitable for production environment, remove this. Signed-off-by: caelli Reviewed-by: mengensun Signed-off-by: Jianping Liu --- arch/arm64/mm/fault.c | 4 +--- arch/arm64/mm/pcie_unalign_access.c | 4 ++-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/arch/arm64/mm/fault.c b/arch/arm64/mm/fault.c index db2380d864af..9c38779f37f9 100644 --- a/arch/arm64/mm/fault.c +++ b/arch/arm64/mm/fault.c @@ -1545,10 +1545,8 @@ static int fixup_alignment(unsigned long addr, unsigned int esr, } if (!res) { instruction_pointer_set(regs, instruction_pointer(regs) + 4); - } else { - pr_err("cannot handle insn:%x, type:%d\n", insn, type); - dump_stack(); } + return res; } #endif diff --git a/arch/arm64/mm/pcie_unalign_access.c b/arch/arm64/mm/pcie_unalign_access.c index 835bbdee8882..384fde3f8848 100644 --- a/arch/arm64/mm/pcie_unalign_access.c +++ b/arch/arm64/mm/pcie_unalign_access.c @@ -7,7 +7,7 @@ struct ldst_filter { static int ldst_default(struct ldst_filter *f, u32 insn, struct pt_regs *regs) { - pr_alert("instruction :%x(%s) is not implemented.\n", insn, f->name); + pr_debug("instruction :%x(%s) is not implemented.\n", insn, f->name); return 1; } @@ -95,7 +95,7 @@ static int align_ldst_imm_new(u32 insn, struct pt_regs *regs) if (!postindex) address += offset; - printk("{%s] addr:%llx, offset:%llx\n", __func__, address, offset); + pr_debug("{%s] addr:%llx, offset:%llx\n", __func__, address, offset); if (is_store) { data = pt_regs_read_reg(regs, t);