aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/lib
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2009-09-01 00:54:14 -0400
committerPaul Mundt <lethal@linux-sh.org>2009-09-01 00:54:14 -0400
commitac6a0cf6716bb46813d0161024c66c2af66e53d1 (patch)
treec7f53b1a04c590032c022549f3186fb9b04f8358 /arch/sh/lib
parente76a0136a3cf1859fbc07f122e42293d22229558 (diff)
parentce3f7cb96e67d6518c7fc7b361a76409c3817d64 (diff)
Merge branch 'master' into sh/smp
Conflicts: arch/sh/mm/cache-sh4.c
Diffstat (limited to 'arch/sh/lib')
-rw-r--r--arch/sh/lib/__clear_user.S2
-rw-r--r--arch/sh/lib/delay.c5
2 files changed, 4 insertions, 3 deletions
diff --git a/arch/sh/lib/__clear_user.S b/arch/sh/lib/__clear_user.S
index bee9817e055d..db1dca7aad14 100644
--- a/arch/sh/lib/__clear_user.S
+++ b/arch/sh/lib/__clear_user.S
@@ -11,7 +11,7 @@
11ENTRY(__clear_user) 11ENTRY(__clear_user)
12 ! 12 !
13 mov #0, r0 13 mov #0, r0
14 mov #0xe0, r1 ! 0xffffffe0 14 mov #0xffffffe0, r1
15 ! 15 !
16 ! r4..(r4+31)&~32 -------- not aligned [ Area 0 ] 16 ! r4..(r4+31)&~32 -------- not aligned [ Area 0 ]
17 ! (r4+31)&~32..(r4+r5)&~32 -------- aligned [ Area 1 ] 17 ! (r4+31)&~32..(r4+r5)&~32 -------- aligned [ Area 1 ]
diff --git a/arch/sh/lib/delay.c b/arch/sh/lib/delay.c
index f3ddd2133e6f..faa8f86c0db4 100644
--- a/arch/sh/lib/delay.c
+++ b/arch/sh/lib/delay.c
@@ -21,13 +21,14 @@ void __delay(unsigned long loops)
21 21
22inline void __const_udelay(unsigned long xloops) 22inline void __const_udelay(unsigned long xloops)
23{ 23{
24 xloops *= 4;
24 __asm__("dmulu.l %0, %2\n\t" 25 __asm__("dmulu.l %0, %2\n\t"
25 "sts mach, %0" 26 "sts mach, %0"
26 : "=r" (xloops) 27 : "=r" (xloops)
27 : "0" (xloops), 28 : "0" (xloops),
28 "r" (HZ * cpu_data[raw_smp_processor_id()].loops_per_jiffy) 29 "r" (cpu_data[raw_smp_processor_id()].loops_per_jiffy * (HZ/4))
29 : "macl", "mach"); 30 : "macl", "mach");
30 __delay(xloops); 31 __delay(++xloops);
31} 32}
32 33
33void __udelay(unsigned long usecs) 34void __udelay(unsigned long usecs)