Subject: Re: [PATCH 5/5] powerpc: Cell timebase bug workaround

From: Olof Johansson <[email-masked]>
Date: Thu, 19 Oct 2006 20:56:20 -0500

On Fri, 20 Oct 2006 11:47:20 +1000 Benjamin Herrenschmidt <[email-masked]> wrote:

>  static inline unsigned int get_tbu(void)
>  {
> +#ifdef CONFIG_403GCX
>  	unsigned int tbu;
> -
> -#if defined(CONFIG_403GCX)
>  	asm volatile("mfspr %0, 0x3dc" : "=r" (tbu));
> +	return tbu;
> +#elif defined(CONFIG_PPC32)
> +	return mftbu();
>  #else
> -	asm volatile("mftbu %0" : "=r" (tbu));
> +	return mftb();
>  #endif
> -	return tbu;
>  }
>  

Shouldn't the last one be mftbu(), since that's what the asm used to do?

-Olof