[S390] rework smp code
authorMartin Schwidefsky <schwidefsky@de.ibm.com>
Sun, 11 Mar 2012 15:59:26 +0000 (11:59 -0400)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Sun, 11 Mar 2012 15:59:28 +0000 (11:59 -0400)
commit8b646bd759086f6090fe27acf414c0b5faa737f4
tree29475659031c57ccf2ca43899614ab5c6b1899a0
parent7e180bd8020d213bb0de15c3606968f8a9262439
[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>
22 files changed:
arch/s390/include/asm/lowcore.h
arch/s390/include/asm/sigp.h [deleted file]
arch/s390/include/asm/smp.h
arch/s390/include/asm/vdso.h
arch/s390/kernel/Makefile
arch/s390/kernel/asm-offsets.c
arch/s390/kernel/entry.S
arch/s390/kernel/entry.h
arch/s390/kernel/entry64.S
arch/s390/kernel/ipl.c
arch/s390/kernel/machine_kexec.c
arch/s390/kernel/setup.c
arch/s390/kernel/smp.c
arch/s390/kernel/switch_cpu.S [deleted file]
arch/s390/kernel/switch_cpu64.S [deleted file]
arch/s390/kernel/swsusp_asm64.S
arch/s390/kernel/topology.c
arch/s390/kernel/vdso.c
arch/s390/kernel/vtime.c
arch/s390/lib/spinlock.c
drivers/s390/char/sclp_quiesce.c
drivers/s390/char/zcore.c