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

Olof Johansson olof at lixom.net
Fri Oct 20 11:56:20 EST 2006


On Fri, 20 Oct 2006 11:47:20 +1000 Benjamin Herrenschmidt <benh at kernel.crashing.org> 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



More information about the Linuxppc-dev mailing list