aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/lib/delay.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/s390/lib/delay.c')
-rw-r--r--arch/s390/lib/delay.c34
1 files changed, 6 insertions, 28 deletions
diff --git a/arch/s390/lib/delay.c b/arch/s390/lib/delay.c
index 928b1dbe182c..f289afeb3f31 100644
--- a/arch/s390/lib/delay.c
+++ b/arch/s390/lib/delay.c
@@ -19,13 +19,6 @@
#include <asm/div64.h>
#include <asm/idle.h>
-static DEFINE_STATIC_KEY_FALSE(udelay_ready);
-
-void __init udelay_enable(void)
-{
- static_branch_enable(&udelay_ready);
-}
-
void __delay(unsigned long loops)
{
/*
@@ -39,40 +32,25 @@ void __delay(unsigned long loops)
}
EXPORT_SYMBOL(__delay);
-static void delay_loop(unsigned long delta, bool simple)
+static void delay_loop(unsigned long delta)
{
unsigned long end;
- if (static_branch_likely(&udelay_ready) && !simple) {
- end = get_tod_clock_monotonic() + delta;
- while (!tod_after(get_tod_clock_monotonic(), end))
- cpu_relax();
- } else {
- end = get_tod_clock() + delta;
- while (!tod_after(get_tod_clock(), end))
- cpu_relax();
- }
+ end = get_tod_clock_monotonic() + delta;
+ while (!tod_after(get_tod_clock_monotonic(), end))
+ cpu_relax();
}
void __udelay(unsigned long usecs)
{
- delay_loop(usecs << 12, 0);
+ delay_loop(usecs << 12);
}
EXPORT_SYMBOL(__udelay);
-/*
- * Simple udelay variant. To be used on startup and reboot
- * when the interrupt handler isn't working.
- */
-void udelay_simple(unsigned long usecs)
-{
- delay_loop(usecs << 12, 1);
-}
-
void __ndelay(unsigned long nsecs)
{
nsecs <<= 9;
do_div(nsecs, 125);
- delay_loop(nsecs, 0);
+ delay_loop(nsecs);
}
EXPORT_SYMBOL(__ndelay);

Privacy Policy