From mboxrd@z Thu Jan 1 00:00:00 1970 From: Akinobu Mita Date: Wed, 01 Feb 2006 09:02:34 +0000 Subject: [patch 10/44] generic fls64() Message-Id: <20060201090323.294297000@localhost.localdomain> List-Id: References: <20060201090224.536581000@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-kernel@vger.kernel.org Cc: Richard Henderson , Ivan Kokshaysky , Russell King , Ian Molton , dev-etrax@axis.com, David Howells , Yoshinori Sato , Linus Torvalds , linux-ia64@vger.kernel.org, Hirokazu Takata , linux-m68k@vger.kernel.org, Greg Ungerer , linux-mips@linux-mips.org, parisc-linux@parisc-linux.org, linuxppc-dev@ozlabs.org, linux390@de.ibm.com, linuxsh-dev@lists.sourceforge.net, linuxsh-shmedia-dev@lists.sourceforge.net, sparclinux@vger.kernel.org, ultralinux@vger.kernel.org, Miles Bader , Andi Kleen , Chris Zankel , Akinobu Mita This patch introduces the C-language equivalent of the function: int fls64(__u64 x); In include/asm-generic/bitops/fls64.h This code largely copied from: include/linux/bitops.h Signed-off-by: Akinobu Mita include/asm-generic/bitops/fls64.h | 12 ++++++++++++ 1 files changed, 12 insertions(+) Index: 2.6-git/include/asm-generic/bitops/fls64.h =================================--- /dev/null +++ 2.6-git/include/asm-generic/bitops/fls64.h @@ -0,0 +1,12 @@ +#ifndef _ASM_GENERIC_BITOPS_FLS64_H_ +#define _ASM_GENERIC_BITOPS_FLS64_H_ + +static inline int fls64(__u64 x) +{ + __u32 h = x >> 32; + if (h) + return fls(x) + 32; + return fls(x); +} + +#endif /* _ASM_GENERIC_BITOPS_FLS64_H_ */ -- From mboxrd@z Thu Jan 1 00:00:00 1970 Received: with ECARTIS (v1.0.0; list linux-mips); Wed, 01 Feb 2006 09:03:21 +0000 (GMT) Received: from ns.miraclelinux.com ([219.118.163.66]:58954 "EHLO mail01.miraclelinux.com") by ftp.linux-mips.org with ESMTP id S8133655AbWBAI60 (ORCPT ); Wed, 1 Feb 2006 08:58:26 +0000 Received: from mail01 (localhost.localdomain [127.0.0.1]) by mail01.miraclelinux.com (Postfix) with ESMTP id F2B7731C1F3; Wed, 1 Feb 2006 18:03:24 +0900 (JST) Received: from localhost.localdomain (sshgate.miraclelinux.com []) by mail01.miraclelinux.com ([10.1.0.10]); Wed, 01 Feb 2006 09:03:24 +0000 Received: by localhost.localdomain (Postfix, from userid 1000) id 1EADC4201E0; Wed, 1 Feb 2006 18:03:23 +0900 (JST) Message-Id: <20060201090323.294297000@localhost.localdomain> References: <20060201090224.536581000@localhost.localdomain> Date: Wed, 01 Feb 2006 18:02:34 +0900 From: Akinobu Mita To: linux-kernel@vger.kernel.org Cc: Richard Henderson , Ivan Kokshaysky , Russell King , Ian Molton , dev-etrax@axis.com, David Howells , Yoshinori Sato , Linus Torvalds , linux-ia64@vger.kernel.org, Hirokazu Takata , linux-m68k@lists.linux-m68k.org, Greg Ungerer , linux-mips@linux-mips.org, parisc-linux@parisc-linux.org, linuxppc-dev@ozlabs.org, linux390@de.ibm.com, linuxsh-dev@lists.sourceforge.net, linuxsh-shmedia-dev@lists.sourceforge.net, sparclinux@vger.kernel.org, ultralinux@vger.kernel.org, Miles Bader , Andi Kleen , Chris Zankel , Akinobu Mita Subject: [patch 10/44] generic fls64() Content-Disposition: inline; filename=fls64.patch Return-Path: X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0) X-Orcpt: rfc822;linux-mips@linux-mips.org Original-Recipient: rfc822;linux-mips@linux-mips.org X-archive-position: 10269 X-ecartis-version: Ecartis v1.0.0 Sender: linux-mips-bounce@linux-mips.org Errors-to: linux-mips-bounce@linux-mips.org X-original-sender: mita@miraclelinux.com Precedence: bulk X-list: linux-mips This patch introduces the C-language equivalent of the function: int fls64(__u64 x); In include/asm-generic/bitops/fls64.h This code largely copied from: include/linux/bitops.h Signed-off-by: Akinobu Mita include/asm-generic/bitops/fls64.h | 12 ++++++++++++ 1 files changed, 12 insertions(+) Index: 2.6-git/include/asm-generic/bitops/fls64.h =================================================================== --- /dev/null +++ 2.6-git/include/asm-generic/bitops/fls64.h @@ -0,0 +1,12 @@ +#ifndef _ASM_GENERIC_BITOPS_FLS64_H_ +#define _ASM_GENERIC_BITOPS_FLS64_H_ + +static inline int fls64(__u64 x) +{ + __u32 h = x >> 32; + if (h) + return fls(x) + 32; + return fls(x); +} + +#endif /* _ASM_GENERIC_BITOPS_FLS64_H_ */ -- From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail01.miraclelinux.com (ns.miraclelinux.com [219.118.163.66]) by ozlabs.org (Postfix) with ESMTP id 0BCBA68A21 for ; Wed, 1 Feb 2006 20:03:26 +1100 (EST) Message-Id: <20060201090323.294297000@localhost.localdomain> References: <20060201090224.536581000@localhost.localdomain> Date: Wed, 01 Feb 2006 18:02:34 +0900 From: Akinobu Mita To: linux-kernel@vger.kernel.org Subject: [patch 10/44] generic fls64() Cc: linux-mips@linux-mips.org, linux-ia64@vger.kernel.org, Ian Molton , David Howells , linuxppc-dev@ozlabs.org, Greg Ungerer , sparclinux@vger.kernel.org, Miles Bader , Linus Torvalds , Yoshinori Sato , Hirokazu Takata , linuxsh-shmedia-dev@lists.sourceforge.net, linux-m68k@lists.linux-m68k.org, Ivan Kokshaysky , Richard Henderson , Akinobu Mita , Chris Zankel , dev-etrax@axis.com, ultralinux@vger.kernel.org, Andi Kleen , linuxsh-dev@lists.sourceforge.net, linux390@de.ibm.com, Russell King , parisc-linux@parisc-linux.org List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , This patch introduces the C-language equivalent of the function: int fls64(__u64 x); In include/asm-generic/bitops/fls64.h This code largely copied from: include/linux/bitops.h Signed-off-by: Akinobu Mita include/asm-generic/bitops/fls64.h | 12 ++++++++++++ 1 files changed, 12 insertions(+) Index: 2.6-git/include/asm-generic/bitops/fls64.h =================================================================== --- /dev/null +++ 2.6-git/include/asm-generic/bitops/fls64.h @@ -0,0 +1,12 @@ +#ifndef _ASM_GENERIC_BITOPS_FLS64_H_ +#define _ASM_GENERIC_BITOPS_FLS64_H_ + +static inline int fls64(__u64 x) +{ + __u32 h = x >> 32; + if (h) + return fls(x) + 32; + return fls(x); +} + +#endif /* _ASM_GENERIC_BITOPS_FLS64_H_ */ -- From mboxrd@z Thu Jan 1 00:00:00 1970 From: Akinobu Mita Date: Wed, 01 Feb 2006 09:02:34 +0000 Subject: [patch 10/44] generic fls64() Message-Id: <20060201090323.294297000@localhost.localdomain> List-Id: References: <20060201090224.536581000@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-kernel@vger.kernel.org Cc: Richard Henderson , Ivan Kokshaysky , Russell King , Ian Molton , dev-etrax@axis.com, David Howells , Yoshinori Sato , Linus Torvalds , linux-ia64@vger.kernel.org, Hirokazu Takata , linux-m68k@lists.linux-m68k.org, Greg Ungerer , linux-mips@linux-mips.org, parisc-linux@parisc-linux.org, linuxppc-dev@ozlabs.org, linux390@de.ibm.com, linuxsh-dev@lists.sourceforge.net, linuxsh-shmedia-dev@lists.sourceforge.net, sparclinux@vger.kernel.org, ultralinux@vger.kernel.org, Miles Bader , Andi Kleen , Chris Zankel , Akinobu Mita This patch introduces the C-language equivalent of the function: int fls64(__u64 x); In include/asm-generic/bitops/fls64.h This code largely copied from: include/linux/bitops.h Signed-off-by: Akinobu Mita include/asm-generic/bitops/fls64.h | 12 ++++++++++++ 1 files changed, 12 insertions(+) Index: 2.6-git/include/asm-generic/bitops/fls64.h =================================--- /dev/null +++ 2.6-git/include/asm-generic/bitops/fls64.h @@ -0,0 +1,12 @@ +#ifndef _ASM_GENERIC_BITOPS_FLS64_H_ +#define _ASM_GENERIC_BITOPS_FLS64_H_ + +static inline int fls64(__u64 x) +{ + __u32 h = x >> 32; + if (h) + return fls(x) + 32; + return fls(x); +} + +#endif /* _ASM_GENERIC_BITOPS_FLS64_H_ */ -- From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932341AbWBAJYz (ORCPT ); Wed, 1 Feb 2006 04:24:55 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S932425AbWBAJT7 (ORCPT ); Wed, 1 Feb 2006 04:19:59 -0500 Received: from ns.miraclelinux.com ([219.118.163.66]:20810 "EHLO mail01.miraclelinux.com") by vger.kernel.org with ESMTP id S932186AbWBAJD0 (ORCPT ); Wed, 1 Feb 2006 04:03:26 -0500 Message-Id: <20060201090323.294297000@localhost.localdomain> References: <20060201090224.536581000@localhost.localdomain> Date: Wed, 01 Feb 2006 18:02:34 +0900 From: Akinobu Mita To: linux-kernel@vger.kernel.org Cc: Richard Henderson , Ivan Kokshaysky , Russell King , Ian Molton , dev-etrax@axis.com, David Howells , Yoshinori Sato , Linus Torvalds , linux-ia64@vger.kernel.org, Hirokazu Takata , linux-m68k@vger.kernel.org, Greg Ungerer , linux-mips@linux-mips.org, parisc-linux@parisc-linux.org, linuxppc-dev@ozlabs.org, linux390@de.ibm.com, linuxsh-dev@lists.sourceforge.net, linuxsh-shmedia-dev@lists.sourceforge.net, sparclinux@vger.kernel.org, ultralinux@vger.kernel.org, Miles Bader , Andi Kleen , Chris Zankel , Akinobu Mita Subject: [patch 10/44] generic fls64() Content-Disposition: inline; filename=fls64.patch Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org This patch introduces the C-language equivalent of the function: int fls64(__u64 x); In include/asm-generic/bitops/fls64.h This code largely copied from: include/linux/bitops.h Signed-off-by: Akinobu Mita include/asm-generic/bitops/fls64.h | 12 ++++++++++++ 1 files changed, 12 insertions(+) Index: 2.6-git/include/asm-generic/bitops/fls64.h =================================================================== --- /dev/null +++ 2.6-git/include/asm-generic/bitops/fls64.h @@ -0,0 +1,12 @@ +#ifndef _ASM_GENERIC_BITOPS_FLS64_H_ +#define _ASM_GENERIC_BITOPS_FLS64_H_ + +static inline int fls64(__u64 x) +{ + __u32 h = x >> 32; + if (h) + return fls(x) + 32; + return fls(x); +} + +#endif /* _ASM_GENERIC_BITOPS_FLS64_H_ */ --