parisc: move virt_map macro to assembly.h
authorSven Schnelle <svens@stackframe.org>
Thu, 14 Oct 2021 19:49:13 +0000 (21:49 +0200)
committerHelge Deller <deller@gmx.de>
Mon, 1 Nov 2021 06:35:59 +0000 (07:35 +0100)
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>
Signed-off-by: Helge Deller <deller@gmx.de>
arch/parisc/include/asm/assembly.h
arch/parisc/kernel/entry.S

index 365c2853eb7a0771b4df86b64b6bc153ccd9dad7..7085df07970299be04fd763dd8d3d958feed37d9 100644 (file)
@@ -78,6 +78,7 @@
 #include <asm/types.h>
 
 #include <asm/asmregs.h>
+#include <asm/psw.h>
 
        sp      =       30
        gp      =       27
        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
         *
index 852bf7334fb5b0ae8ea07bfdba0c129053fd4758..b7108d5da64412ccd85c8229a0a04a7b3b06a329 100644 (file)
        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.