From: Nicholas Piggin <npiggin@gmail.com>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>,
Christophe Leroy <christophe.leroy@csgroup.eu>,
Michael Ellerman <mpe@ellerman.id.au>,
Paul Mackerras <paulus@samba.org>
Cc: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH v1 06/15] powerpc: Remove address and errorcode arguments from do_break()
Date: Sun, 27 Dec 2020 13:25:25 +1000 [thread overview]
Message-ID: <1609039258.ijw9vns8wh.astroid@bobo.none> (raw)
In-Reply-To: <0246430576c2ff0aed1d35ccbd6f44e658908102.1608641533.git.christophe.leroy@csgroup.eu>
Excerpts from Christophe Leroy's message of December 22, 2020 11:28 pm:
> Let do_break() retrieve address and errorcode from regs.
>
> This simplifies the code and shouldn't impeed performance as
> address and errorcode are likely still hot in the cache.
>
> Suggested-by: Nicholas Piggin <npiggin@gmail.com>
> Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
> ---
> arch/powerpc/include/asm/debug.h | 3 +--
> arch/powerpc/kernel/exceptions-64s.S | 2 --
> arch/powerpc/kernel/head_8xx.S | 5 -----
> arch/powerpc/kernel/process.c | 8 +++-----
> 4 files changed, 4 insertions(+), 14 deletions(-)
>
> diff --git a/arch/powerpc/include/asm/debug.h b/arch/powerpc/include/asm/debug.h
> index ec57daf87f40..0550eceab3ca 100644
> --- a/arch/powerpc/include/asm/debug.h
> +++ b/arch/powerpc/include/asm/debug.h
> @@ -52,8 +52,7 @@ extern void do_send_trap(struct pt_regs *regs, unsigned long address,
> unsigned long error_code, int brkpt);
> #else
>
> -extern void do_break(struct pt_regs *regs, unsigned long address,
> - unsigned long error_code);
> +void do_break(struct pt_regs *regs);
> #endif
>
> #endif /* _ASM_POWERPC_DEBUG_H */
> diff --git a/arch/powerpc/kernel/exceptions-64s.S b/arch/powerpc/kernel/exceptions-64s.S
> index cfbd1d690033..3ea067bcbb95 100644
> --- a/arch/powerpc/kernel/exceptions-64s.S
> +++ b/arch/powerpc/kernel/exceptions-64s.S
> @@ -3262,8 +3262,6 @@ handle_page_fault:
>
> /* We have a data breakpoint exception - handle it */
> handle_dabr_fault:
> - ld r4,_DAR(r1)
> - ld r5,_DSISR(r1)
> addi r3,r1,STACK_FRAME_OVERHEAD
> bl do_break
> /*
> diff --git a/arch/powerpc/kernel/head_8xx.S b/arch/powerpc/kernel/head_8xx.S
> index 52702f3db6df..81f3c984f50c 100644
> --- a/arch/powerpc/kernel/head_8xx.S
> +++ b/arch/powerpc/kernel/head_8xx.S
> @@ -364,11 +364,6 @@ do_databreakpoint:
> addi r3,r1,STACK_FRAME_OVERHEAD
> mfspr r4,SPRN_BAR
> stw r4,_DAR(r11)
> -#ifdef CONFIG_VMAP_STACK
> - lwz r5,_DSISR(r11)
> -#else
> - mfspr r5,SPRN_DSISR
> -#endif
I didn't think you can do this (at leastuntil after your patch 10). I have my
!VMAP path doing mfspr r5,DSISR ; stw r3,_DSISR(r11);
Thanks,
Nick
next prev parent reply other threads:[~2020-12-27 3:26 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-22 13:28 [PATCH v1 00/15] powerpc/32: Reduce head complexity and re-activate MMU earlier Christophe Leroy
2020-12-22 13:28 ` [PATCH v1 01/15] powerpc/32: Fix vmap stack - Properly set r1 before activating MMU on syscall too Christophe Leroy
2020-12-22 13:28 ` [PATCH v1 02/15] powerpc/32s: Fix RTAS machine check with VMAP stack Christophe Leroy
2020-12-22 13:28 ` [PATCH v1 03/15] powerpc/32s: Only build hash code when CONFIG_PPC_BOOK3S_604 is selected Christophe Leroy
2020-12-22 13:28 ` [PATCH v1 04/15] powerpc/32s: Do DABR match out of handle_page_fault() Christophe Leroy
2020-12-22 13:28 ` [PATCH v1 05/15] powerpc: Remove address argument from bad_page_fault() Christophe Leroy
2020-12-27 3:43 ` Nicholas Piggin
2020-12-22 13:28 ` [PATCH v1 06/15] powerpc: Remove address and errorcode arguments from do_break() Christophe Leroy
2020-12-27 3:25 ` Nicholas Piggin [this message]
2021-01-11 6:57 ` Christophe Leroy
2020-12-22 13:28 ` [PATCH v1 07/15] powerpc: Remove address and errorcode arguments from do_page_fault() Christophe Leroy
2020-12-22 13:28 ` [PATCH v1 08/15] powerpc/32: Split head_32.h into head_40x.h and head_6xx_8xx.h Christophe Leroy
2020-12-22 13:28 ` [PATCH v1 09/15] powerpc/32: Preserve cr1 in exception prolog stack check Christophe Leroy
2020-12-22 13:28 ` [PATCH v1 10/15] powerpc/32: Make VMAP stack code depend on HAVE_ARCH_VMAP_STACK Christophe Leroy
2020-12-22 13:28 ` [PATCH v1 11/15] powerpc/32: Use r1 directly instead of r11 in syscall prolog Christophe Leroy
2020-12-22 13:28 ` [PATCH v1 12/15] powerpc/32: Remove msr argument in EXC_XFER_TEMPLATE() on 6xx/8xx Christophe Leroy
2020-12-22 13:28 ` [PATCH v1 13/15] powerpc/32: Enable instruction translation at the same time as data translation Christophe Leroy
2020-12-22 13:28 ` [PATCH v1 14/15] powerpc/32: Use r1 directly instead of r11 in exception prologs on 6xx/8xx Christophe Leroy
2020-12-22 13:28 ` [PATCH v1 15/15] powerpc/32: Use r11 to store DSISR in prolog Christophe Leroy
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=1609039258.ijw9vns8wh.astroid@bobo.none \
--to=npiggin@gmail.com \
--cc=benh@kernel.crashing.org \
--cc=christophe.leroy@csgroup.eu \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mpe@ellerman.id.au \
--cc=paulus@samba.org \
/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