Lines Matching refs:bits
30 #define hash_long(val, bits) hash_32(val, bits)
32 #define hash_long(val, bits) hash_64(val, bits)
38 static inline u64 hash_64(u64 val, unsigned int bits)
42 /* Sigh, gcc can't optimise this alone like it does for 32 bits. */
57 /* High bits are more random, so use them. */
58 return hash >> (64 - bits);
61 static inline u32 hash_32(u32 val, unsigned int bits)
66 /* High bits are more random, so use them. */
67 return hash >> (32 - bits);
70 static inline unsigned long hash_ptr(void *ptr, unsigned int bits)
72 return hash_long((unsigned long)ptr, bits);