aboutsummaryrefslogtreecommitdiff
path: root/include/asm-i386
diff options
context:
space:
mode:
authorSimon Kagstrom <simon.kagstrom@netinsight.net>2009-08-24 09:10:12 +0200
committerWolfgang Denk <wd@denx.de>2009-09-15 22:34:32 +0200
commit52d61227b66d4099b39c8309ab37cb67ee09a405 (patch)
tree0c5562920f48672d38baf05dd744118a4a8f2e69 /include/asm-i386
parent4b15de08fe4d2c9d12a3764394731018a763216b (diff)
downloadu-boot-52d61227b66d4099b39c8309ab37cb67ee09a405.zip
u-boot-52d61227b66d4099b39c8309ab37cb67ee09a405.tar.gz
u-boot-52d61227b66d4099b39c8309ab37cb67ee09a405.tar.bz2
Define ffs/fls for all architectures
UBIFS requires fls(), which is not defined for arm (and some other architectures) and this patch adds it. The implementation is taken from Linux and is generic. ffs() is also defined for those that miss it. Signed-off-by: Simon Kagstrom <simon.kagstrom@netinsight.net>
Diffstat (limited to 'include/asm-i386')
-rw-r--r--include/asm-i386/bitops.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/asm-i386/bitops.h b/include/asm-i386/bitops.h
index b768e20..ac6285a 100644
--- a/include/asm-i386/bitops.h
+++ b/include/asm-i386/bitops.h
@@ -349,6 +349,7 @@ static __inline__ int ffs(int x)
"1:" : "=r" (r) : "g" (x));
return r+1;
}
+#define ffs
/**
* hweightN - returns the hamming weight of a N-bit word