Skip to content

Commit db14179

Browse files
committed
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux
Pull s390 patches from Martin Schwidefsky: "The biggest patch is the rework of the smp code, something I wanted to do for some time. There are some patches for our various dump methods and one new thing: z/VM LGR detection. LGR stands for linux-guest- relocation and is the guest migration feature of z/VM. For debugging purposes we keep a log of the systems where a specific guest has lived." Fix up trivial conflict in arch/s390/kernel/smp.c due to the scheduler cleanup having removed some code next to removed s390 code. * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: [S390] kernel: Pass correct stack for smp_call_ipl_cpu() [S390] Ensure that vmcore_info pointer is never accessed directly [S390] dasd: prevent validate server for offline devices [S390] Remove monolithic build option for zcrypt driver. [S390] stack dump: fix indentation in output [S390] kernel: Add OS info memory interface [S390] Use block_sigmask() [S390] kernel: Add z/VM LGR detection [S390] irq: external interrupt code passing [S390] irq: set __ARCH_IRQ_EXIT_IRQS_DISABLED [S390] zfcpdump: Implement async sdias event processing [S390] Use copy_to_absolute_zero() instead of "stura/sturg" [S390] rework idle code [S390] rework smp code [S390] rename lowcore field [S390] Fix gcc 4.6.0 compile warning
2 parents 48aab2f + c6da39f commit db14179

64 files changed

Lines changed: 1701 additions & 1633 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎arch/s390/include/asm/cputime.h‎

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -170,24 +170,17 @@ struct s390_idle_data {
170170
unsigned int sequence;
171171
unsigned long long idle_count;
172172
unsigned long long idle_enter;
173+
unsigned long long idle_exit;
173174
unsigned long long idle_time;
174175
int nohz_delay;
175176
};
176177

177178
DECLARE_PER_CPU(struct s390_idle_data, s390_idle);
178179

179-
void vtime_start_cpu(__u64 int_clock, __u64 enter_timer);
180180
cputime64_t s390_get_idle_time(int cpu);
181181

182182
#define arch_idle_time(cpu) s390_get_idle_time(cpu)
183183

