[PATCH 23/25] powerpc: Rework 4xx clock probing in boot wrapper
Josh Boyer
jwboyer at linux.vnet.ibm.com
Fri Dec 7 14:27:44 EST 2007
On Thu, 06 Dec 2007 19:00:22 +1100
Benjamin Herrenschmidt <benh at kernel.crashing.org> wrote:
> Index: linux-work/arch/powerpc/boot/reg.h
> ===================================================================
> --- linux-work.orig/arch/powerpc/boot/reg.h 2007-12-03 14:26:09.000000000 +1100
> +++ linux-work/arch/powerpc/boot/reg.h 2007-12-03 14:26:09.000000000 +1100
> @@ -24,6 +24,14 @@ static inline u32 mfpvr(void)
> : "=r" (rval)); rval; })
> #define mtspr(rn, v) asm volatile("mtspr " __stringify(rn) ",%0" : : "r" (v))
>
> +#define __stringify_1(x) #x
> +#define __stringify(x) __stringify_1(x)
> +
> +#define mfspr(rn) ({unsigned long rval; \
> + asm volatile("mfspr %0," __stringify(rn) \
> + : "=r" (rval)); rval; })
> +#define mtspr(rn, v) asm volatile("mtspr " __stringify(rn) ",%0" : : "r" (v))
> +
You felt like duplicating this? It was added in the previous patch. :)
josh
More information about the Linuxppc-dev
mailing list