aboutsummaryrefslogtreecommitdiff
path: root/arch/sh/lib64
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sh/lib64')
-rw-r--r--arch/sh/lib64/c-checksum.c2
-rw-r--r--arch/sh/lib64/udelay.c21
2 files changed, 8 insertions, 15 deletions
diff --git a/arch/sh/lib64/c-checksum.c b/arch/sh/lib64/c-checksum.c
index 5dfbd8b5e55..5c284e0cff9 100644
--- a/arch/sh/lib64/c-checksum.c
+++ b/arch/sh/lib64/c-checksum.c
@@ -207,7 +207,7 @@ __wsum csum_tcpudp_nofold(__be32 saddr, __be32 daddr,
result = (result & 0xffffffff) + (result >> 32);
pr_debug("%s saddr %x daddr %x len %x proto %x sum %x result %08Lx\n",
- __FUNCTION__, saddr, daddr, len, proto, sum, result);
+ __func__, saddr, daddr, len, proto, sum, result);
return (__wsum)result;
}
diff --git a/arch/sh/lib64/udelay.c b/arch/sh/lib64/udelay.c
index 23c7d17fb9f..d76bd801194 100644
--- a/arch/sh/lib64/udelay.c
+++ b/arch/sh/lib64/udelay.c
@@ -21,7 +21,7 @@
* a 1GHz box, that's about 2 seconds.
*/
-void __delay(int loops)
+void __delay(unsigned long loops)
{
long long dummy;
__asm__ __volatile__("gettr tr0, %1\n\t"
@@ -33,24 +33,17 @@ void __delay(int loops)
:"0"(loops));
}
-void __udelay(unsigned long long usecs, unsigned long lpj)
+inline void __const_udelay(unsigned long xloops)
{
- usecs *= (((unsigned long long) HZ << 32) / 1000000) * lpj;
- __delay((long long) usecs >> 32);
+ __delay(xloops * (HZ * cpu_data[raw_smp_processor_id()].loops_per_jiffy));
}
-void __ndelay(unsigned long long nsecs, unsigned long lpj)
+void __udelay(unsigned long usecs)
{
- nsecs *= (((unsigned long long) HZ << 32) / 1000000000) * lpj;
- __delay((long long) nsecs >> 32);
+ __const_udelay(usecs * 0x000010c6); /* 2**32 / 1000000 */
}
-void udelay(unsigned long usecs)
+void __ndelay(unsigned long nsecs)
{
- __udelay(usecs, cpu_data[raw_smp_processor_id()].loops_per_jiffy);
-}
-
-void ndelay(unsigned long nsecs)
-{
- __ndelay(nsecs, cpu_data[raw_smp_processor_id()].loops_per_jiffy);
+ __const_udelay(nsecs * 0x00000005);
}