RE: [RFC V3] arm/arm64:add CONFIG_HAVE_ARCH_BITREVERSE to support rbit instruction

2014-10-28 Thread Wang, Yalin
> From: Will Deacon [mailto:will.dea...@arm.com] > Yup, sorry, I didn't realise this patch covered both architectures. It > would probably be a good idea to split it into 3 parts: a core part, then > the two architectural bits. > > Will Ok , I will split the patch into three parts, And send again

Re: [RFC V3] arm/arm64:add CONFIG_HAVE_ARCH_BITREVERSE to support rbit instruction

2014-10-28 Thread Will Deacon
On Tue, Oct 28, 2014 at 01:34:42AM +, Wang, Yalin wrote: > > From: Will Deacon [mailto:will.dea...@arm.com] > > > +++ b/arch/arm/include/asm/bitrev.h > > > @@ -0,0 +1,28 @@ > > > +#ifndef __ASM_ARM_BITREV_H > > > +#define __ASM_ARM_BITREV_H > > > + > > > +static __always_inline __attribute_cons

RE: [RFC V3] arm/arm64:add CONFIG_HAVE_ARCH_BITREVERSE to support rbit instruction

2014-10-27 Thread Wang, Yalin
> From: Will Deacon [mailto:will.dea...@arm.com] > > +++ b/arch/arm/include/asm/bitrev.h > > @@ -0,0 +1,28 @@ > > +#ifndef __ASM_ARM_BITREV_H > > +#define __ASM_ARM_BITREV_H > > + > > +static __always_inline __attribute_const__ u32 __arch_bitrev32(u32 x) > > +{ > > + if (__builtin_constant_p(x))

Re: [RFC V3] arm/arm64:add CONFIG_HAVE_ARCH_BITREVERSE to support rbit instruction

2014-10-27 Thread Will Deacon
On Mon, Oct 27, 2014 at 08:02:08AM +, Wang, Yalin wrote: > this change add CONFIG_HAVE_ARCH_BITREVERSE config option, > so that we can use arm/arm64 rbit instruction to do bitrev operation > by hardware. > > Signed-off-by: Yalin Wang > --- > arch/arm/Kconfig| 1 + > arch/arm