Home | History | Annotate | Download | only in linux

Lines Matching refs:bits

27 #define hash_long(val, bits) hash_32(val, bits)
29 #define hash_long(val, bits) hash_64(val, bits)
35 static __always_inline u64 hash_64(u64 val, unsigned int bits)
39 /* Sigh, gcc can't optimise this alone like it does for 32 bits. */
54 /* High bits are more random, so use them. */
55 return hash >> (64 - bits);
58 static inline u32 hash_32(u32 val, unsigned int bits)
63 /* High bits are more random, so use them. */
64 return hash >> (32 - bits);
67 static inline unsigned long hash_ptr(const void *ptr, unsigned int bits)
69 return hash_long((unsigned long)ptr, bits);