[U-Boot] [PATCH 04/13] include: Add ffs64 header file

Fabio Estevam festevam at gmail.com
Sat Oct 24 16:54:40 CEST 2015


On Sat, Oct 24, 2015 at 11:37 AM, Fabio Estevam <festevam at gmail.com> wrote:
> Hi Tom,
>
> On Sat, Oct 24, 2015 at 11:32 AM, Tom Rini <trini at konsulko.com> wrote:
>> On Sat, Oct 24, 2015 at 10:28:04AM -0200, Fabio Estevam wrote:
>>
>>> From: Fabio Estevam <fabio.estevam at freescale.com>
>>>
>>> The ffs64() implementation for powerpc is not found in the Linux kernel,
>>> so use the ffs64 header file from barebox.
>>>
>>> Imported from barebox v2015.10.0.
>>>
>>> Signed-off-by: Fabio Estevam <fabio.estevam at freescale.com>
>>
>> I'm confused.  In the kernel __ffs64 is in <linux/bitops.h>, why do we
>> need to do things differently here?
>
> It is true that kernel uses __ffs64 from <linux/bitops.h>, however in
> U-boot (and barebox) there is also ffs64 for powerpc, so that's why I
> added a new header for it.
>
> We have no ffs64 in kernel, only __ffs64.

After thinking more about it, I think we can simply use __ffs64 for
powerpc as well.

There is no assembly optimzation for ffs64 so we can use the generic __ffs64.

Will prepare a new version doing this. Thanks


More information about the U-Boot mailing list