184-
static inline void s390_idle_check(struct pt_regs *regs, __u64 int_clock,
185-
__u64 enter_timer)
186-
{
187-
if (regs->psw.mask & PSW_MASK_WAIT)
188-
vtime_start_cpu(int_clock, enter_timer);
189-
}
190-
191184
static inline int s390_nohz_delay(int cpu)
192185
{
193186
return __get_cpu_var(s390_idle).nohz_delay != 0;

‎arch/s390/include/asm/debug.h‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ void debug_unregister(debug_info_t* id);
131131

132132
void debug_set_level(debug_info_t* id, int new_level);
133133

134+
void debug_set_critical(void);
134135
void debug_stop_all(void);
135136

136137
static inline debug_entry_t*

‎arch/s390/include/asm/hardirq.h‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818

1919
#define __ARCH_IRQ_STAT
2020
#define __ARCH_HAS_DO_SOFTIRQ
21+
#define __ARCH_IRQ_EXIT_IRQS_DISABLED
2122

2223
#define HARDIRQ_BITS 8
2324

‎arch/s390/include/asm/ipl.h‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,5 +169,6 @@ enum diag308_rc {
169169
extern int diag308(unsigned long subcode, void *addr);
170170
extern void diag308_reset(void);
171171
extern void store_status(void);
172+
extern void lgr_info_log(void);
172173

173174
#endif /* _ASM_S390_IPL_H */

‎arch/s390/include/asm/irq.h‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,12 @@ enum interruption_class {
3434
NR_IRQS,
3535
};
3636

37-
typedef void (*ext_int_handler_t)(unsigned int, unsigned int, unsigned long);
37+
struct ext_code {
38+
unsigned short subcode;
39+
unsigned short code;
40+
};
41+
42+
typedef void (*ext_int_handler_t)(struct ext_code, unsigned int, unsigned long);
3843

3944
int register_external_interrupt(u16 code, ext_int_handler_t handler);
4045
int unregister_external_interrupt(u16 code, ext_int_handler_t handler);

‎arch/s390/include/asm/lowcore.h‎

Lines changed: 65 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright IBM Corp. 1999,2010
2+
* Copyright IBM Corp. 1999,2012
33
* Author(s): Hartmut Penner <hp@de.ibm.com>,
44
* Martin Schwidefsky <schwidefsky@de.ibm.com>,
55
* Denis Joseph Barrow,
@@ -12,14 +12,6 @@
1212
#include <asm/ptrace.h>
1313
#include <asm/cpu.h>
1414

15-
void restart_int_handler(void);
16-
void ext_int_handler(void);
17-
void system_call(void);
18-
void pgm_check_handler(void);
19-
void mcck_int_handler(void);
20-
void io_int_handler(void);
21-
void psw_restart_int_handler(void);
22-
2315
#ifdef CONFIG_32BIT
2416

2517
#define LC_ORDER 0
@@ -56,7 +48,7 @@ struct _lowcore {
5648
psw_t mcck_new_psw; /* 0x0070 */
5749
psw_t io_new_psw; /* 0x0078 */
5850
__u32 ext_params; /* 0x0080 */
59-
__u16 cpu_addr; /* 0x0084 */
51+
__u16 ext_cpu_addr; /* 0x0084 */
6052
__u16 ext_int_code; /* 0x0086 */
6153
__u16 svc_ilc; /* 0x0088 */
6254
__u16 svc_code; /* 0x008a */
@@ -117,32 +109,37 @@ struct _lowcore {
117109
__u64 steal_timer; /* 0x0288 */
118110
__u64 last_update_timer; /* 0x0290 */
119111
__u64 last_update_clock; /* 0x0298 */
112+
__u64 int_clock; /* 0x02a0 */
113+
__u64 mcck_clock; /* 0x02a8 */
114+
__u64 clock_comparator; /* 0x02b0 */
120115

121116
/* Current process. */
122-
__u32 current_task; /* 0x02a0 */
123-
__u32 thread_info; /* 0x02a4 */
124-
__u32 kernel_stack; /* 0x02a8 */
117+
__u32 current_task; /* 0x02b8 */
118+
__u32 thread_info; /* 0x02bc */
119+
__u32 kernel_stack; /* 0x02c0 */
120+
121+
/* Interrupt, panic and restart stack. */
122+
__u32 async_stack; /* 0x02c4 */
123+
__u32 panic_stack; /* 0x02c8 */
124+
__u32 restart_stack; /* 0x02cc */
125125

126-
/* Interrupt and panic stack. */
127-
__u32 async_stack; /* 0x02ac */
128-
__u32 panic_stack; /* 0x02b0 */
126+
/* Restart function and parameter. */
127+
__u32 restart_fn; /* 0x02d0 */
128+
__u32 restart_data; /* 0x02d4 */
129+
__u32 restart_source; /* 0x02d8 */
129130

130131
/* Address space pointer. */
131-
__u32 kernel_asce; /* 0x02b4 */
132-
__u32 user_asce; /* 0x02b8 */
133-
__u32 current_pid; /* 0x02bc */
132+
__u32 kernel_asce; /* 0x02dc */
133+
__u32 user_asce; /* 0x02e0 */
134+
__u32 current_pid; /* 0x02e4 */
134135

135136
/* SMP info area */
136-
__u32 cpu_nr; /* 0x02c0 */
137-
__u32 softirq_pending; /* 0x02c4 */
138-
__u32 percpu_offset; /* 0x02c8 */
139-
__u32 ext_call_fast; /* 0x02cc */
140-
__u64 int_clock; /* 0x02d0 */
141-
__u64 mcck_clock; /* 0x02d8 */
142-
__u64 clock_comparator; /* 0x02e0 */
143-
__u32 machine_flags; /* 0x02e8 */
144-
__u32 ftrace_func; /* 0x02ec */
145-
__u8 pad_0x02f8[0x0300-0x02f0]; /* 0x02f0 */
137+
__u32 cpu_nr; /* 0x02e8 */
138+
__u32 softirq_pending; /* 0x02ec */
139+
__u32 percpu_offset; /* 0x02f0 */
140+
__u32 machine_flags; /* 0x02f4 */
141+
__u32 ftrace_func; /* 0x02f8 */
142+
__u8 pad_0x02fc[0x0300-0x02fc]; /* 0x02fc */
146143

147144
/* Interrupt response block */
148145
__u8 irb[64]; /* 0x0300 */
@@ -157,7 +154,9 @@ struct _lowcore {
157154
__u32 ipib; /* 0x0e00 */
158155
__u32 ipib_checksum; /* 0x0e04 */
159156
__u32 vmcore_info; /* 0x0e08 */
160-
__u8 pad_0x0e0c[0x0f00-0x0e0c]; /* 0x0e0c */
157+
__u8 pad_0x0e0c[0x0e18-0x0e0c]; /* 0x0e0c */
158+
__u32 os_info; /* 0x0e18 */
159+
__u8 pad_0x0e1c[0x0f00-0x0e1c]; /* 0x0e1c */
161160

162161
/* Extended facility list */
163162
__u64 stfle_fac_list[32]; /* 0x0f00 */
@@ -189,7 +188,7 @@ struct _lowcore {
189188
__u32 ipl_parmblock_ptr; /* 0x0014 */
190189
__u8 pad_0x0018[0x0080-0x0018]; /* 0x0018 */
191190
__u32 ext_params; /* 0x0080 */
192-
__u16 cpu_addr; /* 0x0084 */
191+
__u16 ext_cpu_addr; /* 0x0084 */
193192
__u16 ext_int_code; /* 0x0086 */
194193
__u16 svc_ilc; /* 0x0088 */
195194
__u16 svc_code; /* 0x008a */
@@ -254,34 +253,39 @@ struct _lowcore {
254253
__u64 steal_timer; /* 0x02e0 */
255254
__u64 last_update_timer; /* 0x02e8 */
256255
__u64 last_update_clock; /* 0x02f0 */
256+
__u64 int_clock; /* 0x02f8 */
257+
__u64 mcck_clock; /* 0x0300 */
258+
__u64 clock_comparator; /* 0x0308 */
257259

258260
/* Current process. */
259-
__u64 current_task; /* 0x02f8 */
260-
__u64 thread_info; /* 0x0300 */
261-
__u64 kernel_stack; /* 0x0308 */
261+
__u64 current_task; /* 0x0310 */
262+
__u64 thread_info; /* 0x0318 */
263+
__u64 kernel_stack; /* 0x0320 */
264+
265+
/* Interrupt, panic and restart stack. */
266+
__u64 async_stack; /* 0x0328 */
267+
__u64 panic_stack; /* 0x0330 */
268+
__u64 restart_stack; /* 0x0338 */
262269

263-
/* Interrupt and panic stack. */
264-
__u64 async_stack; /* 0x0310 */
265-
__u64 panic_stack; /* 0x0318 */
270+
/* Restart function and parameter. */
271+
__u64 restart_fn; /* 0x0340 */
272+
__u64 restart_data; /* 0x0348 */
273+
__u64 restart_source; /* 0x0350 */
266274

267275
/* Address space pointer. */
268-
__u64 kernel_asce; /* 0x0320 */
269-
__u64 user_asce; /* 0x0328 */
270-
__u64 current_pid; /* 0x0330 */
276+
__u64 kernel_asce; /* 0x0358 */
277+
__u64 user_asce; /* 0x0360 */
278+
__u64 current_pid; /* 0x0368 */
271279

272280
/* SMP info area */
273-
__u32 cpu_nr; /* 0x0338 */
274-
__u32 softirq_pending; /* 0x033c */
275-
__u64 percpu_offset; /* 0x0340 */
276-
__u64 ext_call_fast; /* 0x0348 */
277-
__u64 int_clock; /* 0x0350 */
278-
__u64 mcck_clock; /* 0x0358 */
279-
__u64 clock_comparator; /* 0x0360 */
280-
__u64 vdso_per_cpu_data; /* 0x0368 */
281-
__u64 machine_flags; /* 0x0370 */
282-
__u64 ftrace_func; /* 0x0378 */
283-
__u64 gmap; /* 0x0380 */
284-
__u8 pad_0x0388[0x0400-0x0388]; /* 0x0388 */
281+
__u32 cpu_nr; /* 0x0370 */
282+
__u32 softirq_pending; /* 0x0374 */
283+
__u64 percpu_offset; /* 0x0378 */
284+
__u64 vdso_per_cpu_data; /* 0x0380 */
285+
__u64 machine_flags; /* 0x0388 */
286+
__u64 ftrace_func; /* 0x0390 */
287+
__u64 gmap; /* 0x0398 */
288+
__u8 pad_0x03a0[0x0400-0x03a0]; /* 0x03a0 */
285289

286290
/* Interrupt response block. */
287291
__u8 irb[64]; /* 0x0400 */
@@ -298,8 +302,15 @@ struct _lowcore {
298302
*/
299303
__u64 ipib; /* 0x0e00 */
300304
__u32 ipib_checksum; /* 0x0e08 */
301-
__u64 vmcore_info; /* 0x0e0c */
302-
__u8 pad_0x0e14[0x0f00-0x0e14]; /* 0x0e14 */
305+
/*
306+
* Because the vmcore_info pointer is not 8 byte aligned it never
307+
* should not be accessed directly. For accessing the pointer, first
308+
* copy it to a local pointer variable.
309+
*/
310+
__u8 vmcore_info[8]; /* 0x0e0c */
311+
__u8 pad_0x0e14[0x0e18-0x0e14]; /* 0x0e14 */
312+
__u64 os_info; /* 0x0e18 */
313+
__u8 pad_0x0e20[0x0f00-0x0e20]; /* 0x0e20 */
303314

304315
/* Extended facility list */
305316
__u64 stfle_fac_list[32]; /* 0x0f00 */

‎arch/s390/include/asm/os_info.h‎

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
/*
2+
* OS info memory interface
3+
*
4+
* Copyright IBM Corp. 2012
5+
* Author(s): Michael Holzheu <holzheu@linux.vnet.ibm.com>
6+
*/
7+
#ifndef _ASM_S390_OS_INFO_H
8+
#define _ASM_S390_OS_INFO_H
9+
10+
#define OS_INFO_VERSION_MAJOR 1
11+
#define OS_INFO_VERSION_MINOR 1
12+
#define OS_INFO_MAGIC 0x4f53494e464f535aULL /* OSINFOSZ */
13+
14+
#define OS_INFO_VMCOREINFO 0
15+
#define OS_INFO_REIPL_BLOCK 1
16+
#define OS_INFO_INIT_FN 2
17+
18+
struct os_info_entry {
19+
u64 addr;
20+
u64 size;
21+
u32 csum;
22+
} __packed;
23+
24+
struct os_info {
25+
u64 magic;
26+
u32 csum;
27+
u16 version_major;
28+
u16 version_minor;
29+
u64 crashkernel_addr;
30+
u64 crashkernel_size;
31+
struct os_info_entry entry[3];
32+
u8 reserved[4004];
33+
} __packed;
34+
35+
void os_info_init(void);
36+
void os_info_entry_add(int nr, void *ptr, u64 len);
37+
void os_info_crashkernel_add(unsigned long base, unsigned long size);
38+
u32 os_info_csum(struct os_info *os_info);
39+
40+
#ifdef CONFIG_CRASH_DUMP
41+
void *os_info_old_entry(int nr, unsigned long *size);
42+
int copy_from_oldmem(void *dest, void *src, size_t count);
43+
#else
44+
static inline void *os_info_old_entry(int nr, unsigned long *size)
45+
{
46+
return NULL;
47+
}
48+
#endif
49+
50+
#endif /* _ASM_S390_OS_INFO_H */

0 commit comments

Comments
 (0)