Move BITS_PER_LONG define to arch
authorJens Axboe <jens.axboe@oracle.com>
Wed, 4 Nov 2009 12:56:13 +0000 (13:56 +0100)
committerJens Axboe <jens.axboe@oracle.com>
Wed, 4 Nov 2009 12:56:13 +0000 (13:56 +0100)
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
arch/arch.h
hash.h

index 87db222efa8c2c7f721739fcc581f7571314fb28..c4c0ef7f7d945eeff53be00e6fc9dcc9338d6b66 100644 (file)
@@ -1,6 +1,8 @@
 #ifndef ARCH_H
 #define ARCH_H
 
+#define BITS_PER_LONG  __WORDSIZE
+
 enum {
        arch_x86_64,
        arch_i386,
diff --git a/hash.h b/hash.h
index 3e7854b12615e354ca4e518443833d187f0d91b1..73f961b73ac77975bd7a86eb8c7b49d995e05408 100644 (file)
--- a/hash.h
+++ b/hash.h
@@ -1,5 +1,8 @@
 #ifndef _LINUX_HASH_H
 #define _LINUX_HASH_H
+
+#include "arch/arch.h"
+
 /* Fast hashing routine for a long.
    (C) 2002 William Lee Irwin III, IBM */
 
  * machines where multiplications are slow.
  */
 
-#ifdef __WORDSIZE
-#define BITS_PER_LONG  __WORDSIZE
-#else
-#define BITS_PER_LONG  32
-#endif
-
 #if BITS_PER_LONG == 32
 /* 2^31 + 2^29 - 2^25 + 2^22 - 2^19 - 2^16 + 1 */
 #define GOLDEN_RATIO_PRIME 0x9e370001UL