Re: [PATCH 18/24] C6X: headers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 2011-08-22 at 23:14 +0200, Arnd Bergmann wrote:
> On Monday 22 August 2011 16:09:39 Mark Salter wrote:
> > Signed-off-by: Mark Salter <msalter@xxxxxxxxxx>
> 
> > 
> > diff --git a/arch/c6x/include/asm/asm-offsets.h b/arch/c6x/include/asm/asm-offsets.h
> > new file mode 100644
> > index 0000000..d370ee3
> > --- /dev/null
> > +++ b/arch/c6x/include/asm/asm-offsets.h
> > @@ -0,0 +1 @@
> > +#include <generated/asm-offsets.h>
> 
> I wonder if it makes sense to install this file in asm-generic/asm-offsets.h
> and referencing it like the other files.

I think so. It is the same for all arches.

> 
> > +#include <asm-generic/bitops/hweight.h>
> 
> Do you have an instruction that can be used for hweight? That is often a useful
> optimization.

Hmm, there is a bit count instruction, but it counts bits within octets
of a 32 bit register, so it ends with 4 sums that would need shifting
and adding. Even so, a little asm here would be a good optimization. All
of the bitops need a look for such optimizations because of how well
DSPs support bit manipulations.

--Mark


--
To unsubscribe from this list: send the line "unsubscribe linux-arch" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel]     [Kernel Newbies]     [x86 Platform Driver]     [Netdev]     [Linux Wireless]     [Netfilter]     [Bugtraq]     [Linux Filesystems]     [Yosemite Discussion]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]

  Powered by Linux