Re: [GIT PULL] core/hweight changes for v2.6.35

From: Borislav Petkov
Date: Sat Aug 14 2010 - 09:45:11 EST


From: "H. Peter Anvin" <hpa@xxxxxxxxx>
Date: Fri, Aug 13, 2010 at 05:11:14PM -0700

> On 08/13/2010 02:59 PM, Mike Frysinger wrote:
> >
> > but those targets still define CONFIG_GENERIC_HWEIGHT right ? so at
> > the least, we should be wrapping the prototypes in linux/bitops.h with
> > that ...
> >
>
> Yes, I guess they do.

Actually, Mike's issue is valid, if I understand it correctly. From
looking at <arch/blackfin/include/asm/bitops.h>, Blackfin doesn't need
the generic software variants __sw_hweightXX at all, right?

In that case, <include/linux/bitops.h> is pulling in needlessly
unresolved symbols for arches which have their hw versions of
hweight and don't need sw variants. However, if you want to include
<asm-generic/bitops/hweight.h> and benefit from the compile-time
evaluation of the const hweight args, you're going to need to rename
the hweightXX() functions in <arch/blackfin/include/asm/bitops.h> to
__arch_hweightXX but that shouldn't be a problem I guess :).

Let me give your patch from couple of mails ago a quick spin...

--
Regards/Gruss,
Boris.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/