]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
s390/sigp: use sigp order code defines in assembly code
authorHeiko Carstens <heiko.carstens@de.ibm.com>
Mon, 4 Jun 2012 13:05:43 +0000 (15:05 +0200)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Tue, 5 Jun 2012 11:23:36 +0000 (13:23 +0200)
Use sigp order code defines in assembly code as well.
With this change all places that use sigp constants should
have been converted to use self describing defines instead
of directly using constants.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
arch/s390/kernel/base.S
arch/s390/kernel/entry.S
arch/s390/kernel/entry64.S
arch/s390/kernel/head_kdump.S
arch/s390/kernel/reipl.S
arch/s390/kernel/reipl64.S
arch/s390/kernel/relocate_kernel.S
arch/s390/kernel/relocate_kernel64.S
arch/s390/kernel/smp.c
arch/s390/kernel/swsusp_asm64.S

index c880ff72db44a0247f57c48450a230f682843ec1..8c20d0efd483bc7348f1393d02556116fdfd8512 100644 (file)
@@ -9,6 +9,7 @@
 #include <linux/linkage.h>
 #include <asm/asm-offsets.h>
 #include <asm/ptrace.h>
+#include <asm/sigp.h>
 
 #ifdef CONFIG_64BIT
 
@@ -100,7 +101,7 @@ ENTRY(diag308_reset)
 .Lrestart_part2:
        lhi     %r0,0                   # Load r0 with zero
        lhi     %r1,2                   # Use mode 2 = ESAME (dump)
-       sigp    %r1,%r0,0x12            # Switch to ESAME mode
+       sigp    %r1,%r0,SIGP_SET_ARCHITECTURE   # Switch to ESAME mode
        sam64                           # Switch to 64 bit addressing mode
        larl    %r4,.Lctlregs           # Restore control registers
        lctlg   %c0,%c15,0(%r4)
index 1ae93b573d7dc35f09b4a4ef08722dce3e4212ea..3787f9e6907aad3ffe7564b0886517d28dd9fe89 100644 (file)
@@ -18,6 +18,7 @@
 #include <asm/asm-offsets.h>
 #include <asm/unistd.h>
 #include <asm/page.h>
+#include <asm/sigp.h>
 
 __PT_R0      = __PT_GPRS
 __PT_R1      = __PT_GPRS + 4
@@ -726,12 +727,12 @@ ENTRY(restart_int_handler)
        lm      %r1,%r3,__LC_RESTART_FN         # load fn, parm & source cpu
        ltr     %r3,%r3                         # test source cpu address
        jm      1f                              # negative -> skip source stop
-0:     sigp    %r4,%r3,1                       # sigp sense to source cpu
+0:     sigp    %r4,%r3,SIGP_SENSE              # sigp sense to source cpu
        brc     10,0b                           # wait for status stored
 1:     basr    %r14,%r1                        # call function
        stap    __SF_EMPTY(%r15)                # store cpu address
        lh      %r3,__SF_EMPTY(%r15)
-2:     sigp    %r4,%r3,5                       # sigp stop to current cpu
+2:     sigp    %r4,%r3,SIGP_STOP               # sigp stop to current cpu
        brc     2,2b
 3:     j       3b
 
index bf80a5921173d13d361c8f60a4544b3be4978582..d5f02e480e5102f5dd675faa594eb4cbc6acb38d 100644 (file)
@@ -18,6 +18,7 @@
 #include <asm/asm-offsets.h>
 #include <asm/unistd.h>
 #include <asm/page.h>
+#include <asm/sigp.h>
 
 __PT_R0      = __PT_GPRS
 __PT_R1      = __PT_GPRS + 8
@@ -753,12 +754,12 @@ ENTRY(restart_int_handler)
        lmg     %r1,%r3,__LC_RESTART_FN         # load fn, parm & source cpu
        ltgr    %r3,%r3                         # test source cpu address
        jm      1f                              # negative -> skip source stop
-0:     sigp    %r4,%r3,1                       # sigp sense to source cpu
+0:     sigp    %r4,%r3,SIGP_SENSE              # sigp sense to source cpu
        brc     10,0b                           # wait for status stored
 1:     basr    %r14,%r1                        # call function
        stap    __SF_EMPTY(%r15)                # store cpu address
        llgh    %r3,__SF_EMPTY(%r15)
-2:     sigp    %r4,%r3,5                       # sigp stop to current cpu
+2:     sigp    %r4,%r3,SIGP_STOP               # sigp stop to current cpu
        brc     2,2b
 3:     j       3b
 
