From: Sven Schnelle <svens@stackframe.org>
To: Helge Deller <deller@gmx.de>
Cc: linux-parisc@vger.kernel.org
Subject: [PATCH v3 1/4] parisc: move virt_map macro to assembly.h
Date: Thu, 14 Oct 2021 21:49:13 +0200 [thread overview]
Message-ID: <20211014194916.13901-2-svens@stackframe.org> (raw)
In-Reply-To: <20211014194916.13901-1-svens@stackframe.org>
This macro will also be used by the TOC code, so move it
into asm/assembly.h to avoid duplication.
Signed-off-by: Sven Schnelle <svens@stackframe.org>
---
arch/parisc/include/asm/assembly.h | 25 +++++++++++++++++++++++++
arch/parisc/kernel/entry.S | 24 ------------------------
2 files changed, 25 insertions(+), 24 deletions(-)
diff --git a/arch/parisc/include/asm/assembly.h b/arch/parisc/include/asm/assembly.h
index a39250cb7dfc..d1d16d7b3607 100644
--- a/arch/parisc/include/asm/assembly.h
+++ b/arch/parisc/include/asm/assembly.h
@@ -71,6 +71,7 @@
#include <asm/types.h>
#include <asm/asmregs.h>
+#include <asm/psw.h>
sp = 30
gp = 27
@@ -497,6 +498,30 @@
nop /* 7 */
.endm
+ /* Switch to virtual mapping, trashing only %r1 */
+ .macro virt_map
+ /* pcxt_ssm_bug */
+ rsm PSW_SM_I, %r0 /* barrier for "Relied upon Translation */
+ mtsp %r0, %sr4
+ mtsp %r0, %sr5
+ mtsp %r0, %sr6
+ tovirt_r1 %r29
+ load32 KERNEL_PSW, %r1
+
+ rsm PSW_SM_QUIET,%r0 /* second "heavy weight" ctl op */
+ mtctl %r0, %cr17 /* Clear IIASQ tail */
+ mtctl %r0, %cr17 /* Clear IIASQ head */
+ mtctl %r1, %ipsw
+ load32 4f, %r1
+ mtctl %r1, %cr18 /* Set IIAOQ tail */
+ ldo 4(%r1), %r1
+ mtctl %r1, %cr18 /* Set IIAOQ head */
+ rfir
+ nop
+4:
+ .endm
+
+
/*
* ASM_EXCEPTIONTABLE_ENTRY
*
diff --git a/arch/parisc/kernel/entry.S b/arch/parisc/kernel/entry.S
index 9f939afe6b88..91e0540e5213 100644
--- a/arch/parisc/kernel/entry.S
+++ b/arch/parisc/kernel/entry.S
@@ -51,30 +51,6 @@
extrd,u \spc,(64 - (SPACEID_SHIFT)),32,\prot
.endm
#endif
-
- /* Switch to virtual mapping, trashing only %r1 */
- .macro virt_map
- /* pcxt_ssm_bug */
- rsm PSW_SM_I, %r0 /* barrier for "Relied upon Translation */
- mtsp %r0, %sr4
- mtsp %r0, %sr5
- mtsp %r0, %sr6
- tovirt_r1 %r29
- load32 KERNEL_PSW, %r1
-
- rsm PSW_SM_QUIET,%r0 /* second "heavy weight" ctl op */
- mtctl %r0, %cr17 /* Clear IIASQ tail */
- mtctl %r0, %cr17 /* Clear IIASQ head */
- mtctl %r1, %ipsw
- load32 4f, %r1
- mtctl %r1, %cr18 /* Set IIAOQ tail */
- ldo 4(%r1), %r1
- mtctl %r1, %cr18 /* Set IIAOQ head */
- rfir
- nop
-4:
- .endm
-
/*
* The "get_stack" macros are responsible for determining the
* kernel stack value.
--
2.33.0
next prev parent reply other threads:[~2021-10-14 19:49 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-14 19:49 [PATCH v3 0/4] add TOC support Sven Schnelle
2021-10-14 19:49 ` Sven Schnelle [this message]
2021-10-14 19:49 ` [PATCH v3 2/4] parisc: add PIM TOC data structures Sven Schnelle
2021-10-14 19:49 ` [PATCH v3 3/4] parisc/firmware: add functions to retrieve TOC data Sven Schnelle
2021-10-14 19:49 ` [PATCH v3 4/4] parisc: add support for TOC (transfer of control) Sven Schnelle
2021-10-16 16:49 ` Rolf Eike Beer
2021-10-16 16:56 ` Helge Deller
2021-10-14 20:27 ` [PATCH v3 0/4] add TOC support Helge Deller
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=20211014194916.13901-2-svens@stackframe.org \
--to=svens@stackframe.org \
--cc=deller@gmx.de \
--cc=linux-parisc@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.