summaryrefslogtreecommitdiff
path: root/arch/s390/lib/delay.c
diff options
context:
space:
mode:
authorDmitry Torokhov <dtor@insightbb.com>2007-05-01 08:24:54 +0400
committerDmitry Torokhov <dtor@insightbb.com>2007-05-01 08:24:54 +0400
commitbc95f3669f5e6f63cf0b84fe4922c3c6dd4aa775 (patch)
tree427fcf2a7287c16d4b5aa6cbf494d59579a6a8b1 /arch/s390/lib/delay.c
parent3d29cdff999c37b3876082278a8134a0642a02cd (diff)
parentdc87c3985e9b442c60994308a96f887579addc39 (diff)
downloadlinux-bc95f3669f5e6f63cf0b84fe4922c3c6dd4aa775.tar.xz
Merge master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6
Conflicts: drivers/usb/input/Makefile drivers/usb/input/gtco.c
Diffstat (limited to 'arch/s390/lib/delay.c')
-rw-r--r--arch/s390/lib/delay.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/s390/lib/delay.c b/arch/s390/lib/delay.c
index 02854449b74b..70f2a862b670 100644
--- a/arch/s390/lib/delay.c
+++ b/arch/s390/lib/delay.c
@@ -15,6 +15,7 @@
#include <linux/delay.h>
#include <linux/timex.h>
#include <linux/irqflags.h>
+#include <linux/interrupt.h>
void __delay(unsigned long loops)
{
@@ -35,7 +36,11 @@ void __udelay(unsigned long usecs)
{
u64 end, time, jiffy_timer = 0;
unsigned long flags, cr0, mask, dummy;
+ int irq_context;
+ irq_context = in_interrupt();
+ if (!irq_context)
+ local_bh_disable();
local_irq_save(flags);
if (raw_irqs_disabled_flags(flags)) {
jiffy_timer = S390_lowcore.jiffy_timer;
@@ -62,6 +67,8 @@ void __udelay(unsigned long usecs)
__ctl_load(cr0, 0, 0);
S390_lowcore.jiffy_timer = jiffy_timer;
}
+ if (!irq_context)
+ _local_bh_enable();
set_clock_comparator(S390_lowcore.jiffy_timer);
local_irq_restore(flags);
}