diff options
Diffstat (limited to 'arch/s390/include')
-rw-r--r-- | arch/s390/include/asm/cputime.h | 142 | ||||
-rw-r--r-- | arch/s390/include/asm/debug.h | 4 | ||||
-rw-r--r-- | arch/s390/include/asm/kdebug.h | 2 | ||||
-rw-r--r-- | arch/s390/include/asm/lowcore.h | 142 | ||||
-rw-r--r-- | arch/s390/include/asm/pgtable.h | 23 | ||||
-rw-r--r-- | arch/s390/include/asm/processor.h | 2 | ||||
-rw-r--r-- | arch/s390/include/asm/ptrace.h | 3 | ||||
-rw-r--r-- | arch/s390/include/asm/qdio.h | 5 | ||||
-rw-r--r-- | arch/s390/include/asm/sigp.h | 1 | ||||
-rw-r--r-- | arch/s390/include/asm/smp.h | 1 | ||||
-rw-r--r-- | arch/s390/include/asm/socket.h | 3 | ||||
-rw-r--r-- | arch/s390/include/asm/sparsemem.h | 4 | ||||
-rw-r--r-- | arch/s390/include/asm/syscall.h | 2 | ||||
-rw-r--r-- | arch/s390/include/asm/system.h | 2 | ||||
-rw-r--r-- | arch/s390/include/asm/thread_info.h | 2 | ||||
-rw-r--r-- | arch/s390/include/asm/topology.h | 40 | ||||
-rw-r--r-- | arch/s390/include/asm/types.h | 2 | ||||
-rw-r--r-- | arch/s390/include/asm/unistd.h | 1 |
18 files changed, 194 insertions, 187 deletions
diff --git a/arch/s390/include/asm/cputime.h b/arch/s390/include/asm/cputime.h index 081434878296..c23c3900c304 100644 --- a/arch/s390/include/asm/cputime.h +++ b/arch/s390/include/asm/cputime.h | |||
@@ -16,114 +16,100 @@ | |||
16 | 16 | ||
17 | /* We want to use full resolution of the CPU timer: 2**-12 micro-seconds. */ | 17 | /* We want to use full resolution of the CPU timer: 2**-12 micro-seconds. */ |
18 | 18 | ||
19 | typedef unsigned long long cputime_t; | 19 | typedef unsigned long long __nocast cputime_t; |
20 | typedef unsigned long long cputime64_t; | 20 | typedef unsigned long long __nocast cputime64_t; |
21 | 21 | ||
22 | #ifndef __s390x__ | 22 | static inline unsigned long __div(unsigned long long n, unsigned long base) |
23 | |||
24 | static inline unsigned int | ||
25 | __div(unsigned long long n, unsigned int base) | ||
26 | { | 23 | { |
24 | #ifndef __s390x__ | ||
27 | register_pair rp; | 25 | register_pair rp; |
28 | 26 | ||
29 | rp.pair = n >> 1; | 27 | rp.pair = n >> 1; |
30 | asm ("dr %0,%1" : "+d" (rp) : "d" (base >> 1)); | 28 | asm ("dr %0,%1" : "+d" (rp) : "d" (base >> 1)); |
31 | return rp.subreg.odd; | 29 | return rp.subreg.odd; |
30 | #else /* __s390x__ */ | ||
31 | return n / base; | ||
32 | #endif /* __s390x__ */ | ||
32 | } | 33 | } |
33 | 34 | ||
34 | #else /* __s390x__ */ | 35 | #define cputime_one_jiffy jiffies_to_cputime(1) |
36 | |||
37 | /* | ||
38 | * Convert cputime to jiffies and back. | ||
39 | */ | ||
40 | static inline unsigned long cputime_to_jiffies(const cputime_t cputime) | ||
41 | { | ||
42 | return __div((__force unsigned long long) cputime, 4096000000ULL / HZ); | ||
43 | } | ||
35 | 44 | ||
36 | static inline unsigned int | 45 | static inline cputime_t jiffies_to_cputime(const unsigned int jif) |
37 | __div(unsigned long long n, unsigned int base) | ||
38 | { | 46 | { |
39 | return n / base; | 47 | return (__force cputime_t)(jif * (4096000000ULL / HZ)); |
40 | } | 48 | } |
41 | 49 | ||
42 | #endif /* __s390x__ */ | 50 | static inline u64 cputime64_to_jiffies64(cputime64_t cputime) |
51 | { | ||
52 | unsigned long long jif = (__force unsigned long long) cputime; | ||
53 | do_div(jif, 4096000000ULL / HZ); | ||
54 | return jif; | ||
55 | } | ||
43 | 56 | ||
44 | #define cputime_zero (0ULL) | 57 | static inline cputime64_t jiffies64_to_cputime64(const u64 jif) |
45 | #define cputime_one_jiffy jiffies_to_cputime(1) | 58 | { |
46 | #define cputime_max ((~0UL >> 1) - 1) | 59 | return (__force cputime64_t)(jif * (4096000000ULL / HZ)); |
47 | #define cputime_add(__a, __b) ((__a) + (__b)) | ||
48 | #define cputime_sub(__a, __b) ((__a) - (__b)) | ||
49 | #define cputime_div(__a, __n) ({ \ | ||
50 | unsigned long long __div = (__a); \ | ||
51 | do_div(__div,__n); \ | ||
52 | __div; \ | ||
53 | }) | ||
54 | #define cputime_halve(__a) ((__a) >> 1) | ||
55 | #define cputime_eq(__a, __b) ((__a) == (__b)) | ||
56 | #define cputime_gt(__a, __b) ((__a) > (__b)) | ||
57 | #define cputime_ge(__a, __b) ((__a) >= (__b)) | ||
58 | #define cputime_lt(__a, __b) ((__a) < (__b)) | ||
59 | #define cputime_le(__a, __b) ((__a) <= (__b)) | ||
60 | #define cputime_to_jiffies(__ct) (__div((__ct), 4096000000ULL / HZ)) | ||
61 | #define cputime_to_scaled(__ct) (__ct) | ||
62 | #define jiffies_to_cputime(__hz) ((cputime_t)(__hz) * (4096000000ULL / HZ)) | ||
63 | |||
64 | #define cputime64_zero (0ULL) | ||
65 | #define cputime64_add(__a, __b) ((__a) + (__b)) | ||
66 | #define cputime_to_cputime64(__ct) (__ct) | ||
67 | |||
68 | static inline u64 | ||
69 | cputime64_to_jiffies64(cputime64_t cputime) | ||
70 | { | ||
71 | do_div(cputime, 4096000000ULL / HZ); | ||
72 | return cputime; | ||
73 | } | 60 | } |
74 | 61 | ||
75 | /* | 62 | /* |
76 | * Convert cputime to microseconds and back. | 63 | * Convert cputime to microseconds and back. |
77 | */ | 64 | */ |
78 | static inline unsigned int | 65 | static inline unsigned int cputime_to_usecs(const cputime_t cputime) |
79 | cputime_to_usecs(const cputime_t cputime) | ||
80 | { | 66 | { |
81 | return cputime_div(cputime, 4096); | 67 | return (__force unsigned long long) cputime >> 12; |
82 | } | 68 | } |
83 | 69 | ||
84 | static inline cputime_t | 70 | static inline cputime_t usecs_to_cputime(const unsigned int m) |
85 | usecs_to_cputime(const unsigned int m) | ||
86 | { | 71 | { |
87 | return (cputime_t) m * 4096; | 72 | return (__force cputime_t)(m * 4096ULL); |
88 | } | 73 | } |
89 | 74 | ||
75 | #define usecs_to_cputime64(m) usecs_to_cputime(m) | ||
76 | |||
90 | /* | 77 | /* |
91 | * Convert cputime to milliseconds and back. | 78 | * Convert cputime to milliseconds and back. |
92 | */ | 79 | */ |
93 | static inline unsigned int | 80 | static inline unsigned int cputime_to_secs(const cputime_t cputime) |
94 | cputime_to_secs(const cputime_t cputime) | ||
95 | { | 81 | { |
96 | return __div(cputime, 2048000000) >> 1; | 82 | return __div((__force unsigned long long) cputime, 2048000000) >> 1; |
97 | } | 83 | } |
98 | 84 | ||
99 | static inline cputime_t | 85 | static inline cputime_t secs_to_cputime(const unsigned int s) |
100 | secs_to_cputime(const unsigned int s) | ||
101 | { | 86 | { |
102 | return (cputime_t) s * 4096000000ULL; | 87 | return (__force cputime_t)(s * 4096000000ULL); |
103 | } | 88 | } |
104 | 89 | ||
105 | /* | 90 | /* |
106 | * Convert cputime to timespec and back. | 91 | * Convert cputime to timespec and back. |
107 | */ | 92 | */ |
108 | static inline cputime_t | 93 | static inline cputime_t timespec_to_cputime(const struct timespec *value) |
109 | timespec_to_cputime(const struct timespec *value) | ||
110 | { | 94 | { |
111 | return value->tv_nsec * 4096 / 1000 + (u64) value->tv_sec * 4096000000ULL; | 95 | unsigned long long ret = value->tv_sec * 4096000000ULL; |
96 | return (__force cputime_t)(ret + value->tv_nsec * 4096 / 1000); | ||
112 | } | 97 | } |
113 | 98 | ||
114 | static inline void | 99 | static inline void cputime_to_timespec(const cputime_t cputime, |
115 | cputime_to_timespec(const cputime_t cputime, struct timespec *value) | 100 | struct timespec *value) |
116 | { | 101 | { |
102 | unsigned long long __cputime = (__force unsigned long long) cputime; | ||
117 | #ifndef __s390x__ | 103 | #ifndef __s390x__ |
118 | register_pair rp; | 104 | register_pair rp; |
119 | 105 | ||
120 | rp.pair = cputime >> 1; | 106 | rp.pair = __cputime >> 1; |
121 | asm ("dr %0,%1" : "+d" (rp) : "d" (2048000000UL)); | 107 | asm ("dr %0,%1" : "+d" (rp) : "d" (2048000000UL)); |
122 | value->tv_nsec = rp.subreg.even * 1000 / 4096; | 108 | value->tv_nsec = rp.subreg.even * 1000 / 4096; |
123 | value->tv_sec = rp.subreg.odd; | 109 | value->tv_sec = rp.subreg.odd; |
124 | #else | 110 | #else |
125 | value->tv_nsec = (cputime % 4096000000ULL) * 1000 / 4096; | 111 | value->tv_nsec = (__cputime % 4096000000ULL) * 1000 / 4096; |
126 | value->tv_sec = cputime / 4096000000ULL; | 112 | value->tv_sec = __cputime / 4096000000ULL; |
127 | #endif | 113 | #endif |
128 | } | 114 | } |
129 | 115 | ||
@@ -132,50 +118,52 @@ cputime_to_timespec(const cputime_t cputime, struct timespec *value) | |||
132 | * Since cputime and timeval have the same resolution (microseconds) | 118 | * Since cputime and timeval have the same resolution (microseconds) |
133 | * this is easy. | 119 | * this is easy. |
134 | */ | 120 | */ |
135 | static inline cputime_t | 121 | static inline cputime_t timeval_to_cputime(const struct timeval *value) |
136 | timeval_to_cputime(const struct timeval *value) | ||
137 | { | 122 | { |
138 | return value->tv_usec * 4096 + (u64) value->tv_sec * 4096000000ULL; | 123 | unsigned long long ret = value->tv_sec * 4096000000ULL; |
124 | return (__force cputime_t)(ret + value->tv_usec * 4096ULL); | ||
139 | } | 125 | } |
140 | 126 | ||
141 | static inline void | 127 | static inline void cputime_to_timeval(const cputime_t cputime, |
142 | cputime_to_timeval(const cputime_t cputime, struct timeval *value) | 128 | struct timeval *value) |
143 | { | 129 | { |
130 | unsigned long long __cputime = (__force unsigned long long) cputime; | ||
144 | #ifndef __s390x__ | 131 | #ifndef __s390x__ |
145 | register_pair rp; | 132 | register_pair rp; |
146 | 133 | ||
147 | rp.pair = cputime >> 1; | 134 | rp.pair = __cputime >> 1; |
148 | asm ("dr %0,%1" : "+d" (rp) : "d" (2048000000UL)); | 135 | asm ("dr %0,%1" : "+d" (rp) : "d" (2048000000UL)); |
149 | value->tv_usec = rp.subreg.even / 4096; | 136 | value->tv_usec = rp.subreg.even / 4096; |
150 | value->tv_sec = rp.subreg.odd; | 137 | value->tv_sec = rp.subreg.odd; |
151 | #else | 138 | #else |
152 | value->tv_usec = (cputime % 4096000000ULL) / 4096; | 139 | value->tv_usec = (__cputime % 4096000000ULL) / 4096; |
153 | value->tv_sec = cputime / 4096000000ULL; | 140 | value->tv_sec = __cputime / 4096000000ULL; |
154 | #endif | 141 | #endif |
155 | } | 142 | } |
156 | 143 | ||
157 | /* | 144 | /* |
158 | * Convert cputime to clock and back. | 145 | * Convert cputime to clock and back. |
159 | */ | 146 | */ |
160 | static inline clock_t | 147 | static inline clock_t cputime_to_clock_t(cputime_t cputime) |
161 | cputime_to_clock_t(cputime_t cputime) | ||
162 | { | 148 | { |
163 | return cputime_div(cputime, 4096000000ULL / USER_HZ); | 149 | unsigned long long clock = (__force unsigned long long) cputime; |
150 | do_div(clock, 4096000000ULL / USER_HZ); | ||
151 | return clock; | ||
164 | } | 152 | } |
165 | 153 | ||
166 | static inline cputime_t | 154 | static inline cputime_t clock_t_to_cputime(unsigned long x) |
167 | clock_t_to_cputime(unsigned long x) | ||
168 | { | 155 | { |
169 | return (cputime_t) x * (4096000000ULL / USER_HZ); | 156 | return (__force cputime_t)(x * (4096000000ULL / USER_HZ)); |
170 | } | 157 | } |
171 | 158 | ||
172 | /* | 159 | /* |
173 | * Convert cputime64 to clock. | 160 | * Convert cputime64 to clock. |
174 | */ | 161 | */ |
175 | static inline clock_t | 162 | static inline clock_t cputime64_to_clock_t(cputime64_t cputime) |
176 | cputime64_to_clock_t(cputime64_t cputime) | ||
177 | { | 163 | { |
178 | return cputime_div(cputime, 4096000000ULL / USER_HZ); | 164 | unsigned long long clock = (__force unsigned long long) cputime; |
165 | do_div(clock, 4096000000ULL / USER_HZ); | ||
166 | return clock; | ||
179 | } | 167 | } |
180 | 168 | ||
181 | struct s390_idle_data { | 169 | struct s390_idle_data { |
diff --git a/arch/s390/include/asm/debug.h b/arch/s390/include/asm/debug.h index 18124b75a7ab..9d88db1f55d0 100644 --- a/arch/s390/include/asm/debug.h +++ b/arch/s390/include/asm/debug.h | |||
@@ -73,7 +73,7 @@ typedef struct debug_info { | |||
73 | struct dentry* debugfs_entries[DEBUG_MAX_VIEWS]; | 73 | struct dentry* debugfs_entries[DEBUG_MAX_VIEWS]; |
74 | struct debug_view* views[DEBUG_MAX_VIEWS]; | 74 | struct debug_view* views[DEBUG_MAX_VIEWS]; |
75 | char name[DEBUG_MAX_NAME_LEN]; | 75 | char name[DEBUG_MAX_NAME_LEN]; |
76 | mode_t mode; | 76 | umode_t mode; |
77 | } debug_info_t; | 77 | } debug_info_t; |
78 | 78 | ||
79 | typedef int (debug_header_proc_t) (debug_info_t* id, | 79 | typedef int (debug_header_proc_t) (debug_info_t* id, |
@@ -124,7 +124,7 @@ debug_info_t *debug_register(const char *name, int pages, int nr_areas, | |||
124 | int buf_size); | 124 | int buf_size); |
125 | 125 | ||
126 | debug_info_t *debug_register_mode(const char *name, int pages, int nr_areas, | 126 | debug_info_t *debug_register_mode(const char *name, int pages, int nr_areas, |
127 | int buf_size, mode_t mode, uid_t uid, | 127 | int buf_size, umode_t mode, uid_t uid, |
128 | gid_t gid); | 128 | gid_t gid); |
129 | 129 | ||
130 | void debug_unregister(debug_info_t* id); | 130 | void debug_unregister(debug_info_t* id); |
diff --git a/arch/s390/include/asm/kdebug.h b/arch/s390/include/asm/kdebug.h index 40db27cd6e60..5c1abd47612a 100644 --- a/arch/s390/include/asm/kdebug.h +++ b/arch/s390/include/asm/kdebug.h | |||
@@ -22,6 +22,6 @@ enum die_val { | |||
22 | DIE_NMI_IPI, | 22 | DIE_NMI_IPI, |
23 | }; | 23 | }; |
24 | 24 | ||
25 | extern void die(const char *, struct pt_regs *, long); | 25 | extern void die(struct pt_regs *, const char *); |
26 | 26 | ||
27 | #endif | 27 | #endif |
diff --git a/arch/s390/include/asm/lowcore.h b/arch/s390/include/asm/lowcore.h index 9e13c7d56cc1..707f2306725b 100644 --- a/arch/s390/include/asm/lowcore.h +++ b/arch/s390/include/asm/lowcore.h | |||
@@ -97,47 +97,52 @@ struct _lowcore { | |||
97 | __u32 gpregs_save_area[16]; /* 0x0180 */ | 97 | __u32 gpregs_save_area[16]; /* 0x0180 */ |
98 | __u32 cregs_save_area[16]; /* 0x01c0 */ | 98 | __u32 cregs_save_area[16]; /* 0x01c0 */ |
99 | 99 | ||
100 | /* Save areas. */ | ||
101 | __u32 save_area_sync[8]; /* 0x0200 */ | ||
102 | __u32 save_area_async[8]; /* 0x0220 */ | ||
103 | __u32 save_area_restart[1]; /* 0x0240 */ | ||
104 | __u8 pad_0x0244[0x0248-0x0244]; /* 0x0244 */ | ||
105 | |||
100 | /* Return psws. */ | 106 | /* Return psws. */ |
101 | __u32 save_area[16]; /* 0x0200 */ | 107 | psw_t return_psw; /* 0x0248 */ |
102 | psw_t return_psw; /* 0x0240 */ | 108 | psw_t return_mcck_psw; /* 0x0250 */ |
103 | psw_t return_mcck_psw; /* 0x0248 */ | ||
104 | 109 | ||
105 | /* CPU time accounting values */ | 110 | /* CPU time accounting values */ |
106 | __u64 sync_enter_timer; /* 0x0250 */ | 111 | __u64 sync_enter_timer; /* 0x0258 */ |
107 | __u64 async_enter_timer; /* 0x0258 */ | 112 | __u64 async_enter_timer; /* 0x0260 */ |
108 | __u64 mcck_enter_timer; /* 0x0260 */ | 113 | __u64 mcck_enter_timer; /* 0x0268 */ |
109 | __u64 exit_timer; /* 0x0268 */ | 114 | __u64 exit_timer; /* 0x0270 */ |
110 | __u64 user_timer; /* 0x0270 */ | 115 | __u64 user_timer; /* 0x0278 */ |
111 | __u64 system_timer; /* 0x0278 */ | 116 | __u64 system_timer; /* 0x0280 */ |
112 | __u64 steal_timer; /* 0x0280 */ | 117 | __u64 steal_timer; /* 0x0288 */ |
113 | __u64 last_update_timer; /* 0x0288 */ | 118 | __u64 last_update_timer; /* 0x0290 */ |
114 | __u64 last_update_clock; /* 0x0290 */ | 119 | __u64 last_update_clock; /* 0x0298 */ |
115 | 120 | ||
116 | /* Current process. */ | 121 | /* Current process. */ |
117 | __u32 current_task; /* 0x0298 */ | 122 | __u32 current_task; /* 0x02a0 */ |
118 | __u32 thread_info; /* 0x029c */ | 123 | __u32 thread_info; /* 0x02a4 */ |
119 | __u32 kernel_stack; /* 0x02a0 */ | 124 | __u32 kernel_stack; /* 0x02a8 */ |
120 | 125 | ||
121 | /* Interrupt and panic stack. */ | 126 | /* Interrupt and panic stack. */ |
122 | __u32 async_stack; /* 0x02a4 */ | 127 | __u32 async_stack; /* 0x02ac */ |
123 | __u32 panic_stack; /* 0x02a8 */ | 128 | __u32 panic_stack; /* 0x02b0 */ |
124 | 129 | ||
125 | /* Address space pointer. */ | 130 | /* Address space pointer. */ |
126 | __u32 kernel_asce; /* 0x02ac */ | 131 | __u32 kernel_asce; /* 0x02b4 */ |
127 | __u32 user_asce; /* 0x02b0 */ | 132 | __u32 user_asce; /* 0x02b8 */ |
128 | __u32 current_pid; /* 0x02b4 */ | 133 | __u32 current_pid; /* 0x02bc */ |
129 | 134 | ||
130 | /* SMP info area */ | 135 | /* SMP info area */ |
131 | __u32 cpu_nr; /* 0x02b8 */ | 136 | __u32 cpu_nr; /* 0x02c0 */ |
132 | __u32 softirq_pending; /* 0x02bc */ | 137 | __u32 softirq_pending; /* 0x02c4 */ |
133 | __u32 percpu_offset; /* 0x02c0 */ | 138 | __u32 percpu_offset; /* 0x02c8 */ |
134 | __u32 ext_call_fast; /* 0x02c4 */ | 139 | __u32 ext_call_fast; /* 0x02cc */ |
135 | __u64 int_clock; /* 0x02c8 */ | 140 | __u64 int_clock; /* 0x02d0 */ |
136 | __u64 mcck_clock; /* 0x02d0 */ | 141 | __u64 mcck_clock; /* 0x02d8 */ |
137 | __u64 clock_comparator; /* 0x02d8 */ | 142 | __u64 clock_comparator; /* 0x02e0 */ |
138 | __u32 machine_flags; /* 0x02e0 */ | 143 | __u32 machine_flags; /* 0x02e8 */ |
139 | __u32 ftrace_func; /* 0x02e4 */ | 144 | __u32 ftrace_func; /* 0x02ec */ |
140 | __u8 pad_0x02e8[0x0300-0x02e8]; /* 0x02e8 */ | 145 | __u8 pad_0x02f8[0x0300-0x02f0]; /* 0x02f0 */ |
141 | 146 | ||
142 | /* Interrupt response block */ | 147 | /* Interrupt response block */ |
143 | __u8 irb[64]; /* 0x0300 */ | 148 | __u8 irb[64]; /* 0x0300 */ |
@@ -229,57 +234,62 @@ struct _lowcore { | |||
229 | psw_t mcck_new_psw; /* 0x01e0 */ | 234 | psw_t mcck_new_psw; /* 0x01e0 */ |
230 | psw_t io_new_psw; /* 0x01f0 */ | 235 | psw_t io_new_psw; /* 0x01f0 */ |
231 | 236 | ||
232 | /* Entry/exit save area & return psws. */ | 237 | /* Save areas. */ |
233 | __u64 save_area[16]; /* 0x0200 */ | 238 | __u64 save_area_sync[8]; /* 0x0200 */ |
234 | psw_t return_psw; /* 0x0280 */ | 239 | __u64 save_area_async[8]; /* 0x0240 */ |
235 | psw_t return_mcck_psw; /* 0x0290 */ | 240 | __u64 save_area_restart[1]; /* 0x0280 */ |
241 | __u8 pad_0x0288[0x0290-0x0288]; /* 0x0288 */ | ||
242 | |||
243 | /* Return psws. */ | ||
244 | psw_t return_psw; /* 0x0290 */ | ||
245 | psw_t return_mcck_psw; /* 0x02a0 */ | ||
236 | 246 | ||
237 | /* CPU accounting and timing values. */ | 247 | /* CPU accounting and timing values. */ |
238 | __u64 sync_enter_timer; /* 0x02a0 */ | 248 | __u64 sync_enter_timer; /* 0x02b0 */ |
239 | __u64 async_enter_timer; /* 0x02a8 */ | 249 | __u64 async_enter_timer; /* 0x02b8 */ |
240 | __u64 mcck_enter_timer; /* 0x02b0 */ | 250 | __u64 mcck_enter_timer; /* 0x02c0 */ |
241 | __u64 exit_timer; /* 0x02b8 */ | 251 | __u64 exit_timer; /* 0x02c8 */ |
242 | __u64 user_timer; /* 0x02c0 */ | 252 | __u64 user_timer; /* 0x02d0 */ |
243 | __u64 system_timer; /* 0x02c8 */ | 253 | __u64 system_timer; /* 0x02d8 */ |
244 | __u64 steal_timer; /* 0x02d0 */ | 254 | __u64 steal_timer; /* 0x02e0 */ |
245 | __u64 last_update_timer; /* 0x02d8 */ | 255 | __u64 last_update_timer; /* 0x02e8 */ |
246 | __u64 last_update_clock; /* 0x02e0 */ | 256 | __u64 last_update_clock; /* 0x02f0 */ |
247 | 257 | ||
248 | /* Current process. */ | 258 | /* Current process. */ |
249 | __u64 current_task; /* 0x02e8 */ | 259 | __u64 current_task; /* 0x02f8 */ |
250 | __u64 thread_info; /* 0x02f0 */ | 260 | __u64 thread_info; /* 0x0300 */ |
251 | __u64 kernel_stack; /* 0x02f8 */ | 261 | __u64 kernel_stack; /* 0x0308 */ |
252 | 262 | ||
253 | /* Interrupt and panic stack. */ | 263 | /* Interrupt and panic stack. */ |
254 | __u64 async_stack; /* 0x0300 */ | 264 | __u64 async_stack; /* 0x0310 */ |
255 | __u64 panic_stack; /* 0x0308 */ | 265 | __u64 panic_stack; /* 0x0318 */ |
256 | 266 | ||
257 | /* Address space pointer. */ | 267 | /* Address space pointer. */ |
258 | __u64 kernel_asce; /* 0x0310 */ | 268 | __u64 kernel_asce; /* 0x0320 */ |
259 | __u64 user_asce; /* 0x0318 */ | 269 | __u64 user_asce; /* 0x0328 */ |
260 | __u64 current_pid; /* 0x0320 */ | 270 | __u64 current_pid; /* 0x0330 */ |
261 | 271 | ||
262 | /* SMP info area */ | 272 | /* SMP info area */ |
263 | __u32 cpu_nr; /* 0x0328 */ | 273 | __u32 cpu_nr; /* 0x0338 */ |
264 | __u32 softirq_pending; /* 0x032c */ | 274 | __u32 softirq_pending; /* 0x033c */ |
265 | __u64 percpu_offset; /* 0x0330 */ | 275 | __u64 percpu_offset; /* 0x0340 */ |
266 | __u64 ext_call_fast; /* 0x0338 */ | 276 | __u64 ext_call_fast; /* 0x0348 */ |
267 | __u64 int_clock; /* 0x0340 */ | 277 | __u64 int_clock; /* 0x0350 */ |
268 | __u64 mcck_clock; /* 0x0348 */ | 278 | __u64 mcck_clock; /* 0x0358 */ |
269 | __u64 clock_comparator; /* 0x0350 */ | 279 | __u64 clock_comparator; /* 0x0360 */ |
270 | __u64 vdso_per_cpu_data; /* 0x0358 */ | 280 | __u64 vdso_per_cpu_data; /* 0x0368 */ |
271 | __u64 machine_flags; /* 0x0360 */ | 281 | __u64 machine_flags; /* 0x0370 */ |
272 | __u64 ftrace_func; /* 0x0368 */ | 282 | __u64 ftrace_func; /* 0x0378 */ |
273 | __u64 gmap; /* 0x0370 */ | 283 | __u64 gmap; /* 0x0380 */ |
274 | __u64 cmf_hpp; /* 0x0378 */ | 284 | __u8 pad_0x0388[0x0400-0x0388]; /* 0x0388 */ |
275 | 285 | ||
276 | /* Interrupt response block. */ | 286 | /* Interrupt response block. */ |
277 | __u8 irb[64]; /* 0x0380 */ | 287 | __u8 irb[64]; /* 0x0400 */ |
278 | 288 | ||
279 | /* Per cpu primary space access list */ | 289 | /* Per cpu primary space access list */ |
280 | __u32 paste[16]; /* 0x03c0 */ | 290 | __u32 paste[16]; /* 0x0440 */ |
281 | 291 | ||
282 | __u8 pad_0x0400[0x0e00-0x0400]; /* 0x0400 */ | 292 | __u8 pad_0x0480[0x0e00-0x0480]; /* 0x0480 */ |
283 | 293 | ||
284 | /* | 294 | /* |
285 | * 0xe00 contains the address of the IPL Parameter Information | 295 | * 0xe00 contains the address of the IPL Parameter Information |
diff --git a/arch/s390/include/asm/pgtable.h b/arch/s390/include/asm/pgtable.h index 4f289ff0b7fe..011358c1b18e 100644 --- a/arch/s390/include/asm/pgtable.h +++ b/arch/s390/include/asm/pgtable.h | |||
@@ -128,28 +128,11 @@ static inline int is_zero_pfn(unsigned long pfn) | |||
128 | * effect, this also makes sure that 64 bit module code cannot be used | 128 | * effect, this also makes sure that 64 bit module code cannot be used |
129 | * as system call address. | 129 | * as system call address. |
130 | */ | 130 | */ |
131 | |||
132 | extern unsigned long VMALLOC_START; | 131 | extern unsigned long VMALLOC_START; |
132 | extern unsigned long VMALLOC_END; | ||
133 | extern struct page *vmemmap; | ||
133 | 134 | ||
134 | #ifndef __s390x__ | 135 | #define VMEM_MAX_PHYS ((unsigned long) vmemmap) |
135 | #define VMALLOC_SIZE (96UL << 20) | ||
136 | #define VMALLOC_END 0x7e000000UL | ||
137 | #define VMEM_MAP_END 0x80000000UL | ||
138 | #else /* __s390x__ */ | ||
139 | #define VMALLOC_SIZE (128UL << 30) | ||
140 | #define VMALLOC_END 0x3e000000000UL | ||
141 | #define VMEM_MAP_END 0x40000000000UL | ||
142 | #endif /* __s390x__ */ | ||
143 | |||
144 | /* | ||
145 | * VMEM_MAX_PHYS is the highest physical address that can be added to the 1:1 | ||
146 | * mapping. This needs to be calculated at compile time since the size of the | ||
147 | * VMEM_MAP is static but the size of struct page can change. | ||
148 | */ | ||
149 | #define VMEM_MAX_PAGES ((VMEM_MAP_END - VMALLOC_END) / sizeof(struct page)) | ||
150 | #define VMEM_MAX_PFN min(VMALLOC_START >> PAGE_SHIFT, VMEM_MAX_PAGES) | ||
151 | #define VMEM_MAX_PHYS ((VMEM_MAX_PFN << PAGE_SHIFT) & ~((16 << 20) - 1)) | ||
152 | #define vmemmap ((struct page *) VMALLOC_END) | ||
153 | 136 | ||
154 | /* | 137 | /* |
155 | * A 31 bit pagetable entry of S390 has following format: | 138 | * A 31 bit pagetable entry of S390 has following format: |
diff --git a/arch/s390/include/asm/processor.h b/arch/s390/include/asm/processor.h index 5f33d37d032c..27272f6a14c2 100644 --- a/arch/s390/include/asm/processor.h +++ b/arch/s390/include/asm/processor.h | |||
@@ -80,8 +80,6 @@ struct thread_struct { | |||
80 | unsigned int acrs[NUM_ACRS]; | 80 | unsigned int acrs[NUM_ACRS]; |
81 | unsigned long ksp; /* kernel stack pointer */ | 81 | unsigned long ksp; /* kernel stack pointer */ |
82 | mm_segment_t mm_segment; | 82 | mm_segment_t mm_segment; |
83 | unsigned long prot_addr; /* address of protection-excep. */ | ||
84 | unsigned int trap_no; | ||
85 | unsigned long gmap_addr; /* address of last gmap fault. */ | 83 | unsigned long gmap_addr; /* address of last gmap fault. */ |
86 | struct per_regs per_user; /* User specified PER registers */ | 84 | struct per_regs per_user; /* User specified PER registers */ |
87 | struct per_event per_event; /* Cause of the last PER trap */ | 85 | struct per_event per_event; /* Cause of the last PER trap */ |
diff --git a/arch/s390/include/asm/ptrace.h b/arch/s390/include/asm/ptrace.h index a65846340d51..56da355678f4 100644 --- a/arch/s390/include/asm/ptrace.h +++ b/arch/s390/include/asm/ptrace.h | |||
@@ -324,7 +324,8 @@ struct pt_regs | |||
324 | psw_t psw; | 324 | psw_t psw; |
325 | unsigned long gprs[NUM_GPRS]; | 325 | unsigned long gprs[NUM_GPRS]; |
326 | unsigned long orig_gpr2; | 326 | unsigned long orig_gpr2; |
327 | unsigned int svc_code; | 327 | unsigned int int_code; |
328 | unsigned long int_parm_long; | ||
328 | }; | 329 | }; |
329 | 330 | ||
330 | /* | 331 | /* |
diff --git a/arch/s390/include/asm/qdio.h b/arch/s390/include/asm/qdio.h index e63d13dd3bf5..d75c8e78f7e3 100644 --- a/arch/s390/include/asm/qdio.h +++ b/arch/s390/include/asm/qdio.h | |||
@@ -352,7 +352,7 @@ typedef void qdio_handler_t(struct ccw_device *, unsigned int, int, | |||
352 | * @no_output_qs: number of output queues | 352 | * @no_output_qs: number of output queues |
353 | * @input_handler: handler to be called for input queues | 353 | * @input_handler: handler to be called for input queues |
354 | * @output_handler: handler to be called for output queues | 354 | * @output_handler: handler to be called for output queues |
355 | * @queue_start_poll: polling handlers (one per input queue or NULL) | 355 | * @queue_start_poll_array: polling handlers (one per input queue or NULL) |
356 | * @int_parm: interruption parameter | 356 | * @int_parm: interruption parameter |
357 | * @input_sbal_addr_array: address of no_input_qs * 128 pointers | 357 | * @input_sbal_addr_array: address of no_input_qs * 128 pointers |
358 | * @output_sbal_addr_array: address of no_output_qs * 128 pointers | 358 | * @output_sbal_addr_array: address of no_output_qs * 128 pointers |
@@ -372,7 +372,8 @@ struct qdio_initialize { | |||
372 | unsigned int no_output_qs; | 372 | unsigned int no_output_qs; |
373 | qdio_handler_t *input_handler; | 373 | qdio_handler_t *input_handler; |
374 | qdio_handler_t *output_handler; | 374 | qdio_handler_t *output_handler; |
375 | void (**queue_start_poll) (struct ccw_device *, int, unsigned long); | 375 | void (**queue_start_poll_array) (struct ccw_device *, int, |
376 | unsigned long); | ||
376 | int scan_threshold; | 377 | int scan_threshold; |
377 | unsigned long int_parm; | 378 | unsigned long int_parm; |
378 | void **input_sbal_addr_array; | 379 | void **input_sbal_addr_array; |
diff --git a/arch/s390/include/asm/sigp.h b/arch/s390/include/asm/sigp.h index e3bffd4e2d66..7040b8567cd0 100644 --- a/arch/s390/include/asm/sigp.h +++ b/arch/s390/include/asm/sigp.h | |||
@@ -56,6 +56,7 @@ enum { | |||
56 | ec_schedule = 0, | 56 | ec_schedule = 0, |
57 | ec_call_function, | 57 | ec_call_function, |
58 | ec_call_function_single, | 58 | ec_call_function_single, |
59 | ec_stop_cpu, | ||
59 | }; | 60 | }; |
60 | 61 | ||
61 | /* | 62 | /* |
diff --git a/arch/s390/include/asm/smp.h b/arch/s390/include/asm/smp.h index ab47a69fdf07..c32e9123b40c 100644 --- a/arch/s390/include/asm/smp.h +++ b/arch/s390/include/asm/smp.h | |||
@@ -23,7 +23,6 @@ extern void __cpu_die (unsigned int cpu); | |||
23 | extern int __cpu_up (unsigned int cpu); | 23 | extern int __cpu_up (unsigned int cpu); |
24 | 24 | ||
25 | extern struct mutex smp_cpu_state_mutex; | 25 | extern struct mutex smp_cpu_state_mutex; |
26 | extern int smp_cpu_polarization[]; | ||
27 | 26 | ||
28 | extern void arch_send_call_function_single_ipi(int cpu); | 27 | extern void arch_send_call_function_single_ipi(int cpu); |
29 | extern void arch_send_call_function_ipi_mask(const struct cpumask *mask); | 28 | extern void arch_send_call_function_ipi_mask(const struct cpumask *mask); |
diff --git a/arch/s390/include/asm/socket.h b/arch/s390/include/asm/socket.h index fdff1e995c73..67b5c1b14b51 100644 --- a/arch/s390/include/asm/socket.h +++ b/arch/s390/include/asm/socket.h | |||
@@ -70,4 +70,7 @@ | |||
70 | 70 | ||
71 | #define SO_RXQ_OVFL 40 | 71 | #define SO_RXQ_OVFL 40 |
72 | 72 | ||
73 | #define SO_WIFI_STATUS 41 | ||
74 | #define SCM_WIFI_STATUS SO_WIFI_STATUS | ||
75 | |||
73 | #endif /* _ASM_SOCKET_H */ | 76 | #endif /* _ASM_SOCKET_H */ |
diff --git a/arch/s390/include/asm/sparsemem.h b/arch/s390/include/asm/sparsemem.h index 545d219e6a2d..0fb34027d3f6 100644 --- a/arch/s390/include/asm/sparsemem.h +++ b/arch/s390/include/asm/sparsemem.h | |||
@@ -4,8 +4,8 @@ | |||
4 | #ifdef CONFIG_64BIT | 4 | #ifdef CONFIG_64BIT |
5 | 5 | ||
6 | #define SECTION_SIZE_BITS 28 | 6 | #define SECTION_SIZE_BITS 28 |
7 | #define MAX_PHYSADDR_BITS 42 | 7 | #define MAX_PHYSADDR_BITS 46 |
8 | #define MAX_PHYSMEM_BITS 42 | 8 | #define MAX_PHYSMEM_BITS 46 |
9 | 9 | ||
10 | #else | 10 | #else |
11 | 11 | ||
diff --git a/arch/s390/include/asm/syscall.h b/arch/s390/include/asm/syscall.h index b239ff53b189..fb214dd9b7e0 100644 --- a/arch/s390/include/asm/syscall.h +++ b/arch/s390/include/asm/syscall.h | |||
@@ -27,7 +27,7 @@ static inline long syscall_get_nr(struct task_struct *task, | |||
27 | struct pt_regs *regs) | 27 | struct pt_regs *regs) |
28 | { | 28 | { |
29 | return test_tsk_thread_flag(task, TIF_SYSCALL) ? | 29 | return test_tsk_thread_flag(task, TIF_SYSCALL) ? |
30 | (regs->svc_code & 0xffff) : -1; | 30 | (regs->int_code & 0xffff) : -1; |
31 | } | 31 | } |
32 | 32 | ||
33 | static inline void syscall_rollback(struct task_struct *task, | 33 | static inline void syscall_rollback(struct task_struct *task, |
diff --git a/arch/s390/include/asm/system.h b/arch/s390/include/asm/system.h index ef573c1d71a7..d73cc6b60000 100644 --- a/arch/s390/include/asm/system.h +++ b/arch/s390/include/asm/system.h | |||
@@ -20,8 +20,6 @@ | |||
20 | 20 | ||
21 | struct task_struct; | 21 | struct task_struct; |
22 | 22 | ||
23 | extern int sysctl_userprocess_debug; | ||
24 | |||
25 | extern struct task_struct *__switch_to(void *, void *); | 23 | extern struct task_struct *__switch_to(void *, void *); |
26 | extern void update_per_regs(struct task_struct *task); | 24 | extern void update_per_regs(struct task_struct *task); |
27 | 25 | ||
diff --git a/arch/s390/include/asm/thread_info.h b/arch/s390/include/asm/thread_info.h index a23183423b14..a73038155e0d 100644 --- a/arch/s390/include/asm/thread_info.h +++ b/arch/s390/include/asm/thread_info.h | |||
@@ -102,7 +102,6 @@ static inline struct thread_info *current_thread_info(void) | |||
102 | #define TIF_MEMDIE 18 /* is terminating due to OOM killer */ | 102 | #define TIF_MEMDIE 18 /* is terminating due to OOM killer */ |
103 | #define TIF_RESTORE_SIGMASK 19 /* restore signal mask in do_signal() */ | 103 | #define TIF_RESTORE_SIGMASK 19 /* restore signal mask in do_signal() */ |
104 | #define TIF_SINGLE_STEP 20 /* This task is single stepped */ | 104 | #define TIF_SINGLE_STEP 20 /* This task is single stepped */ |
105 | #define TIF_FREEZE 21 /* thread is freezing for suspend */ | ||
106 | 105 | ||
107 | #define _TIF_SYSCALL (1<<TIF_SYSCALL) | 106 | #define _TIF_SYSCALL (1<<TIF_SYSCALL) |
108 | #define _TIF_NOTIFY_RESUME (1<<TIF_NOTIFY_RESUME) | 107 | #define _TIF_NOTIFY_RESUME (1<<TIF_NOTIFY_RESUME) |
@@ -119,7 +118,6 @@ static inline struct thread_info *current_thread_info(void) | |||
119 | #define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG) | 118 | #define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG) |
120 | #define _TIF_31BIT (1<<TIF_31BIT) | 119 | #define _TIF_31BIT (1<<TIF_31BIT) |
121 | #define _TIF_SINGLE_STEP (1<<TIF_SINGLE_STEP) | 120 | #define _TIF_SINGLE_STEP (1<<TIF_SINGLE_STEP) |
122 | #define _TIF_FREEZE (1<<TIF_FREEZE) | ||
123 | 121 | ||
124 | #ifdef CONFIG_64BIT | 122 | #ifdef CONFIG_64BIT |
125 | #define is_32bit_task() (test_thread_flag(TIF_31BIT)) | 123 | #define is_32bit_task() (test_thread_flag(TIF_31BIT)) |
diff --git a/arch/s390/include/asm/topology.h b/arch/s390/include/asm/topology.h index 005d77d8ae2a..0837de80c351 100644 --- a/arch/s390/include/asm/topology.h +++ b/arch/s390/include/asm/topology.h | |||
@@ -4,6 +4,10 @@ | |||
4 | #include <linux/cpumask.h> | 4 | #include <linux/cpumask.h> |
5 | #include <asm/sysinfo.h> | 5 | #include <asm/sysinfo.h> |
6 | 6 | ||
7 | struct cpu; | ||
8 | |||
9 | #ifdef CONFIG_SCHED_BOOK | ||
10 | |||
7 | extern unsigned char cpu_core_id[NR_CPUS]; | 11 | extern unsigned char cpu_core_id[NR_CPUS]; |
8 | extern cpumask_t cpu_core_map[NR_CPUS]; | 12 | extern cpumask_t cpu_core_map[NR_CPUS]; |
9 | 13 | ||
@@ -16,8 +20,6 @@ static inline const struct cpumask *cpu_coregroup_mask(int cpu) | |||
16 | #define topology_core_cpumask(cpu) (&cpu_core_map[cpu]) | 20 | #define topology_core_cpumask(cpu) (&cpu_core_map[cpu]) |
17 | #define mc_capable() (1) | 21 | #define mc_capable() (1) |
18 | 22 | ||
19 | #ifdef CONFIG_SCHED_BOOK | ||
20 | |||
21 | extern unsigned char cpu_book_id[NR_CPUS]; | 23 | extern unsigned char cpu_book_id[NR_CPUS]; |
22 | extern cpumask_t cpu_book_map[NR_CPUS]; | 24 | extern cpumask_t cpu_book_map[NR_CPUS]; |
23 | 25 | ||
@@ -29,19 +31,45 @@ static inline const struct cpumask *cpu_book_mask(int cpu) | |||
29 | #define topology_book_id(cpu) (cpu_book_id[cpu]) | 31 | #define topology_book_id(cpu) (cpu_book_id[cpu]) |
30 | #define topology_book_cpumask(cpu) (&cpu_book_map[cpu]) | 32 | #define topology_book_cpumask(cpu) (&cpu_book_map[cpu]) |
31 | 33 | ||
32 | #endif /* CONFIG_SCHED_BOOK */ | 34 | int topology_cpu_init(struct cpu *); |
33 | |||
34 | int topology_set_cpu_management(int fc); | 35 | int topology_set_cpu_management(int fc); |
35 | void topology_schedule_update(void); | 36 | void topology_schedule_update(void); |
36 | void store_topology(struct sysinfo_15_1_x *info); | 37 | void store_topology(struct sysinfo_15_1_x *info); |
38 | void topology_expect_change(void); | ||
39 | |||
40 | #else /* CONFIG_SCHED_BOOK */ | ||
41 | |||
42 | static inline void topology_schedule_update(void) { } | ||
43 | static inline int topology_cpu_init(struct cpu *cpu) { return 0; } | ||
44 | static inline void topology_expect_change(void) { } | ||
37 | 45 | ||
38 | #define POLARIZATION_UNKNWN (-1) | 46 | #endif /* CONFIG_SCHED_BOOK */ |
47 | |||
48 | #define POLARIZATION_UNKNOWN (-1) | ||
39 | #define POLARIZATION_HRZ (0) | 49 | #define POLARIZATION_HRZ (0) |
40 | #define POLARIZATION_VL (1) | 50 | #define POLARIZATION_VL (1) |
41 | #define POLARIZATION_VM (2) | 51 | #define POLARIZATION_VM (2) |
42 | #define POLARIZATION_VH (3) | 52 | #define POLARIZATION_VH (3) |
43 | 53 | ||
44 | #ifdef CONFIG_SMP | 54 | extern int cpu_polarization[]; |
55 | |||
56 | static inline void cpu_set_polarization(int cpu, int val) | ||
57 | { | ||
58 | #ifdef CONFIG_SCHED_BOOK | ||
59 | cpu_polarization[cpu] = val; | ||
60 | #endif | ||
61 | } | ||
62 | |||
63 | static inline int cpu_read_polarization(int cpu) | ||
64 | { | ||
65 | #ifdef CONFIG_SCHED_BOOK | ||
66 | return cpu_polarization[cpu]; | ||
67 | #else | ||
68 | return POLARIZATION_HRZ; | ||
69 | #endif | ||
70 | } | ||
71 | |||
72 | #ifdef CONFIG_SCHED_BOOK | ||
45 | void s390_init_cpu_topology(void); | 73 | void s390_init_cpu_topology(void); |
46 | #else | 74 | #else |
47 | static inline void s390_init_cpu_topology(void) | 75 | static inline void s390_init_cpu_topology(void) |
diff --git a/arch/s390/include/asm/types.h b/arch/s390/include/asm/types.h index eeb52ccf499f..05ebbcdbbf6b 100644 --- a/arch/s390/include/asm/types.h +++ b/arch/s390/include/asm/types.h | |||
@@ -13,8 +13,6 @@ | |||
13 | 13 | ||
14 | #ifndef __ASSEMBLY__ | 14 | #ifndef __ASSEMBLY__ |
15 | 15 | ||
16 | typedef unsigned short umode_t; | ||
17 | |||
18 | /* A address type so that arithmetic can be done on it & it can be upgraded to | 16 | /* A address type so that arithmetic can be done on it & it can be upgraded to |
19 | 64 bit when necessary | 17 | 64 bit when necessary |
20 | */ | 18 | */ |
diff --git a/arch/s390/include/asm/unistd.h b/arch/s390/include/asm/unistd.h index 58de4c91c333..8a8008fe7b8f 100644 --- a/arch/s390/include/asm/unistd.h +++ b/arch/s390/include/asm/unistd.h | |||
@@ -398,6 +398,7 @@ | |||
398 | #define __ARCH_WANT_SYS_SIGNAL | 398 | #define __ARCH_WANT_SYS_SIGNAL |
399 | #define __ARCH_WANT_SYS_UTIME | 399 | #define __ARCH_WANT_SYS_UTIME |
400 | #define __ARCH_WANT_SYS_SOCKETCALL | 400 | #define __ARCH_WANT_SYS_SOCKETCALL |
401 | #define __ARCH_WANT_SYS_IPC | ||
401 | #define __ARCH_WANT_SYS_FADVISE64 | 402 | #define __ARCH_WANT_SYS_FADVISE64 |
402 | #define __ARCH_WANT_SYS_GETPGRP | 403 | #define __ARCH_WANT_SYS_GETPGRP |
403 | #define __ARCH_WANT_SYS_LLSEEK | 404 | #define __ARCH_WANT_SYS_LLSEEK |