From: Nicholas Piggin <npiggin@gmail.com>
To: linuxppc-dev@lists.ozlabs.org
Cc: Nicholas Piggin <npiggin@gmail.com>
Subject: [PATCH v3 06/11] powerpc/64s: system call avoid setting MSR[RI] until we set MSR[EE]
Date: Thu, 10 Jun 2021 23:09:16 +1000 [thread overview]
Message-ID: <20210610130921.706938-7-npiggin@gmail.com> (raw)
In-Reply-To: <20210610130921.706938-1-npiggin@gmail.com>
This extends the MSR[RI]=0 window a little further into the system
call in order to pair RI and EE enabling with a single mtmsrd.
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
---
arch/powerpc/kernel/exceptions-64s.S | 2 --
arch/powerpc/kernel/interrupt_64.S | 4 ++--
2 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/arch/powerpc/kernel/exceptions-64s.S b/arch/powerpc/kernel/exceptions-64s.S
index a2ae14d0600e..b6e1c46c97d0 100644
--- a/arch/powerpc/kernel/exceptions-64s.S
+++ b/arch/powerpc/kernel/exceptions-64s.S
@@ -1942,8 +1942,6 @@ END_FTR_SECTION_IFSET(CPU_FTR_REAL_LE)
mtctr r10
bctr
.else
- li r10,MSR_RI
- mtmsrd r10,1 /* Set RI (EE=0) */
#ifdef CONFIG_RELOCATABLE
__LOAD_HANDLER(r10, system_call_common)
mtctr r10
diff --git a/arch/powerpc/kernel/interrupt_64.S b/arch/powerpc/kernel/interrupt_64.S
index 83826775d239..3038c831fc5f 100644
--- a/arch/powerpc/kernel/interrupt_64.S
+++ b/arch/powerpc/kernel/interrupt_64.S
@@ -284,9 +284,9 @@ END_BTB_FLUSH_SECTION
* trace_hardirqs_off().
*/
li r11,IRQS_ALL_DISABLED
- li r12,PACA_IRQ_HARD_DIS
+ li r12,-1 /* Set MSR_EE and MSR_RI */
stb r11,PACAIRQSOFTMASK(r13)
- stb r12,PACAIRQHAPPENED(r13)
+ mtmsrd r12,1
/* Calling convention has r9 = orig r0, r10 = regs */
mr r9,r0
--
2.23.0
next prev parent reply other threads:[~2021-06-10 13:12 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-10 13:09 [PATCH v3 00/11] powerpc/64: fast interrupt exits Nicholas Piggin
2021-06-10 13:09 ` [PATCH v3 01/11] powerpc: remove interrupt exit helpers unused argument Nicholas Piggin
2021-06-10 13:09 ` [PATCH v3 02/11] powerpc/64s: introduce different functions to return from SRR vs HSRR interrupts Nicholas Piggin
2021-06-10 13:09 ` [PATCH v3 03/11] powerpc/64s: avoid reloading (H)SRR registers if they are still valid Nicholas Piggin
2021-06-15 13:39 ` Michael Ellerman
2021-06-10 13:09 ` [PATCH v3 04/11] powerpc/64: handle MSR EE and RI in interrupt entry wrapper Nicholas Piggin
2021-06-10 13:09 ` [PATCH v3 05/11] powerpc/64: move interrupt return asm to interrupt_64.S Nicholas Piggin
2021-06-10 13:09 ` Nicholas Piggin [this message]
2021-06-10 13:09 ` [PATCH v3 07/11] powerpc/64s: save one more register in the masked interrupt handler Nicholas Piggin
2021-06-10 13:09 ` [PATCH v3 08/11] powerpc/64: allow alternate return locations for soft-masked interrupts Nicholas Piggin
2021-06-10 13:09 ` [PATCH v3 09/11] powerpc/64: interrupt soft-enable race fix Nicholas Piggin
2021-06-10 13:09 ` [PATCH v3 10/11] powerpc/64: treat low kernel text as irqs soft-masked Nicholas Piggin
2021-06-10 13:09 ` [PATCH v3 11/11] powerpc/64: use interrupt restart table to speed up return from interrupt Nicholas Piggin
2021-06-15 13:44 ` Michael Ellerman
2021-06-16 1:20 ` Nicholas Piggin
2021-06-15 14:07 ` [PATCH v3 00/11] powerpc/64: fast interrupt exits Michael Ellerman
2021-06-16 1:25 ` 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=20210610130921.706938-7-npiggin@gmail.com \
--to=npiggin@gmail.com \
--cc=linuxppc-dev@lists.ozlabs.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;
as well as URLs for NNTP newsgroup(s).