ddk: 3.19-rc1

git-svn-id: svn://kolibrios.org@5270 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Sergey Semyonov (Serge)
2014-12-27 15:42:08 +00:00
parent bade30c7b8
commit 16bc56fa96
228 changed files with 19878 additions and 3572 deletions

View File

@@ -36,6 +36,9 @@ static __always_inline u64 hash_64(u64 val, unsigned int bits)
{
u64 hash = val;
#if defined(CONFIG_ARCH_HAS_FAST_MULTIPLIER) && BITS_PER_LONG == 64
hash = hash * GOLDEN_RATIO_PRIME_64;
#else
/* Sigh, gcc can't optimise this alone like it does for 32 bits. */
u64 n = hash;
n <<= 18;
@@ -50,6 +53,7 @@ static __always_inline u64 hash_64(u64 val, unsigned int bits)
hash += n;
n <<= 2;
hash += n;
#endif
/* High bits are more random, so use them. */
return hash >> (64 - bits);
@@ -78,4 +82,5 @@ static inline u32 hash32_ptr(const void *ptr)
#endif
return (u32)val;
}
#endif /* _LINUX_HASH_H */