aboutsummaryrefslogtreecommitdiff
path: root/arch/s390/kernel
AgeCommit message (Collapse)AuthorFilesLines
2011-12-27[S390] cleanup trap handlingMartin Schwidefsky7-150/+108
Move the program interruption code and the translation exception identifier to the pt_regs structure as 'int_code' and 'int_parm_long' and make the first level interrupt handler in entry[64].S store the two values. That makes it possible to drop 'prot_addr' and 'trap_no' from the thread_struct and to reduce the number of arguments to a lot of functions. Finally un-inline do_trap. Overall this saves 5812 bytes in the .text section of the 64 bit kernel. Signed-off-by: Martin Schwidefsky <[email protected]>
2011-12-27[S390] topology: increase poll frequency if change is anticipatedHeiko Carstens2-8/+28
Increase cpu topology change poll frequency if a change is anticipated. Otherwise a user might be a bit confused to have to wait up to a minute in order to see a change this should be visible immediatly. However there is no guarantee that the change will happen during the time frame the poll frequency is increased. Signed-off-by: Heiko Carstens <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2011-12-27[S390] entry[64].S improvementsMartin Schwidefsky7-1171/+926
Another round of cleanup for entry[64].S, in particular the program check handler looks more reasonable now. The code size for the 31 bit kernel has been reduced by 616 byte and by 528 byte for the 64 bit version. Even better the code is a bit faster as well. Signed-off-by: Martin Schwidefsky <[email protected]>
2011-12-27[S390] kvm: move cmf host id constant out of lowcoreMartin Schwidefsky3-4/+5
There is no reason for the cpu-measurement-facility host id constant to reside in the lowcore where space is precious. Use an entry in the literal pool in HANDLE_SIE_INTERCEPT and a stack slot in sie64a. While we are at it replace the id -1 with 0 to indicate host execution. Signed-off-by: Martin Schwidefsky <[email protected]>
2011-12-27[S390] topology: cleanup z10 topology handlingHeiko Carstens1-29/+48
Cleanup z10 topology handling. This adds some more code but hopefully the result is more readable and easier to maintain. Signed-off-by: Heiko Carstens <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2011-12-27[S390] topology: get rid of ifdefsHeiko Carstens3-147/+141
Remove all ifdefs from topology code and also only compile it for the CONFIG_SCHED_BOOK case. The new code selects SCHED_MC if SCHED_BOOK is selected. SCHED_MC without SCHED_BOOK is not possible anymore. Furthermore various sysfs attributes are not available anymore for the !SCHED_BOOK case. In particular all attributes that correspond to CPU polarization. But since all real world kernels have SCHED_BOOK selected anyway this doesn't matter too much. Signed-off-by: Heiko Carstens <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2011-12-27[S390] kernel: Fix smp_switch_to_ipl_cpu() stack frame setupMichael Holzheu1-2/+2
Currently, when smp_switch_to_ipl_cpu() is done, the backchain in the dump analysis tool crash looks like the following: #0 [1f746e70] __machine_kexec at 11dd92 #1 [1f746eb8] smp_restart_cpu at 11820e #0 [00907eb0] cpu_idle at 10602e #1 [00907ef8] start_kernel at 979a08 It would be good to see the registers of the interrupted function. To achieve this, the backchain on the new stack has to be set to zero. This looks then like the following: #0 [1f746e70] __machine_kexec at 11dd8e #1 [1f746eb8] smp_restart_cpu at 11820a PSW: 0706000180000000 00000000005c6fe6 (vtime_stop_cpu+134) GPRS: 0000000000000000 00000000005c6fe6 0000000001ad0228 0000000001ad0248 0000000000907f08 0000000001ad0b40 0000000000979344 0000000000000000 00000000009c0000 00000000009c0010 00000000009ab024 0000000001ad0200 0000000001ad0238 00000000005cc9d8 000000000010602e 0000000000907e68 #0 [00907eb0] cpu_idle at 10602e #1 [00907ef8] start_kernel at 979a08 In addition to this, now also the correct PSW is stored in the pt_regs structure that is located at the start of the panic stack. Signed-off-by: Michael Holzheu <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2011-12-27[S390] add support for physical memory > 4TBMartin Schwidefsky1-14/+53
The kernel address space of a 64 bit kernel currently uses a three level page table and the vmemmap array has a fixed address and a fixed maximum size. A three level page table is good enough for systems with less than 3.8TB of memory, for bigger systems four page table levels need to be used. Each page table level costs a bit of performance, use 3 levels for normal systems and 4 levels only for the really big systems. To avoid bloating sparse.o too much set MAX_PHYSMEM_BITS to 46 for a maximum of 64TB of memory. Signed-off-by: Martin Schwidefsky <[email protected]>
2011-12-27[S390] Remove useless newline in reserve_kdump_bootmem()Michael Holzheu1-1/+0
Signed-off-by: Michael Holzheu <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2011-12-27[S390] Rework create_mem_hole() functionMichael Holzheu1-55/+67
This patch makes the create_mem_hole() function more readable and fixes some minor bugs (e.g. off-by-one problems). Signed-off-by: Michael Holzheu <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2011-12-27[S390] Check for NULL termination in command line setupMichael Holzheu1-8/+12
The current code in setup_boot_command_line() uses a heuristic to detect an EBCDIC command line. It checks if any of the bytes in the command line has bit one (0x80) set. In that case it is assumed that we have an EBCDIC string and the complete command line is converted. On s390 there are cases where the boot loader provides a kernel command line that is NULL terminated, but has random data after the NULL termination. In that case, setup_boot_command_line() might misinterpret an ASCII string for an EBCDIC string. A subsequent string conversion can then damage the ASCII string. This patch solves the problem by checking for NULL termination. If no EBCDIC character has been found until the the NULL termination has been found, we now assume that we have an ASCII string. Signed-off-by: Michael Holzheu <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2011-12-27[S390] irq: fix accounting of external call/emergency signalHeiko Carstens1-1/+1
Mask the extint_code parameter of the smp external interrupt handler to get the interruption code. Otherwise emergency call interrupts erroneously might be accounted as emergency signal interrupts. Signed-off-by: Heiko Carstens <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2011-12-21s390: time - convert sysdev_class to a regular subsystemKay Sievers1-129/+131
After all sysdev classes are ported to regular driver core entities, the sysdev implementation will be entirely removed from the kernel. Cc: Martin Schwidefsky <[email protected]> Cc: Heiko Carstens <[email protected]> Signed-off-by: Kay Sievers <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2011-12-21cpu: convert 'cpu' and 'machinecheck' sysdev_class to a regular subsystemKay Sievers2-41/+41
This moves the 'cpu sysdev_class' over to a regular 'cpu' subsystem and converts the devices to regular devices. The sysdev drivers are implemented as subsystem interfaces now. After all sysdev classes are ported to regular driver core entities, the sysdev implementation will be entirely removed from the kernel. Userspace relies on events and generic sysfs subsystem infrastructure from sysdev devices, which are made available with this conversion. Cc: Haavard Skinnemoen <[email protected]> Cc: Hans-Christian Egtvedt <[email protected]> Cc: Tony Luck <[email protected]> Cc: Fenghua Yu <[email protected]> Cc: Arnd Bergmann <[email protected]> Cc: Benjamin Herrenschmidt <[email protected]> Cc: Paul Mackerras <[email protected]> Cc: Martin Schwidefsky <[email protected]> Cc: Heiko Carstens <[email protected]> Cc: Paul Mundt <[email protected]> Cc: "David S. Miller" <[email protected]> Cc: Chris Metcalf <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: "H. Peter Anvin" <[email protected]> Cc: Borislav Petkov <[email protected]> Cc: Tigran Aivazian <[email protected]> Cc: Len Brown <[email protected]> Cc: Zhang Rui <[email protected]> Cc: Dave Jones <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Russell King <[email protected]> Cc: Andrew Morton <[email protected]> Cc: Arjan van de Ven <[email protected]> Cc: "Rafael J. Wysocki" <[email protected]> Cc: "Srivatsa S. Bhat" <[email protected]> Signed-off-by: Kay Sievers <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2011-12-20Merge branch 'memblock-kill-early_node_map' of ↵Ingo Molnar1-1/+3
git://git.kernel.org/pub/scm/linux/kernel/git/tj/misc into core/memblock
2011-12-11nohz: Remove tick_nohz_idle_enter_norcu() / tick_nohz_idle_exit_norcu()Frederic Weisbecker1-2/+4
Those two APIs were provided to optimize the calls of tick_nohz_idle_enter() and rcu_idle_enter() into a single irq disabled section. This way no interrupt happening in-between would needlessly process any RCU job. Now we are talking about an optimization for which benefits have yet to be measured. Let's start simple and completely decouple idle rcu and dyntick idle logics to simplify. Signed-off-by: Frederic Weisbecker <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: Peter Zijlstra <[email protected]> Reviewed-by: Josh Triplett <[email protected]> Signed-off-by: Paul E. McKenney <[email protected]>
2011-12-11nohz: Allow rcu extended quiescent state handling seperately from tick stopFrederic Weisbecker1-2/+2
It is assumed that rcu won't be used once we switch to tickless mode and until we restart the tick. However this is not always true, as in x86-64 where we dereference the idle notifiers after the tick is stopped. To prepare for fixing this, add two new APIs: tick_nohz_idle_enter_norcu() and tick_nohz_idle_exit_norcu(). If no use of RCU is made in the idle loop between tick_nohz_enter_idle() and tick_nohz_exit_idle() calls, the arch must instead call the new *_norcu() version such that the arch doesn't need to call rcu_idle_enter() and rcu_idle_exit(). Otherwise the arch must call tick_nohz_enter_idle() and tick_nohz_exit_idle() and also call explicitly: - rcu_idle_enter() after its last use of RCU before the CPU is put to sleep. - rcu_idle_exit() before the first use of RCU after the CPU is woken up. Signed-off-by: Frederic Weisbecker <[email protected]> Cc: Mike Frysinger <[email protected]> Cc: Guan Xuetao <[email protected]> Cc: David Miller <[email protected]> Cc: Chris Metcalf <[email protected]> Cc: Hans-Christian Egtvedt <[email protected]> Cc: Ralf Baechle <[email protected]> Cc: Paul E. McKenney <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: H. Peter Anvin <[email protected]> Cc: Russell King <[email protected]> Cc: Paul Mackerras <[email protected]> Cc: Heiko Carstens <[email protected]> Cc: Paul Mundt <[email protected]> Signed-off-by: Paul E. McKenney <[email protected]>
2011-12-11nohz: Separate out irq exit and idle loop dyntick logicFrederic Weisbecker1-2/+2
The tick_nohz_stop_sched_tick() function, which tries to delay the next timer tick as long as possible, can be called from two places: - From the idle loop to start the dytick idle mode - From interrupt exit if we have interrupted the dyntick idle mode, so that we reprogram the next tick event in case the irq changed some internal state that requires this action. There are only few minor differences between both that are handled by that function, driven by the ts->inidle cpu variable and the inidle parameter. The whole guarantees that we only update the dyntick mode on irq exit if we actually interrupted the dyntick idle mode, and that we enter in RCU extended quiescent state from idle loop entry only. Split this function into: - tick_nohz_idle_enter(), which sets ts->inidle to 1, enters dynticks idle mode unconditionally if it can, and enters into RCU extended quiescent state. - tick_nohz_irq_exit() which only updates the dynticks idle mode when ts->inidle is set (ie: if tick_nohz_idle_enter() has been called). To maintain symmetry, tick_nohz_restart_sched_tick() has been renamed into tick_nohz_idle_exit(). This simplifies the code and micro-optimize the irq exit path (no need for local_irq_save there). This also prepares for the split between dynticks and rcu extended quiescent state logics. We'll need this split to further fix illegal uses of RCU in extended quiescent states in the idle loop. Signed-off-by: Frederic Weisbecker <[email protected]> Cc: Mike Frysinger <[email protected]> Cc: Guan Xuetao <[email protected]> Cc: David Miller <[email protected]> Cc: Chris Metcalf <[email protected]> Cc: Hans-Christian Egtvedt <[email protected]> Cc: Ralf Baechle <[email protected]> Cc: Paul E. McKenney <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: H. Peter Anvin <[email protected]> Cc: Russell King <[email protected]> Cc: Paul Mackerras <[email protected]> Cc: Heiko Carstens <[email protected]> Cc: Paul Mundt <[email protected]> Signed-off-by: Paul E. McKenney <[email protected]> Reviewed-by: Josh Triplett <[email protected]>
2011-12-08s390: Use HAVE_MEMBLOCK_NODE_MAPTejun Heo1-1/+3
s390 used early_node_map[] just to prime free_area_init_nodes(). Now memblock can be used for the same purpose and early_node_map[] is scheduled to be dropped. Use memblock instead. Signed-off-by: Tejun Heo <[email protected]> Cc: Benjamin Herrenschmidt <[email protected]> Cc: Yinghai Lu <[email protected]> Cc: Martin Schwidefsky <[email protected]> Cc: Heiko Carstens <[email protected]> Cc: [email protected]
2011-12-01[S390] remove reset of system call restart on psw changesMartin Schwidefsky1-12/+0
git commit 20b40a794baf3b4b "signal race with restarting system calls" added code to the poke_user/poke_user_compat to reset the system call restart information in the thread-info if the PSW address is changed. The purpose of that change has been to workaround old gdbs that do not know about the REGSET_SYSTEM_CALL. It turned out that this is not a good idea, it makes the behaviour of the debuggee dependent on the order of specific ptrace call, e.g. the REGSET_SYSTEM_CALL register set needs to be written last. And the workaround does not really fix old gdbs, inferior calls on interrupted restarting system calls do not work either way. Signed-off-by: Martin Schwidefsky <[email protected]>
2011-12-01[S390] add missing .set function for NT_S390_LAST_BREAK regsetMartin Schwidefsky1-0/+18
The last breaking event address is a read-only value, the regset misses the .set function. If a PTRACE_SETREGSET is done for NT_S390_LAST_BREAK we get an oops due to a branch to zero: Kernel BUG at 0000000000000002 verbose debug info unavailable illegal operation: 0001 #1 SMP ... Call Trace: (<0000000000158294> ptrace_regset+0x184/0x188) <00000000001595b6> ptrace_request+0x37a/0x4fc <0000000000109a78> arch_ptrace+0x108/0x1fc <00000000001590d6> SyS_ptrace+0xaa/0x12c <00000000005c7a42> sysc_noemu+0x16/0x1c <000003fffd5ec10c> 0x3fffd5ec10c Last Breaking-Event-Address: <0000000000158242> ptrace_regset+0x132/0x188 Add a nop .set function to prevent the branch to zero. Signed-off-by: Martin Schwidefsky <[email protected]> Cc: [email protected]
2011-12-01[S390] ptrace inferior call interactions with TIF_SYSCALLMartin Schwidefsky1-5/+3
The TIF_SYSCALL bit needs to be cleared if the debugger changes the state of the ptraced process in regard to the presence of a system call. Otherwise the system call will be restarted although the debugger set up an inferior call. Signed-off-by: Martin Schwidefsky <[email protected]>
2011-12-01[S390] kdump: Replace is_kdump_kernel() with OLDMEM_BASE checkMichael Holzheu1-1/+1
In order to have the same behavior for kdump based stand-alone dump as for the kexec method, the is_kdump_kernel() check (only true for the kexec method) has to be replaced by the OLDMEM_BASE check (true for both methods). Signed-off-by: Michael Holzheu <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2011-11-14[S390] topology: fix topology on z10 machinesHeiko Carstens1-7/+38
Make sure that all cpus in a book on a z10 appear as book siblings and not as core siblings. This fixes some performance regressions that appeared after the book scheduling domain got introduced. Signed-off-by: Heiko Carstens <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2011-11-14[S390] avoid STCKF if running in ESA modeJan Glauber1-0/+2
In ESA mode STCKF is not defined even if the facility bit is enabled. To prevent an illegal operation we must also check if we run a 64 bit kernel. To make the check perform well add the STCKF bit to the machine flags. Signed-off-by: Jan Glauber <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2011-11-14[S390] zfcpdump: Do not initialize zfcpdump in kdump modeMichael Holzheu1-1/+3
When the kernel is started in kdump mode, zfcpdump should not be initialized because both dump methods can't be used at the same time. Signed-off-by: Michael Holzheu <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2011-11-14[S390] incorrect note program headerMartin Schwidefsky1-0/+2
'readelf -n' on the s390 vmlinux file generates lots of warnings about corrupt notes. The reason is that the 'NOTE' program header has incorrect file and memory sizes. The problem is that the section following the NOTES section do not switch to a different phdr and they get added to the NOTE program section. Add a dummy entry to the linker script that switches to the data phdr before the start of the RODATA section. Signed-off-by: Martin Schwidefsky <[email protected]>
2011-11-14[S390] wire up process_vm syscallsHeiko Carstens2-0/+22
Signed-off-by: Heiko Carstens <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2011-11-06Merge branch 'upstream/jump-label-noearly' of ↵Linus Torvalds1-20/+31
git://git.kernel.org/pub/scm/linux/kernel/git/jeremy/xen * 'upstream/jump-label-noearly' of git://git.kernel.org/pub/scm/linux/kernel/git/jeremy/xen: jump-label: initialize jump-label subsystem much earlier x86/jump_label: add arch_jump_label_transform_static() s390/jump-label: add arch_jump_label_transform_static() jump_label: add arch_jump_label_transform_static() to optimise non-live code updates sparc/jump_label: drop arch_jump_label_text_poke_early() x86/jump_label: drop arch_jump_label_text_poke_early() jump_label: if a key has already been initialized, don't nop it out stop_machine: make stop_machine safe and efficient to call early jump_label: use proper atomic_t initializer Conflicts: - arch/x86/kernel/jump_label.c Added __init_or_module to arch_jump_label_text_poke_early vs removal of that function entirely - kernel/stop_machine.c same patch ("stop_machine: make stop_machine safe and efficient to call early") merged twice, with whitespace fix in one version
2011-10-30[S390] Remove error checking from copy_oldmem_page()Michael Holzheu1-5/+4
Currently it can happen that the pre-allocated ELF header contains a wrong memory map which would result in errors when copying /proc/vmcore. In order to still get a valid vmcore, we (temporarily) disable the error checking in copy_oldmem_page(). This will then produce zero pages for those memory regions. Signed-off-by: Michael Holzheu <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2011-10-30[S390] irqstats: split IPI interrupt accountingHeiko Carstens2-2/+6
We use both the external call and emergency call IPIs to signal remote cpus. Therefore it makes sense to account them differently withing /proc/irqstats so we actually know what happened. Signed-off-by: Heiko Carstens <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2011-10-30[S390] sparse: fix sparse warnings with __user pointersMartin Schwidefsky2-12/+14
Use __force to quiet sparse warnings about user address space. Signed-off-by: Martin Schwidefsky <[email protected]>
2011-10-30[S390] sparse: fix sparse warnings in math-emuMartin Schwidefsky1-1/+1
Fix three sparse warnings in math-emu / sysinfo: arch/s390/kernel/sysinfo.c:448:17: error: return expression in void function arch/s390/kernel/sysinfo.c:445:25: warning: shift too big (32) for type unsigned int arch/s390/kernel/sysinfo.c:445:25: warning: shift too big (32) for type unsigned int Signed-off-by: Martin Schwidefsky <[email protected]>
2011-10-30[S390] sparse: fix sparse warnings about missing prototypesMartin Schwidefsky5-2/+15
Add prototypes and includes for functions used in different modules. Signed-off-by: Martin Schwidefsky <[email protected]>
2011-10-30[S390] sparse: fix sparse static warningsMartin Schwidefsky3-6/+6
Make functions and data static to avoid sparse warnings. Signed-off-by: Martin Schwidefsky <[email protected]>
2011-10-30[S390] sparse: fix access past end of array warningsMartin Schwidefsky2-42/+9
Remove unnecessary code to avoid false positives from sparse, e.g. arch/s390/kernel/compat_signal.c:221:61: warning: invalid access past the end of 'set32' (8 8) Signed-off-by: Martin Schwidefsky <[email protected]>
2011-10-30[S390] load user asce on sie_faultCarsten Otte1-0/+1
On sie_fault we need to switch back to user ASCE. Otherwise we get interresting effects when exiting to "userspace" while the guest space is still active. Signed-off-by: Carsten Otte <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2011-10-30[S390] smp: external call vs. emergency signalMartin Schwidefsky3-3/+13
Use a sigp sense running to decide which signal processor order to use for an ipi. If the target cpu is running use external call, if the target cpu is not running use emergency signal. Signed-off-by: Martin Schwidefsky <[email protected]>
2011-10-30[S390] chsc_sch: add support for irq statisticsSebastian Ott1-0/+1
Add support for CHSC I/O interrupt statistics in /proc/interrupts. Signed-off-by: Sebastian Ott <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2011-10-30[S390] allow all addressing modesMartin Schwidefsky3-23/+28
The user space program can change its addressing mode between the 24-bit, 31-bit and the 64-bit mode if the kernel is 64 bit. Currently the kernel always forces the standard amode on signal delivery and signal return and on ptrace: 64-bit for a 64-bit process, 31-bit for a compat process and 31-bit kernels. Change the signal and ptrace code to allow the full range of addressing modes. Signal handlers are run in the standard addressing mode for the process. One caveat is that even an 31-bit compat process can switch to the 64-bit mode. The next signal will switch back into the 31-bit mode and there is no room in the 31-bit compat signal frame to store the information that the program came from the 64-bit mode. Signed-off-by: Martin Schwidefsky <[email protected]>
2011-10-30[S390] cleanup psw related bits and piecesMartin Schwidefsky12-77/+76
Split out addressing mode bits from PSW_BASE_BITS, rename PSW_BASE_BITS to PSW_MASK_BASE, get rid of psw_user32_bits, remove unused function enabled_wait(), introduce PSW_MASK_USER, and drop PSW_MASK_MERGE macros. Change psw_kernel_bits / psw_user_bits to contain only the bits that are always set in the respective mode. Signed-off-by: Martin Schwidefsky <[email protected]>
2011-10-30[S390] add TIF_SYSCALL thread flagMartin Schwidefsky5-91/+65
Add an explicit TIF_SYSCALL bit that indicates if a task is inside a system call. The svc_code in the pt_regs structure is now only valid if TIF_SYSCALL is set. With this definition TIF_RESTART_SVC can be replaced with TIF_SYSCALL. Overall do_signal is a bit more readable and it saves a few lines of code. Signed-off-by: Martin Schwidefsky <[email protected]>
2011-10-30[S390] addressing mode limits and psw address wrappingMartin Schwidefsky1-2/+3
An instruction with an address right below the adress limit for the current addressing mode will wrap. The instruction restart logic in the protection fault handler and the signal code need to follow the wrapping rules to find the correct instruction address. Signed-off-by: Martin Schwidefsky <[email protected]>
2011-10-30[S390] signal race with restarting system callsMartin Schwidefsky6-87/+134
For a ERESTARTNOHAND/ERESTARTSYS/ERESTARTNOINTR restarting system call do_signal will prepare the restart of the system call with a rewind of the PSW before calling get_signal_to_deliver (where the debugger might take control). For A ERESTART_RESTARTBLOCK restarting system call do_signal will set -EINTR as return code. There are two issues with this approach: 1) strace never sees ERESTARTNOHAND, ERESTARTSYS, ERESTARTNOINTR or ERESTART_RESTARTBLOCK as the rewinding already took place or the return code has been changed to -EINTR 2) if get_signal_to_deliver does not return with a signal to deliver the restart via the repeat of the svc instruction is left in place. This opens a race if another signal is made pending before the system call instruction can be reexecuted. The original system call will be restarted even if the second signal would have ended the system call with -EINTR. These two issues can be solved by dropping the early rewind of the system call before get_signal_to_deliver has been called and by using the TIF_RESTART_SVC magic to do the restart if no signal has to be delivered. The only situation where the system call restart via the repeat of the svc instruction is appropriate is when a SA_RESTART signal is delivered to user space. Unfortunately this breaks inferior calls by the debugger again. The system call number and the length of the system call instruction is lost over the inferior call and user space will see ERESTARTNOHAND/ ERESTARTSYS/ERESTARTNOINTR/ERESTART_RESTARTBLOCK. To correct this a new ptrace interface is added to save/restore the system call number and system call instruction length. Signed-off-by: Martin Schwidefsky <[email protected]>
2011-10-30[S390] lowcore cleanupMartin Schwidefsky4-7/+6
Remove the save_area_64 field from the 0xe00 - 0xf00 area in the lowcore. Use a free slot in the save_area array instead. Signed-off-by: Martin Schwidefsky <[email protected]>
2011-10-30[S390] Add architecture code for unmapping crashkernel memoryMichael Holzheu2-4/+37
This patch implements the crash_map_pages() function for s390. KEXEC_CRASH_MEM_ALIGN is set to HPAGE_SIZE, in order to support kernel mappings that use large pages. We also use HPAGE_SIZE alignment for CONFIG_HUGETLB_PAGE=n in order to have the same 1 MiB alignment on all s390 systems. Signed-off-by: Michael Holzheu <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2011-10-30[S390] Export vmcoreinfo noteMichael Holzheu1-0/+10
This patch defines for s390 an ABI defined pointer to the vmcoreinfo note at a well known address. With this patch tools are able to find this information in dumps created by stand-alone or hypervisor dump tools. Signed-off-by: Michael Holzheu <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2011-10-30[S390] kdump backend codeMichael Holzheu12-11/+1044
This patch provides the architecture specific part of the s390 kdump support. Signed-off-by: Michael Holzheu <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2011-10-30[S390] Force PSW restart on online CPUMichael Holzheu2-0/+24
PSW restart can be triggered on offline CPUs. If this happens, currently the PSW restart code fails, because functions like smp_processor_id() do not work on offline CPUs. This patch fixes this as follows: If PSW restart is triggered on an offline CPU, the PSW restart (sigp restart) is done a second time on another CPU that is online and the old CPU is stopped afterwards. Signed-off-by: Michael Holzheu <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2011-10-30[S390] use ENTRY macro for sys_setns_wrapperJan Glauber1-2/+1
Use the ENTRY macro for the system call wrapper sys_setns_wrapper similarly to the other wrappers. Signed-off-by: Jan Glauber <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>