diff options
Diffstat (limited to 'arch/s390/include')
-rw-r--r-- | arch/s390/include/asm/page.h | 38 | ||||
-rw-r--r-- | arch/s390/include/asm/sclp.h | 3 | ||||
-rw-r--r-- | arch/s390/include/asm/vdso.h | 5 |
3 files changed, 18 insertions, 28 deletions
diff --git a/arch/s390/include/asm/page.h b/arch/s390/include/asm/page.h index 316c8503a3b4..114258eeaacd 100644 --- a/arch/s390/include/asm/page.h +++ b/arch/s390/include/asm/page.h | |||
@@ -48,33 +48,21 @@ static inline void clear_page(void *page) | |||
48 | : "memory", "cc"); | 48 | : "memory", "cc"); |
49 | } | 49 | } |
50 | 50 | ||
51 | /* | ||
52 | * copy_page uses the mvcl instruction with 0xb0 padding byte in order to | ||
53 | * bypass caches when copying a page. Especially when copying huge pages | ||
54 | * this keeps L1 and L2 data caches alive. | ||
55 | */ | ||
51 | static inline void copy_page(void *to, void *from) | 56 | static inline void copy_page(void *to, void *from) |
52 | { | 57 | { |
53 | if (MACHINE_HAS_MVPG) { | 58 | register void *reg2 asm ("2") = to; |
54 | register unsigned long reg0 asm ("0") = 0; | 59 | register unsigned long reg3 asm ("3") = 0x1000; |
55 | asm volatile( | 60 | register void *reg4 asm ("4") = from; |
56 | " mvpg %0,%1" | 61 | register unsigned long reg5 asm ("5") = 0xb0001000; |
57 | : : "a" (to), "a" (from), "d" (reg0) | 62 | asm volatile( |
58 | : "memory", "cc"); | 63 | " mvcl 2,4" |
59 | } else | 64 | : "+d" (reg2), "+d" (reg3), "+d" (reg4), "+d" (reg5) |
60 | asm volatile( | 65 | : : "memory", "cc"); |
61 | " mvc 0(256,%0),0(%1)\n" | ||
62 | " mvc 256(256,%0),256(%1)\n" | ||
63 | " mvc 512(256,%0),512(%1)\n" | ||
64 | " mvc 768(256,%0),768(%1)\n" | ||
65 | " mvc 1024(256,%0),1024(%1)\n" | ||
66 | " mvc 1280(256,%0),1280(%1)\n" | ||
67 | " mvc 1536(256,%0),1536(%1)\n" | ||
68 | " mvc 1792(256,%0),1792(%1)\n" | ||
69 | " mvc 2048(256,%0),2048(%1)\n" | ||
70 | " mvc 2304(256,%0),2304(%1)\n" | ||
71 | " mvc 2560(256,%0),2560(%1)\n" | ||
72 | " mvc 2816(256,%0),2816(%1)\n" | ||
73 | " mvc 3072(256,%0),3072(%1)\n" | ||
74 | " mvc 3328(256,%0),3328(%1)\n" | ||
75 | " mvc 3584(256,%0),3584(%1)\n" | ||
76 | " mvc 3840(256,%0),3840(%1)\n" | ||
77 | : : "a" (to), "a" (from) : "memory"); | ||
78 | } | 66 | } |
79 | 67 | ||
80 | #define clear_user_page(page, vaddr, pg) clear_page(page) | 68 | #define clear_user_page(page, vaddr, pg) clear_page(page) |
diff --git a/arch/s390/include/asm/sclp.h b/arch/s390/include/asm/sclp.h index 30ef748bc161..2f390956c7c1 100644 --- a/arch/s390/include/asm/sclp.h +++ b/arch/s390/include/asm/sclp.h | |||
@@ -8,6 +8,7 @@ | |||
8 | 8 | ||
9 | #include <linux/types.h> | 9 | #include <linux/types.h> |
10 | #include <asm/chpid.h> | 10 | #include <asm/chpid.h> |
11 | #include <asm/cpu.h> | ||
11 | 12 | ||
12 | #define SCLP_CHP_INFO_MASK_SIZE 32 | 13 | #define SCLP_CHP_INFO_MASK_SIZE 32 |
13 | 14 | ||
@@ -37,7 +38,7 @@ struct sclp_cpu_info { | |||
37 | unsigned int standby; | 38 | unsigned int standby; |
38 | unsigned int combined; | 39 | unsigned int combined; |
39 | int has_cpu_type; | 40 | int has_cpu_type; |
40 | struct sclp_cpu_entry cpu[255]; | 41 | struct sclp_cpu_entry cpu[MAX_CPU_ADDRESS + 1]; |
41 | }; | 42 | }; |
42 | 43 | ||
43 | int sclp_get_cpu_info(struct sclp_cpu_info *info); | 44 | int sclp_get_cpu_info(struct sclp_cpu_info *info); |
diff --git a/arch/s390/include/asm/vdso.h b/arch/s390/include/asm/vdso.h index a73eb2e1e918..bc9746a7d47c 100644 --- a/arch/s390/include/asm/vdso.h +++ b/arch/s390/include/asm/vdso.h | |||
@@ -26,8 +26,9 @@ struct vdso_data { | |||
26 | __u64 wtom_clock_nsec; /* 0x28 */ | 26 | __u64 wtom_clock_nsec; /* 0x28 */ |
27 | __u32 tz_minuteswest; /* Minutes west of Greenwich 0x30 */ | 27 | __u32 tz_minuteswest; /* Minutes west of Greenwich 0x30 */ |
28 | __u32 tz_dsttime; /* Type of dst correction 0x34 */ | 28 | __u32 tz_dsttime; /* Type of dst correction 0x34 */ |
29 | __u32 ectg_available; | 29 | __u32 ectg_available; /* ECTG instruction present 0x38 */ |
30 | __u32 ntp_mult; /* NTP adjusted multiplier 0x3C */ | 30 | __u32 tk_mult; /* Mult. used for xtime_nsec 0x3c */ |
31 | __u32 tk_shift; /* Shift used for xtime_nsec 0x40 */ | ||
31 | }; | 32 | }; |
32 | 33 | ||
33 | struct vdso_per_cpu_data { | 34 | struct vdso_per_cpu_data { |