summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorHeiko Carstens <hca@linux.ibm.com>2020-12-14 21:44:39 +0100
committerHeiko Carstens <hca@linux.ibm.com>2020-12-16 14:55:49 +0100
commite0d62dcb20beac18a412ef9355208d9058c674d3 (patch)
treed94f602db4750b34b5710711ec6ba611cb0b8a71 /arch
parent9ceed9988a8e6a1656ed2bdaa30501cf0f3dd925 (diff)
downloadlinux-e0d62dcb20beac18a412ef9355208d9058c674d3.tar.gz
linux-e0d62dcb20beac18a412ef9355208d9058c674d3.tar.bz2
linux-e0d62dcb20beac18a412ef9355208d9058c674d3.zip
s390/delay: remove udelay_simple()
udelay_simple() callers can make use of the now simplified udelay() implementation. No need to keep it. Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/s390/include/asm/delay.h2
-rw-r--r--arch/s390/kernel/ipl.c2
-rw-r--r--arch/s390/kernel/setup.c1
-rw-r--r--arch/s390/lib/delay.c34
4 files changed, 7 insertions, 32 deletions
diff --git a/arch/s390/include/asm/delay.h b/arch/s390/include/asm/delay.h
index b566be6f13f3..21a8fe18fe66 100644
--- a/arch/s390/include/asm/delay.h
+++ b/arch/s390/include/asm/delay.h
@@ -13,10 +13,8 @@
#ifndef _S390_DELAY_H
#define _S390_DELAY_H
-void udelay_enable(void);
void __ndelay(unsigned long nsecs);
void __udelay(unsigned long usecs);
-void udelay_simple(unsigned long usecs);
void __delay(unsigned long loops);
#define ndelay(n) __ndelay((unsigned long)(n))
diff --git a/arch/s390/kernel/ipl.c b/arch/s390/kernel/ipl.c
index 98b3aca1de8e..7a21eca498aa 100644
--- a/arch/s390/kernel/ipl.c
+++ b/arch/s390/kernel/ipl.c
@@ -1512,7 +1512,7 @@ static void diag308_dump(void *dump_block)
while (1) {
if (diag308(DIAG308_LOAD_NORMAL_DUMP, NULL) != 0x302)
break;
- udelay_simple(USEC_PER_SEC);
+ udelay(USEC_PER_SEC);
}
}
diff --git a/arch/s390/kernel/setup.c b/arch/s390/kernel/setup.c
index 1f16a03be995..1fbed91c73bc 100644
--- a/arch/s390/kernel/setup.c
+++ b/arch/s390/kernel/setup.c
@@ -335,7 +335,6 @@ int __init arch_early_irq_init(void)
if (!stack)
panic("Couldn't allocate async stack");
S390_lowcore.async_stack = stack + STACK_INIT_OFFSET;
- udelay_enable();
return 0;
}
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);