[PATCH v3 7/8] ARM: Move system register accessors to asm/cp15.h

Vladimir Murzin vladimir.murzin at arm.com
Mon Sep 12 02:44:51 PDT 2016


Sorry, missed this part...

On 09/09/16 18:05, Marc Zyngier wrote:
>>  
>> > +#define __ACCESS_CP15(CRn, Op1, CRm, Op2)	\
>> > +	"mrc", "mcr", __stringify(p15, Op1, %0, CRn, CRm, Op2), u32
>> > +#define __ACCESS_CP15_64(Op1, CRm)		\
>> > +	"mrrc", "mcrr", __stringify(p15, Op1, %Q0, %R0, CRm), u64
>> > +
>> > +#define __read_sysreg(r, w, c, t) ({				\
>> > +	t __val;						\
>> > +	asm volatile(r " " c : "=r" (__val));			\
>> > +	__val;							\
>> > +})
>> > +#define read_sysreg(...)		__read_sysreg(__VA_ARGS__)
>> > +
>> > +#define __write_sysreg(v, r, w, c, t)	asm volatile(w " " c : : "r" ((t)(v)))
>> > +#define write_sysreg(v, ...)		__write_sysreg(v, __VA_ARGS__)
>> > +
> Shouldn't that be placed after the #ifdef below?
> 

Yes, I'll move it under #ifdef.

Thanks
Vladimir




More information about the linux-arm-kernel mailing list