diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-05-27 13:18:00 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-05-27 13:18:00 -0400 |
commit | 95948c31bec26e631ecf138cb04dcd547519c7af (patch) | |
tree | 10a56e8c9635131bcbef28721443b63b39642840 /arch/s390/lib/delay.c | |
parent | 45acab01ca6389371ec39e16844768a60f5f1380 (diff) | |
parent | 69dbb2f79a5626741a24770719406a4edb2cb84f (diff) |
Merge branch 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6
* 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6:
[S390] mm: add ZONE_DMA to 31-bit config again
[S390] mm: add page fault retry handling
[S390] mm: handle kernel caused page fault oom situations
[S390] delay: implement ndelay
[S390] topology,sched: fix cpu_coregroup_mask/cpu_book_mask definitions
[S390] hwsampler: allow cpu hotplug
[S390] uaccess: turn __access_ok() into a define
[S390] irq: merge irq.c and s390_ext.c
[S390] irq: fix service signal external interrupt handling
[S390] pfault: always enable service signal interrupt
Diffstat (limited to 'arch/s390/lib/delay.c')
-rw-r--r-- | arch/s390/lib/delay.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/arch/s390/lib/delay.c b/arch/s390/lib/delay.c index 0f53110e1d09..a65229d91c92 100644 --- a/arch/s390/lib/delay.c +++ b/arch/s390/lib/delay.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <linux/module.h> | 12 | #include <linux/module.h> |
13 | #include <linux/irqflags.h> | 13 | #include <linux/irqflags.h> |
14 | #include <linux/interrupt.h> | 14 | #include <linux/interrupt.h> |
15 | #include <asm/div64.h> | ||
15 | 16 | ||
16 | void __delay(unsigned long loops) | 17 | void __delay(unsigned long loops) |
17 | { | 18 | { |
@@ -116,3 +117,17 @@ void udelay_simple(unsigned long long usecs) | |||
116 | while (get_clock() < end) | 117 | while (get_clock() < end) |
117 | cpu_relax(); | 118 | cpu_relax(); |
118 | } | 119 | } |
120 | |||
121 | void __ndelay(unsigned long long nsecs) | ||
122 | { | ||
123 | u64 end; | ||
124 | |||
125 | nsecs <<= 9; | ||
126 | do_div(nsecs, 125); | ||
127 | end = get_clock() + nsecs; | ||
128 | if (nsecs & ~0xfffUL) | ||
129 | __udelay(nsecs >> 12); | ||
130 | while (get_clock() < end) | ||
131 | barrier(); | ||
132 | } | ||
133 | EXPORT_SYMBOL(__ndelay); | ||