diff options
Diffstat (limited to 'arch/s390/include/asm/ctl_reg.h')
-rw-r--r-- | arch/s390/include/asm/ctl_reg.h | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/arch/s390/include/asm/ctl_reg.h b/arch/s390/include/asm/ctl_reg.h index 31ab9f346d7e..cfad7fca01d6 100644 --- a/arch/s390/include/asm/ctl_reg.h +++ b/arch/s390/include/asm/ctl_reg.h | |||
@@ -9,20 +9,12 @@ | |||
9 | 9 | ||
10 | #include <linux/bug.h> | 10 | #include <linux/bug.h> |
11 | 11 | ||
12 | #ifdef CONFIG_64BIT | ||
13 | # define __CTL_LOAD "lctlg" | ||
14 | # define __CTL_STORE "stctg" | ||
15 | #else | ||
16 | # define __CTL_LOAD "lctl" | ||
17 | # define __CTL_STORE "stctl" | ||
18 | #endif | ||
19 | |||
20 | #define __ctl_load(array, low, high) { \ | 12 | #define __ctl_load(array, low, high) { \ |
21 | typedef struct { char _[sizeof(array)]; } addrtype; \ | 13 | typedef struct { char _[sizeof(array)]; } addrtype; \ |
22 | \ | 14 | \ |
23 | BUILD_BUG_ON(sizeof(addrtype) != (high - low + 1) * sizeof(long));\ | 15 | BUILD_BUG_ON(sizeof(addrtype) != (high - low + 1) * sizeof(long));\ |
24 | asm volatile( \ | 16 | asm volatile( \ |
25 | __CTL_LOAD " %1,%2,%0\n" \ | 17 | " lctlg %1,%2,%0\n" \ |
26 | : : "Q" (*(addrtype *)(&array)), "i" (low), "i" (high));\ | 18 | : : "Q" (*(addrtype *)(&array)), "i" (low), "i" (high));\ |
27 | } | 19 | } |
28 | 20 | ||
@@ -31,7 +23,7 @@ | |||
31 | \ | 23 | \ |
32 | BUILD_BUG_ON(sizeof(addrtype) != (high - low + 1) * sizeof(long));\ | 24 | BUILD_BUG_ON(sizeof(addrtype) != (high - low + 1) * sizeof(long));\ |
33 | asm volatile( \ | 25 | asm volatile( \ |
34 | __CTL_STORE " %1,%2,%0\n" \ | 26 | " stctg %1,%2,%0\n" \ |
35 | : "=Q" (*(addrtype *)(&array)) \ | 27 | : "=Q" (*(addrtype *)(&array)) \ |
36 | : "i" (low), "i" (high)); \ | 28 | : "i" (low), "i" (high)); \ |
37 | } | 29 | } |
@@ -60,9 +52,7 @@ void smp_ctl_clear_bit(int cr, int bit); | |||
60 | union ctlreg0 { | 52 | union ctlreg0 { |
61 | unsigned long val; | 53 | unsigned long val; |
62 | struct { | 54 | struct { |
63 | #ifdef CONFIG_64BIT | ||
64 | unsigned long : 32; | 55 | unsigned long : 32; |
65 | #endif | ||
66 | unsigned long : 3; | 56 | unsigned long : 3; |
67 | unsigned long lap : 1; /* Low-address-protection control */ | 57 | unsigned long lap : 1; /* Low-address-protection control */ |
68 | unsigned long : 4; | 58 | unsigned long : 4; |