From mboxrd@z Thu Jan 1 00:00:00 1970 From: Fabio Estevam Date: Sat, 24 Oct 2015 10:28:04 -0200 Subject: [U-Boot] [PATCH 04/13] include: Add ffs64 header file In-Reply-To: <1445689693-21436-1-git-send-email-festevam@gmail.com> References: <1445689693-21436-1-git-send-email-festevam@gmail.com> Message-ID: <1445689693-21436-4-git-send-email-festevam@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de From: Fabio Estevam 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 --- 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 + +static inline int ffs64(u64 x) +{ + return __ilog2_u64(x & -x) + 1ull; +} -- 1.9.1