提交 911b7afd 编写于 作者: C Christophe Leroy 提交者: Daniel Thompson

mips/kgdb: prepare arch_kgdb_ops for constness

MIPS is the only architecture modifying arch_kgdb_ops during init.
This patch makes the init static, so that it can be changed to
const in following patch, as recommended by checkpatch.pl
Suggested-by: NPaul Burton <paul.burton@mips.com>
Acked-by: NDaniel Thompson <daniel.thompson@linaro.org>
Acked-by: NPaul Burton <paul.burton@mips.com>
Signed-off-by: NChristophe Leroy <christophe.leroy@c-s.fr>
Signed-off-by: NDaniel Thompson <daniel.thompson@linaro.org>
上级 7faedcd4
......@@ -387,18 +387,16 @@ int kgdb_arch_handle_exception(int vector, int signo, int err_code,
return -1;
}
struct kgdb_arch arch_kgdb_ops;
struct kgdb_arch arch_kgdb_ops = {
#ifdef CONFIG_CPU_BIG_ENDIAN
.gdb_bpt_instr = { spec_op << 2, 0x00, 0x00, break_op },
#else
.gdb_bpt_instr = { break_op, 0x00, 0x00, spec_op << 2 },
#endif
};
int kgdb_arch_init(void)
{
union mips_instruction insn = {
.r_format = {
.opcode = spec_op,
.func = break_op,
}
};
memcpy(arch_kgdb_ops.gdb_bpt_instr, insn.byte, BREAK_INSTR_SIZE);
register_die_notifier(&kgdb_notifier);
return 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册