linux/arch/s390/kernel
Heiko Carstens db7e007fd6 s390/udelay: make udelay have busy loop semantics
When using systemtap it was observed that our udelay implementation is
rather suboptimal if being called from a kprobe handler installed by
systemtap.

The problem observed when a kprobe was installed on lock_acquired().
When the probe was hit the kprobe handler did call udelay, which set
up an (internal) timer and reenabled interrupts (only the clock comparator
interrupt) and waited for the interrupt.
This is an optimization to avoid that the cpu is busy looping while waiting
that enough time passes. The problem is that the interrupt handler still
does call irq_enter()/irq_exit() which then again can lead to a deadlock,
since some accounting functions may take locks as well.

If one of these locks is the same, which caused lock_acquired() to be
called, we have a nice deadlock.

This patch reworks the udelay code for the interrupts disabled case to
immediately leave the low level interrupt handler when the clock
comparator interrupt happens. That way no C code is being called and the
deadlock cannot happen anymore.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Reviewed-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2015-10-14 14:32:13 +02:00
..
vdso32 s390/vdso: emit a GNU hash 2015-08-07 09:57:39 +02:00
vdso64 s390/vdso: emit a GNU hash 2015-08-07 09:57:39 +02:00
.gitignore
asm-offsets.c s390/cpumf: rework program parameter setting to detect guest samples 2015-10-14 14:32:12 +02:00
audit.c
audit.h
base.S s390/kdump: fix nosmt kernel parameter 2015-06-25 09:39:26 +02:00
cache.c s390/cachinfo: add missing facility check to init_cache_level() 2015-07-28 08:54:42 +02:00
compat_audit.c
compat_linux.c groups: Consolidate the setgroups permission checks 2014-12-05 17:19:27 -06:00
compat_linux.h s390: add support for vector extension 2014-10-09 09:14:13 +02:00
compat_ptrace.h
compat_signal.c s390/fpu: always enable the vector facility if it is available 2015-10-14 14:32:08 +02:00
compat_wrapper.c s390: wire up separate socketcalls system calls 2015-09-18 11:16:53 +02:00
cpcmd.c s390/diag: add a statistic for diagnose calls 2015-10-14 14:32:06 +02:00
crash_dump.c s390/crash_dump: use for_each_mem_range 2015-10-14 14:32:01 +02:00
debug.c s390: time: Provide read_boot_clock64() and read_persistent_clock64() 2015-05-22 10:36:29 -07:00
diag.c s390/diag: add tracepoint for diagnose calls 2015-10-14 14:32:06 +02:00
dis.c s390: remove 31 bit support 2015-03-25 11:49:33 +01:00
dumpstack.c s390: remove 31 bit support 2015-03-25 11:49:33 +01:00
early.c s390/fpu: always enable the vector facility if it is available 2015-10-14 14:32:08 +02:00
ebcdic.c
entry.h s390/udelay: make udelay have busy loop semantics 2015-10-14 14:32:13 +02:00
entry.S s390/udelay: make udelay have busy loop semantics 2015-10-14 14:32:13 +02:00
ftrace.c s390/maccess: remove potentially broken probe_kernel_write() 2015-03-25 11:49:43 +01:00
head64.S s390/cpumf: rework program parameter setting to detect guest samples 2015-10-14 14:32:12 +02:00
head_kdump.S s390: remove 31 bit support 2015-03-25 11:49:33 +01:00
head.S s390/facilities: remove transactional-execution bits 2015-08-19 10:03:34 +02:00
idle.c s390/idle: convert open coded idle time seqcount 2014-12-08 09:42:32 +01:00
ipl.c s390/diag: add a statistic for diagnose calls 2015-10-14 14:32:06 +02:00
irq.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2015-04-15 09:00:47 -07:00
jump_label.c Merge branch 'locking-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2015-09-03 15:46:07 -07:00
kprobes.c s390/maccess: remove potentially broken probe_kernel_write() 2015-03-25 11:49:43 +01:00
lgr.c
machine_kexec.c s390: add SMT support 2015-01-22 12:16:01 +01:00
Makefile s390/diag: add tracepoint for diagnose calls 2015-10-14 14:32:06 +02:00
mcount.S s390/ftrace: hotpatch support for function tracing 2015-01-29 09:19:25 +01:00
module.c s390: remove 31 bit support 2015-03-25 11:49:33 +01:00
nmi.c s390/nmi: initialize control register 0 earlier 2015-08-19 10:40:38 +02:00
os_info.c
perf_cpum_cf_events.c s390/cpum_cf: Export event names in sysfs 2013-12-16 14:37:50 +01:00
perf_cpum_cf.c s390/cpum_cf: Corrected return code for unauthorized counter sets 2015-09-17 13:43:42 +02:00
perf_cpum_sf.c s390/cpumf: rework program parameter setting to detect guest samples 2015-10-14 14:32:12 +02:00
perf_event.c s390/perf: make print_debug_cf() static 2014-03-14 12:59:32 +01:00
pgm_check.S s390: remove 31 bit support 2015-03-25 11:49:33 +01:00
process.c s390/fpu: add static FPU save area for init_task 2015-10-14 14:32:08 +02:00
processor.c s390/diag: add a statistic for diagnose calls 2015-10-14 14:32:06 +02:00
ptrace.c s390/fpu: always enable the vector facility if it is available 2015-10-14 14:32:08 +02:00
reipl.S s390: remove "64" suffix from a couple of files 2015-03-25 11:49:34 +01:00
relocate_kernel.S s390: remove "64" suffix from a couple of files 2015-03-25 11:49:34 +01:00
runtime_instr.c s390/irq: Use defines for external interruption codes 2014-04-03 14:30:52 +02:00
s390_ksyms.c s390/fpu: always enable the vector facility if it is available 2015-10-14 14:32:08 +02:00
sclp.c s390/sclp: convert early sclp console code to C 2015-07-29 09:11:39 +02:00
setup.c s390/setup: fix novx parameter 2015-08-19 10:40:04 +02:00
signal.c s390/fpu: always enable the vector facility if it is available 2015-10-14 14:32:08 +02:00
smp.c s390/cpumf: rework program parameter setting to detect guest samples 2015-10-14 14:32:12 +02:00
stacktrace.c
suspend.c PCI: Include <linux/pci.h>, not <asm/pci.h> 2015-06-08 07:55:03 -05:00
swsusp.S s390/hibernate: fix save and restore of vector registers 2015-09-17 13:43:41 +02:00
sys_s390.c s390: remove 31 bit support 2015-03-25 11:49:33 +01:00
syscalls.S s390: wire up separate socketcalls system calls 2015-09-18 11:16:53 +02:00
sysinfo.c Fairly small update, but there are some interesting new features. 2015-02-13 09:55:09 -08:00
time.c Merge branch 'locking-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2015-09-03 15:46:07 -07:00
topology.c s390/numa: re-add DIE sched_domain_topology_level 2015-08-19 10:03:14 +02:00
trace.c s390/diag: add tracepoint for diagnose calls 2015-10-14 14:32:06 +02:00
traps.c s390/fpu: always enable the vector facility if it is available 2015-10-14 14:32:08 +02:00
uprobes.c s390/uprobes: fix address space annotation 2015-03-25 11:49:47 +01:00
vdso.c s390/vdso: use correct memory barrier 2015-10-14 14:32:01 +02:00
vmlinux.lds.S s390: remove 31 bit support 2015-03-25 11:49:33 +01:00
vtime.c s390/vtime: correct scaled cputime of partially idle CPUs 2015-09-30 16:22:38 +02:00