index 796c976b5fdc1b49a6d82e5a9a7cf19906a9443c..acaaaf4b7055e2d50122f43e6f695771a6f781cd 100644 (file)
@@ -5,6 +5,8 @@
  * Author(s): Michael Holzheu <holzheu@linux.vnet.ibm.com>
  */
 
+#include <asm/sigp.h>
+
 #define DATAMOVER_ADDR 0x4000
 #define COPY_PAGE_ADDR 0x6000
 
@@ -19,7 +21,7 @@
 .align 2
 .Lep_startup_kdump:
        lhi     %r1,2                           # mode 2 = esame (dump)
-       sigp    %r1,%r0,0x12                    # Switch to esame mode
+       sigp    %r1,%r0,SIGP_SET_ARCHITECTURE   # Switch to esame mode
        sam64                                   # Switch to 64 bit addressing
        basr    %r13,0
 .Lbase:
@@ -88,7 +90,7 @@ startup_kdump_relocated:
        sam31                                   # Switch to 31 bit addr mode
        sr      %r1,%r1                         # Erase register r1
        sr      %r2,%r2                         # Erase register r2
-       sigp    %r1,%r2,0x12                    # Switch to 31 bit arch mode
+       sigp    %r1,%r2,SIGP_SET_ARCHITECTURE   # Switch to 31 bit arch mode
        lpsw    0                               # Start new kernel...
 .align 8
 .Lrestart_psw:
index ad67c214be047df4c6ddb02f65b0b645de152258..1c5e9e3e2aa497e64a3ad7659e32bd006379e69c 100644 (file)
@@ -8,6 +8,7 @@
 
 #include <linux/linkage.h>
 #include <asm/asm-offsets.h>
+#include <asm/sigp.h>
 
 #
 # store_status: Empty implementation until kdump is supported on 31 bit
@@ -60,7 +61,7 @@ ENTRY(do_reipl_asm)
                bas     %r14,.Ldisab-.Lpg0(%r13)
 .L003:         st      %r1,__LC_SUBCHANNEL_ID
                lpsw    0
-               sigp    0,0,0(6)
+               sigp    0,0,SIGP_RESTART
 .Ldisab:       st      %r14,.Ldispsw+4-.Lpg0(%r13)
                lpsw    .Ldispsw-.Lpg0(%r13)
                .align  8
index 36b32658fb241146d86d672fd498781b3180e441..02f5a73d182010b23527a9c5ec9d294ab31abb16 100644 (file)
@@ -6,6 +6,7 @@
 
 #include <linux/linkage.h>
 #include <asm/asm-offsets.h>
+#include <asm/sigp.h>
 
 #
 # store_status
@@ -106,7 +107,7 @@ ENTRY(do_reipl_asm)
 .L003:         st      %r1,__LC_SUBCHANNEL_ID
                lhi     %r1,0            # mode 0 = esa
                slr     %r0,%r0          # set cpuid to zero
-               sigp    %r1,%r0,0x12     # switch to esa mode
+               sigp    %r1,%r0,SIGP_SET_ARCHITECTURE # switch to esa mode
                lpsw    0
 .Ldisab:       sll     %r14,1
                srl     %r14,1           # need to kill hi bit to avoid specification exceptions.
index c91d70aede919e7af075df789f504d571d8c985c..bfad96a64222a261e0d508b607b19a519c938d2e 100644 (file)
@@ -9,6 +9,7 @@
  */
 
 #include <linux/linkage.h>
+#include <asm/sigp.h>
 
 /*
  * moves the new kernel to its destination...
@@ -93,7 +94,7 @@ ENTRY(relocate_kernel)
        .no_diag308:
                sr      %r1,%r1         # clear %r1
                sr      %r2,%r2         # clear %r2
-               sigp    %r1,%r2,0x12    # set cpuid to zero
+               sigp    %r1,%r2,SIGP_SET_ARCHITECTURE # set cpuid to zero
                lpsw    0               # hopefully start new kernel...
 
                .align  8
index 7c3ce589a7f0cdb3ceef2b08d24977b504f80a23..35508f335688a785b43dbe9dd7a6d3155a7b38a1 100644 (file)
@@ -9,6 +9,7 @@
  */
 
 #include <linux/linkage.h>
