linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christophe Leroy <christophe.leroy@csgroup.eu>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	Paul Mackerras <paulus@samba.org>,
	Michael Ellerman <mpe@ellerman.id.au>,
	michal.simek@xilinx.com, arnd@arndb.de
Cc: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org
Subject: [PATCH v5 13/13] powerpc/40x: Don't save CR in SPRN_SPRG_SCRATCH6
Date: Thu, 21 May 2020 16:56:04 +0000 (UTC)	[thread overview]
Message-ID: <019f314a98c107c4ca46e46c1cf402e9a44114a7.1590079969.git.christophe.leroy@csgroup.eu> (raw)
In-Reply-To: <cover.1590079968.git.christophe.leroy@csgroup.eu>

From: Christophe Leroy <christophe.leroy@c-s.fr>

We have r12 available, use it to keep CR around and don't
save it in SPRN_SPRG_SCRATCH6.

Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
---
 arch/powerpc/kernel/head_40x.S | 15 +++++----------
 1 file changed, 5 insertions(+), 10 deletions(-)

diff --git a/arch/powerpc/kernel/head_40x.S b/arch/powerpc/kernel/head_40x.S
index b584e81f6d19..a22a8209971b 100644
--- a/arch/powerpc/kernel/head_40x.S
+++ b/arch/powerpc/kernel/head_40x.S
@@ -254,9 +254,8 @@ _ENTRY(saved_ksp_limit)
 	mtspr	SPRN_SPRG_SCRATCH1, r11
 	mtspr	SPRN_SPRG_SCRATCH3, r12
 	mtspr	SPRN_SPRG_SCRATCH4, r9
-	mfcr	r11
+	mfcr	r12
 	mfspr	r9, SPRN_PID
-	mtspr	SPRN_SPRG_SCRATCH6, r11
 	mtspr	SPRN_SPRG_SCRATCH5, r9
 	mfspr	r10, SPRN_DEAR		/* Get faulting address */
 
@@ -323,9 +322,8 @@ _ENTRY(saved_ksp_limit)
 	 * and call the heavyweights to help us out.
 	 */
 	mfspr	r9, SPRN_SPRG_SCRATCH5
-	mfspr	r11, SPRN_SPRG_SCRATCH6
 	mtspr	SPRN_PID, r9
-	mtcr	r11
+	mtcr	r12
 	mfspr	r9, SPRN_SPRG_SCRATCH4
 	mfspr	r12, SPRN_SPRG_SCRATCH3
 	mfspr	r11, SPRN_SPRG_SCRATCH1
@@ -341,9 +339,8 @@ _ENTRY(saved_ksp_limit)
 	mtspr	SPRN_SPRG_SCRATCH1, r11
 	mtspr	SPRN_SPRG_SCRATCH3, r12
 	mtspr	SPRN_SPRG_SCRATCH4, r9
-	mfcr	r11
+	mfcr	r12
 	mfspr	r9, SPRN_PID
-	mtspr	SPRN_SPRG_SCRATCH6, r11
 	mtspr	SPRN_SPRG_SCRATCH5, r9
 	mfspr	r10, SPRN_SRR0		/* Get faulting address */
 
@@ -410,9 +407,8 @@ _ENTRY(saved_ksp_limit)
 	 * and call the heavyweights to help us out.
 	 */
 	mfspr	r9, SPRN_SPRG_SCRATCH5
-	mfspr	r11, SPRN_SPRG_SCRATCH6
 	mtspr	SPRN_PID, r9
-	mtcr	r11
+	mtcr	r12
 	mfspr	r9, SPRN_SPRG_SCRATCH4
 	mfspr	r12, SPRN_SPRG_SCRATCH3
 	mfspr	r11, SPRN_SPRG_SCRATCH1
@@ -556,9 +552,8 @@ finish_tlb_load:
 	/* Done...restore registers and get out of here.
 	*/
 	mfspr	r9, SPRN_SPRG_SCRATCH5
-	mfspr	r11, SPRN_SPRG_SCRATCH6
 	mtspr	SPRN_PID, r9
-	mtcr	r11
+	mtcr	r12
 	mfspr	r9, SPRN_SPRG_SCRATCH4
 	mfspr	r12, SPRN_SPRG_SCRATCH3
 	mfspr	r11, SPRN_SPRG_SCRATCH1
-- 
2.25.0


  parent reply	other threads:[~2020-05-21 16:56 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-21 16:55 [PATCH v5 00/13] Modernise powerpc 40x Christophe Leroy
2020-05-21 16:55 ` [PATCH v5 01/13] powerpc: Remove Xilinx PPC405/PPC440 support Christophe Leroy
2020-06-16  0:27   ` Nathan Chancellor
2020-06-16 14:45     ` Michal Simek
2020-06-16 18:16       ` Nathan Chancellor
2020-06-17  7:56         ` Michal Simek
2020-06-17 10:16           ` Michael Ellerman
2020-06-17 10:21             ` Michael Ellerman
2020-06-17 18:16               ` Nick Desaulniers
2020-06-18  0:48                 ` Michael Ellerman
2020-06-18  3:16                   ` Nathan Chancellor
2020-06-18 23:33                     ` Nick Desaulniers
2020-06-19 11:02                     ` Michael Ellerman
2020-06-25  8:39                       ` Joel Stanley
2020-06-17 11:02             ` Michal Simek
2020-05-21 16:55 ` [PATCH v5 02/13] powerpc/40x: Rework 40x PTE access and TLB miss Christophe Leroy
2020-05-21 16:55 ` [PATCH v5 03/13] powerpc/pgtable: Drop PTE_ATOMIC_UPDATES Christophe Leroy
2020-05-21 16:55 ` [PATCH v5 04/13] powerpc/40x: Remove support for IBM 403GCX Christophe Leroy
2020-05-21 16:55 ` [PATCH v5 05/13] powerpc/40x: Remove STB03xxx Christophe Leroy
2020-05-21 16:55 ` [PATCH v5 06/13] powerpc/40x: Remove WALNUT Christophe Leroy
2020-05-21 16:55 ` [PATCH v5 07/13] powerpc/40x: Remove EP405 Christophe Leroy
2020-05-21 16:55 ` [PATCH v5 08/13] powerpc/40x: Remove support for ISS Simulator Christophe Leroy
2020-05-21 16:56 ` [PATCH v5 09/13] powerpc/40x: Remove support for IBM 405GP Christophe Leroy
2020-05-21 16:56 ` [PATCH v5 10/13] powerpc/40x: Remove IBM405 Erratum #51 Christophe Leroy
2020-05-21 16:56 ` [PATCH v5 11/13] powerpc: Remove IBM405 Erratum #77 Christophe Leroy
2020-05-21 16:56 ` [PATCH v5 12/13] powerpc/40x: Avoid using r12 in TLB miss handlers Christophe Leroy
2020-05-21 16:56 ` Christophe Leroy [this message]
2020-06-09  5:28 ` [PATCH v5 00/13] Modernise powerpc 40x Michael Ellerman

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=019f314a98c107c4ca46e46c1cf402e9a44114a7.1590079969.git.christophe.leroy@csgroup.eu \
    --to=christophe.leroy@csgroup.eu \
    --cc=arnd@arndb.de \
    --cc=benh@kernel.crashing.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=michal.simek@xilinx.com \
    --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;
as well as URLs for NNTP newsgroup(s).