From: Daniel Thompson <daniel.thompson@linaro.org>
To: Christophe Leroy <christophe.leroy@c-s.fr>
Cc: Rich Felker <dalias@libc.org>,
"Gustavo A. R. Silva" <gustavo@embeddedor.com>,
Benjamin Herrenschmidt <benh@kernel.crashing.org>,
Will Deacon <will.deacon@arm.com>,
linux-kernel@vger.kernel.org, Paul Mackerras <paulus@samba.org>,
sparclinux@vger.kernel.org, linux-hexagon@vger.kernel.org,
Yoshinori Sato <ysato@users.sourceforge.jp>,
linux-sh@vger.kernel.org, Michael Ellerman <mpe@ellerman.id.au>,
x86@kernel.org, Russell King <linux@armlinux.org.uk>,
Ingo Molnar <mingo@redhat.com>,
Catalin Marinas <catalin.marinas@arm.com>,
James Hogan <jhogan@kernel.org>,
linux-snps-arc@lists.infradead.org,
uclinux-h8-devel@lists.sourceforge.jp,
linux-mips@vger.kernel.org, Borislav Petkov <bp@alien8.de>,
nios2-dev@lists.rocketboards.org,
Thomas Gleixner <tglx@linutronix.de>,
linux-arm-kernel@lists.infradead.org,
Michal Simek <monstr@monstr.eu>,
Vineet Gupta <vgupta@synopsys.com>,
Randy Dunlap <rdunlap@infradead.org>,
Douglas Anderson <dianders@chromium.org>,
Ralf Baechle <ralf@linux-mips.org>,
Richard Kuo <rkuo@codeaurora.org>,
Paul Burton <paul.burton@mips.com>,
Jason Wessel <jason.wessel@windriver.com>,
kgdb-bugreport@lists.sourceforge.net,
Ley Foon Tan <lftan@altera.com>,
linuxppc-dev@lists.ozlabs.org,
"David S. Miller" <davem@davemloft.net>
Subject: Re: [PATCH v2 1/2] mips/kgdb: prepare arch_kgdb_ops for constness
Date: Wed, 19 Dec 2018 16:57:18 +0000 [thread overview]
Message-ID: <20181219165718.tf5ly7yg5es7bvum@holly.lan> (raw)
In-Reply-To: <030d63848e4b0ef4d76ca24597ab8302a393d692.1544083483.git.christophe.leroy@c-s.fr>
On Thu, Dec 06, 2018 at 08:07:38PM +0000, Christophe Leroy wrote:
> 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: Paul Burton <paul.burton@mips.com>
> Acked-by: Daniel Thompson <daniel.thompson@linaro.org>
> Acked-by: Paul Burton <paul.burton@mips.com>
> Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
Applied! Thanks.
> -
> ---
> v2: Added acks from Daniel and Paul.
>
> arch/mips/kernel/kgdb.c | 16 +++++++---------
> 1 file changed, 7 insertions(+), 9 deletions(-)
>
> diff --git a/arch/mips/kernel/kgdb.c b/arch/mips/kernel/kgdb.c
> index eb6c0d582626..31eff1bec577 100644
> --- a/arch/mips/kernel/kgdb.c
> +++ b/arch/mips/kernel/kgdb.c
> @@ -394,18 +394,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;
> --
> 2.13.3
>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
prev parent reply other threads:[~2018-12-19 16:57 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-06 20:07 [PATCH v2 1/2] mips/kgdb: prepare arch_kgdb_ops for constness Christophe Leroy
2018-12-06 20:07 ` [PATCH v2 2/2] kgdb/treewide: constify struct kgdb_arch arch_kgdb_ops Christophe Leroy
2018-12-06 21:12 ` Borislav Petkov
2018-12-07 11:15 ` Michael Ellerman
2018-12-19 16:57 ` Daniel Thompson
2018-12-19 16:57 ` Daniel Thompson [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181219165718.tf5ly7yg5es7bvum@holly.lan \
--to=daniel.thompson@linaro.org \
--cc=benh@kernel.crashing.org \
--cc=bp@alien8.de \
--cc=catalin.marinas@arm.com \
--cc=christophe.leroy@c-s.fr \
--cc=dalias@libc.org \
--cc=davem@davemloft.net \
--cc=dianders@chromium.org \
--cc=gustavo@embeddedor.com \
--cc=jason.wessel@windriver.com \
--cc=jhogan@kernel.org \
--cc=kgdb-bugreport@lists.sourceforge.net \
--cc=lftan@altera.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-hexagon@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@vger.kernel.org \
--cc=linux-sh@vger.kernel.org \
--cc=linux-snps-arc@lists.infradead.org \
--cc=linux@armlinux.org.uk \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mingo@redhat.com \
--cc=monstr@monstr.eu \
--cc=mpe@ellerman.id.au \
--cc=nios2-dev@lists.rocketboards.org \
--cc=paul.burton@mips.com \
--cc=paulus@samba.org \
--cc=ralf@linux-mips.org \
--cc=rdunlap@infradead.org \
--cc=rkuo@codeaurora.org \
--cc=sparclinux@vger.kernel.org \
--cc=tglx@linutronix.de \
--cc=uclinux-h8-devel@lists.sourceforge.jp \
--cc=vgupta@synopsys.com \
--cc=will.deacon@arm.com \
--cc=x86@kernel.org \
--cc=ysato@users.sourceforge.jp \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox