summaryrefslogtreecommitdiff
path: root/arch/s390/include/asm/lowcore.h
diff options
context:
space:
mode:
authorMartin Schwidefsky <schwidefsky@de.ibm.com>2012-03-11 15:59:26 (GMT)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2012-03-11 15:59:28 (GMT)
commit8b646bd759086f6090fe27acf414c0b5faa737f4 (patch)
tree29475659031c57ccf2ca43899614ab5c6b1899a0 /arch/s390/include/asm/lowcore.h
parent7e180bd8020d213bb0de15c3606968f8a9262439 (diff)
downloadlinux-fsl-qoriq-8b646bd759086f6090fe27acf414c0b5faa737f4.tar.xz
[S390] rework smp code
Define struct pcpu and merge some of the NR_CPUS arrays into it, including __cpu_logical_map, current_set and smp_cpu_state. Split smp related functions to those operating on physical cpus and the functions operating on a logical cpu number. Make the functions for physical cpus use a pointer to a struct pcpu. This hides the knowledge about cpu addresses in smp.c, entry[64].S and swsusp_asm64.S, thus remove the sigp.h header. The PSW restart mechanism is used to start secondary cpus, calling a function on an online cpu, calling a function on the ipl cpu, and for the nmi signal. Replace the different assembler functions with a single function restart_int_handler. The new entry point calls a function whose pointer is stored in the lowcore of the target cpu and it can wait for the source cpu to stop. This covers all existing use cases. Overall the code is now simpler and there are ~380 lines less code. Reviewed-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/include/asm/lowcore.h')
-rw-r--r--arch/s390/include/asm/lowcore.h100
1 files changed, 51 insertions, 49 deletions
diff --git a/arch/s390/include/asm/lowcore.h b/arch/s390/include/asm/lowcore.h
index 0831449..4e69563 100644
--- a/arch/s390/include/asm/lowcore.h
+++ b/arch/s390/include/asm/lowcore.h
@@ -1,5 +1,5 @@
/*
- * Copyright IBM Corp. 1999,2010
+ * Copyright IBM Corp. 1999,2012
* Author(s): Hartmut Penner <hp@de.ibm.com>,
* Martin Schwidefsky <schwidefsky@de.ibm.com>,
* Denis Joseph Barrow,
@@ -12,14 +12,6 @@
#include <asm/ptrace.h>
#include <asm/cpu.h>
-void restart_int_handler(void);
-void ext_int_handler(void);
-void system_call(void);
-void pgm_check_handler(void);
-void mcck_int_handler(void);
-void io_int_handler(void);
-void psw_restart_int_handler(void);
-
#ifdef CONFIG_32BIT
#define LC_ORDER 0
@@ -117,32 +109,37 @@ struct _lowcore {
__u64 steal_timer; /* 0x0288 */
__u64 last_update_timer; /* 0x0290 */
__u64 last_update_clock; /* 0x0298 */
+ __u64 int_clock; /* 0x02a0 */
+ __u64 mcck_clock; /* 0x02a8 */
+ __u64 clock_comparator; /* 0x02b0 */
/* Current process. */
- __u32 current_task; /* 0x02a0 */
- __u32 thread_info; /* 0x02a4 */
- __u32 kernel_stack; /* 0x02a8 */
+ __u32 current_task; /* 0x02b8 */
+ __u32 thread_info; /* 0x02bc */
+ __u32 kernel_stack; /* 0x02c0 */
+
+ /* Interrupt, panic and restart stack. */
+ __u32 async_stack; /* 0x02c4 */
+ __u32 panic_stack; /* 0x02c8 */
+ __u32 restart_stack; /* 0x02cc */
- /* Interrupt and panic stack. */
- __u32 async_stack; /* 0x02ac */
- __u32 panic_stack; /* 0x02b0 */
+ /* Restart function and parameter. */
+ __u32 restart_fn; /* 0x02d0 */
+ __u32 restart_data; /* 0x02d4 */
+ __u32 restart_source; /* 0x02d8 */
/* Address space pointer. */
- __u32 kernel_asce; /* 0x02b4 */
- __u32 user_asce; /* 0x02b8 */
- __u32 current_pid; /* 0x02bc */
+ __u32 kernel_asce; /* 0x02dc */
+ __u32 user_asce; /* 0x02e0 */
+ __u32 current_pid; /* 0x02e4 */
/* SMP info area */
- __u32 cpu_nr; /* 0x02c0 */
- __u32 softirq_pending; /* 0x02c4 */
- __u32 percpu_offset; /* 0x02c8 */
- __u32 ext_call_fast; /* 0x02cc */
- __u64 int_clock; /* 0x02d0 */
- __u64 mcck_clock; /* 0x02d8 */
- __u64 clock_comparator; /* 0x02e0 */
- __u32 machine_flags; /* 0x02e8 */
- __u32 ftrace_func; /* 0x02ec */
- __u8 pad_0x02f8[0x0300-0x02f0]; /* 0x02f0 */
+ __u32 cpu_nr; /* 0x02e8 */
+ __u32 softirq_pending; /* 0x02ec */
+ __u32 percpu_offset; /* 0x02f0 */
+ __u32 machine_flags; /* 0x02f4 */
+ __u32 ftrace_func; /* 0x02f8 */
+ __u8 pad_0x02fc[0x0300-0x02fc]; /* 0x02fc */
/* Interrupt response block */
__u8 irb[64]; /* 0x0300 */
@@ -254,34 +251,39 @@ struct _lowcore {
__u64 steal_timer; /* 0x02e0 */
__u64 last_update_timer; /* 0x02e8 */
__u64 last_update_clock; /* 0x02f0 */
+ __u64 int_clock; /* 0x02f8 */
+ __u64 mcck_clock; /* 0x0300 */
+ __u64 clock_comparator; /* 0x0308 */
/* Current process. */
- __u64 current_task; /* 0x02f8 */
- __u64 thread_info; /* 0x0300 */
- __u64 kernel_stack; /* 0x0308 */
+ __u64 current_task; /* 0x0310 */
+ __u64 thread_info; /* 0x0318 */
+ __u64 kernel_stack; /* 0x0320 */
+
+ /* Interrupt, panic and restart stack. */
+ __u64 async_stack; /* 0x0328 */
+ __u64 panic_stack; /* 0x0330 */
+ __u64 restart_stack; /* 0x0338 */
- /* Interrupt and panic stack. */
- __u64 async_stack; /* 0x0310 */
- __u64 panic_stack; /* 0x0318 */
+ /* Restart function and parameter. */
+ __u64 restart_fn; /* 0x0340 */
+ __u64 restart_data; /* 0x0348 */
+ __u64 restart_source; /* 0x0350 */
/* Address space pointer. */
- __u64 kernel_asce; /* 0x0320 */
- __u64 user_asce; /* 0x0328 */
- __u64 current_pid; /* 0x0330 */
+ __u64 kernel_asce; /* 0x0358 */
+ __u64 user_asce; /* 0x0360 */
+ __u64 current_pid; /* 0x0368 */
/* SMP info area */
- __u32 cpu_nr; /* 0x0338 */
- __u32 softirq_pending; /* 0x033c */
- __u64 percpu_offset; /* 0x0340 */
- __u64 ext_call_fast; /* 0x0348 */
- __u64 int_clock; /* 0x0350 */
- __u64 mcck_clock; /* 0x0358 */
- __u64 clock_comparator; /* 0x0360 */
- __u64 vdso_per_cpu_data; /* 0x0368 */
- __u64 machine_flags; /* 0x0370 */
- __u64 ftrace_func; /* 0x0378 */
- __u64 gmap; /* 0x0380 */
- __u8 pad_0x0388[0x0400-0x0388]; /* 0x0388 */
+ __u32 cpu_nr; /* 0x0370 */
+ __u32 softirq_pending; /* 0x0374 */
+ __u64 percpu_offset; /* 0x0378 */
+ __u64 vdso_per_cpu_data; /* 0x0380 */
+ __u64 machine_flags; /* 0x0388 */
+ __u64 ftrace_func; /* 0x0390 */
+ __u64 gmap; /* 0x0398 */
+ __u8 pad_0x03a0[0x0400-0x03a0]; /* 0x03a0 */
/* Interrupt response block. */
__u8 irb[64]; /* 0x0400 */