+#include <asm/sigp.h>
 
 /*
  * moves the new kernel to its destination...
@@ -45,7 +46,7 @@ ENTRY(relocate_kernel)
                diag    %r0,%r0,0x308
        .back:
                lhi     %r1,1           # mode 1 = esame
-               sigp    %r1,%r0,0x12    # switch to esame mode
+               sigp    %r1,%r0,SIGP_SET_ARCHITECTURE # switch to esame mode
                sam64                   # switch to 64 bit addressing mode
                basr    %r13,0
        .back_base:
@@ -96,7 +97,7 @@ ENTRY(relocate_kernel)
                sam31                   # 31 bit mode
                sr      %r1,%r1         # erase register r1
                sr      %r2,%r2         # erase register r2
-               sigp    %r1,%r2,0x12    # set cpuid to zero
+               sigp    %r1,%r2,SIGP_SET_ARCHITECTURE # set cpuid to zero
                lpsw    0               # hopefully start new kernel...
 
                .align  8
index 53ac2344ca7a6749e8ae1bd802841b43842c06f4..e01408429ad6ab60101c8ed298bd7a0716b56cb9 100644 (file)
@@ -288,11 +288,13 @@ static void pcpu_delegate(struct pcpu *pcpu, void (*func)(void *),
        /* Restart func on the target cpu and stop the current cpu. */
        memcpy_absolute(&lc->restart_stack, &restart, sizeof(restart));
        asm volatile(
-               "0:     sigp    0,%0, # sigp restart to target cpu\n"
+               "0:     sigp    0,%0,%2 # sigp restart to target cpu\n"
                "       brc     2,0b    # busy, try again\n"
-               "1:     sigp    0,%1, # sigp stop to current cpu\n"
+               "1:     sigp    0,%1,%3 # sigp stop to current cpu\n"
                "       brc     2,1b    # busy, try again\n"
-               : : "d" (pcpu->address), "d" (restart.source) : "0", "1", "cc");
+               : : "d" (pcpu->address), "d" (restart.source),
+                   "K" (SIGP_RESTART), "K" (SIGP_STOP)
+               : "0", "1", "cc");
        for (;;) ;
 }
 
index dd70ef046058b22c2dc35a959a0793eaafb4b23b..d4ca4e0617b52ae12e039a6110ef4872f9de07ee 100644 (file)
@@ -12,6 +12,7 @@
 #include <asm/ptrace.h>
 #include <asm/thread_info.h>
 #include <asm/asm-offsets.h>
+#include <asm/sigp.h>
 
 /*
  * Save register context in absolute 0 lowcore and call swsusp_save() to
@@ -163,7 +164,7 @@ ENTRY(swsusp_arch_resume)
        diag    %r0,%r0,0x308
 restart_entry:
        lhi     %r1,1
-       sigp    %r1,%r0,0x12
+       sigp    %r1,%r0,SIGP_SET_ARCHITECTURE
        sam64
        larl    %r1,.Lnew_pgm_check_psw
        lpswe   0(%r1)
@@ -179,7 +180,7 @@ pgm_check_entry:
        larl    %r4,.Lrestart_suspend_psw       /* Set new restart PSW */
        mvc     __LC_RST_NEW_PSW(16,%r0),0(%r4)
 3:
-       sigp    %r9,%r1,11                      /* sigp initial cpu reset */
+       sigp    %r9,%r1,SIGP_INITIAL_CPU_RESET  /* sigp initial cpu reset */
        brc     8,4f                            /* accepted */
        brc     2,3b                            /* busy, try again */
 
@@ -190,16 +191,16 @@ pgm_check_entry:
        larl    %r3,_sclp_print_early
        lghi    %r1,0
        sam31
-       sigp    %r1,%r0,0x12
+       sigp    %r1,%r0,SIGP_SET_ARCHITECTURE
        basr    %r14,%r3
        larl    %r3,.Ldisabled_wait_31
        lpsw    0(%r3)
 4:
        /* Switch to suspend CPU */
-       sigp    %r9,%r1,6               /* sigp restart to suspend CPU */
+       sigp    %r9,%r1,SIGP_RESTART    /* sigp restart to suspend CPU */
        brc     2,4b                    /* busy, try again */
 5:
-       sigp    %r9,%r2,5               /* sigp stop to current resume CPU */
+       sigp    %r9,%r2,SIGP_STOP       /* sigp stop to current resume CPU */
        brc     2,5b                    /* busy, try again */
 6:     j       6b
 
@@ -207,7 +208,7 @@ restart_suspend:
        larl    %r1,.Lresume_cpu
        llgh    %r2,0(%r1)
 7:
-       sigp    %r9,%r2,1               /* sigp sense, wait for resume CPU */
+       sigp    %r9,%r2,SIGP_SENSE      /* sigp sense, wait for resume CPU */
        brc     8,7b                    /* accepted, status 0, still running */
        brc     2,7b                    /* busy, try again */
        tmll    %r9,0x40                /* Test if resume CPU is stopped */