From 96805a529c3ce366f3ecfd58a8b72ec21432af1c Mon Sep 17 00:00:00 2001 From: Timur Tabi Date: Tue, 14 Dec 2010 17:18:51 -0600 Subject: powerpc: fix register usage in some inline assembly code In some usages of inline assembly, hard-coded registers were specified when a scratch register should have been used instead. Signed-off-by: Timur Tabi --- arch/powerpc/lib/time.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'arch/powerpc/lib/time.c') diff --git a/arch/powerpc/lib/time.c b/arch/powerpc/lib/time.c index 2909961..34633c3 100644 --- a/arch/powerpc/lib/time.c +++ b/arch/powerpc/lib/time.c @@ -78,6 +78,8 @@ unsigned long ticks2usec(unsigned long ticks) int init_timebase (void) { + unsigned long temp; + #if defined(CONFIG_5xx) || defined(CONFIG_8xx) volatile immap_t *immap = (immap_t *) CONFIG_SYS_IMMR; @@ -86,7 +88,8 @@ int init_timebase (void) #endif /* reset */ - asm ("li 3,0 ; mttbu 3 ; mttbl 3 ;"); + asm volatile("li %0,0 ; mttbu %0 ; mttbl %0;" + : "=&r"(temp) ); #if defined(CONFIG_5xx) || defined(CONFIG_8xx) /* enable */ -- cgit v1.1