
From: Fabio Estevam fabio.estevam@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@freescale.com --- arch/powerpc/include/asm/ffs64.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 arch/powerpc/include/asm/ffs64.h
diff --git a/arch/powerpc/include/asm/ffs64.h b/arch/powerpc/include/asm/ffs64.h new file mode 100644 index 0000000..620874c --- /dev/null +++ b/arch/powerpc/include/asm/ffs64.h @@ -0,0 +1,12 @@ +/* + * Copyright 2013 GE Intelligent Platforms, Inc. + * + * SPDX-License-Identifier: GPL-2.0+ + * + */ +#include <linux/log2.h> + +static inline int ffs64(u64 x) +{ + return __ilog2_u64(x & -x) + 1ull; +}