From: Nicholas Piggin <npiggin@gmail•com>
To: linuxppc-dev@lists•ozlabs.org
Cc: Nicholas Piggin <npiggin@gmail•com>
Subject: [PATCH v4 01/21] powerpc/32s: Do DABR match out of handle_page_fault()
Date: Sat, 2 Jan 2021 22:24:48 +1000 [thread overview]
Message-ID: <20210102122508.1950592-2-npiggin@gmail.com> (raw)
In-Reply-To: <20210102122508.1950592-1-npiggin@gmail.com>
From: Christophe Leroy <christophe.leroy@csgroup•eu>
handle_page_fault() has some code dedicated to book3s/32 to
call do_break() when the DSI is a DABR match.
On other platforms, do_break() is handled separately.
Do the same for book3s/32, do it earlier in the process of DSI.
This change also avoid doing the test on ISI.
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup•eu>
---
arch/powerpc/kernel/entry_32.S | 15 ---------------
arch/powerpc/kernel/head_book3s_32.S | 3 +++
2 files changed, 3 insertions(+), 15 deletions(-)
diff --git a/arch/powerpc/kernel/entry_32.S b/arch/powerpc/kernel/entry_32.S
index 1c9b0ccc2172..238eacfda7b0 100644
--- a/arch/powerpc/kernel/entry_32.S
+++ b/arch/powerpc/kernel/entry_32.S
@@ -670,10 +670,6 @@ ppc_swapcontext:
.globl handle_page_fault
handle_page_fault:
addi r3,r1,STACK_FRAME_OVERHEAD
-#ifdef CONFIG_PPC_BOOK3S_32
- andis. r0,r5,DSISR_DABRMATCH@h
- bne- handle_dabr_fault
-#endif
bl do_page_fault
cmpwi r3,0
beq+ ret_from_except
@@ -687,17 +683,6 @@ handle_page_fault:
bl __bad_page_fault
b ret_from_except_full
-#ifdef CONFIG_PPC_BOOK3S_32
- /* We have a data breakpoint exception - handle it */
-handle_dabr_fault:
- SAVE_NVGPRS(r1)
- lwz r0,_TRAP(r1)
- clrrwi r0,r0,1
- stw r0,_TRAP(r1)
- bl do_break
- b ret_from_except_full
-#endif
-
/*
* This routine switches between two different tasks. The process
* state of one is saved on its kernel stack. Then the state
diff --git a/arch/powerpc/kernel/head_book3s_32.S b/arch/powerpc/kernel/head_book3s_32.S
index 349bf3f0c3af..fc9a12768a14 100644
--- a/arch/powerpc/kernel/head_book3s_32.S
+++ b/arch/powerpc/kernel/head_book3s_32.S
@@ -680,7 +680,10 @@ handle_page_fault_tramp_1:
lwz r5, _DSISR(r11)
/* fall through */
handle_page_fault_tramp_2:
+ andis. r0, r5, DSISR_DABRMATCH@h
+ bne- 1f
EXC_XFER_LITE(0x300, handle_page_fault)
+1: EXC_XFER_STD(0x300, do_break)
#ifdef CONFIG_VMAP_STACK
.macro save_regs_thread thread
--
2.23.0
next prev parent reply other threads:[~2021-01-02 12:28 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-02 12:24 [PATCH v4 00/21] powerpc: interrupt wrappers Nicholas Piggin
2021-01-02 12:24 ` Nicholas Piggin [this message]
2021-01-02 12:24 ` [PATCH v4 02/21] powerpc/64s: move the last of the page fault handling logic to C Nicholas Piggin
2021-01-02 17:56 ` Christophe Leroy
2021-01-03 9:17 ` Nicholas Piggin
2021-01-02 12:24 ` [PATCH v4 03/21] powerpc: remove arguments from fault handler functions Nicholas Piggin
2021-01-02 12:24 ` [PATCH v4 04/21] powerpc: bad_page_fault, do_break get registers from regs Nicholas Piggin
2021-01-02 12:24 ` [PATCH v4 05/21] powerpc/perf: move perf irq/nmi handling details into traps.c Nicholas Piggin
2021-01-02 12:24 ` [PATCH v4 06/21] powerpc: interrupt handler wrapper functions Nicholas Piggin
2021-01-02 12:24 ` [PATCH v4 07/21] powerpc: add interrupt wrapper entry / exit stub functions Nicholas Piggin
2021-01-02 12:24 ` [PATCH v4 08/21] powerpc: add interrupt_cond_local_irq_enable helper Nicholas Piggin
2021-01-02 12:24 ` [PATCH v4 09/21] powerpc/64: context tracking remove _TIF_NOHZ Nicholas Piggin
2021-01-02 12:24 ` [PATCH v4 10/21] powerpc/64s/hash: improve context tracking of hash faults Nicholas Piggin
2021-01-02 12:24 ` [PATCH v4 11/21] powerpc/64: context tracking move to interrupt wrappers Nicholas Piggin
2021-01-02 12:24 ` [PATCH v4 12/21] powerpc/64: add context tracking to asynchronous interrupts Nicholas Piggin
2021-01-02 12:25 ` [PATCH v4 13/21] powerpc: handle irq_enter/irq_exit in interrupt handler wrappers Nicholas Piggin
2021-01-02 12:25 ` [PATCH v4 14/21] powerpc/64s: move context tracking exit to interrupt exit path Nicholas Piggin
2021-01-02 12:25 ` [PATCH v4 15/21] powerpc/64s: reconcile interrupts in C Nicholas Piggin
2021-01-02 12:25 ` [PATCH v4 16/21] powerpc/64: move account_stolen_time into its own function Nicholas Piggin
2021-01-02 12:25 ` [PATCH v4 17/21] powerpc/64: entry cpu time accounting in C Nicholas Piggin
2021-01-02 12:25 ` [PATCH v4 18/21] powerpc: move NMI entry/exit code into wrapper Nicholas Piggin
2021-01-02 12:25 ` [PATCH v4 19/21] powerpc/64s: move NMI soft-mask handling to C Nicholas Piggin
2021-01-02 12:25 ` [PATCH v4 20/21] powerpc/64s: runlatch interrupt handling in C Nicholas Piggin
2021-01-02 12:25 ` [PATCH v4 21/21] powerpc/64s: power4 nap fixup " Nicholas Piggin
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=20210102122508.1950592-2-npiggin@gmail.com \
--to=npiggin@gmail$(echo .)com \
--cc=linuxppc-dev@lists$(echo .)ozlabs.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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