consolidate asm/const.h to linux/const.h
authorRandy Dunlap <randy.dunlap@oracle.com>
Tue, 8 May 2007 07:31:11 +0000 (00:31 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Tue, 8 May 2007 18:15:13 +0000 (11:15 -0700)
Make a global linux/const.h header file instead of having multiple,
per-arch files, and convert current users of asm/const.h to use
linux/const.h.

Built on x86_64 and sparc64.

[akpm@linux-foundation.org: fix include/asm-x86_64/Kbuild]
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Cc: Andi Kleen <ak@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 files changed:
include/asm-sparc64/Kbuild
include/asm-sparc64/const.h [deleted file]
include/asm-sparc64/lsu.h
include/asm-sparc64/mmu.h
include/asm-sparc64/page.h
include/asm-sparc64/pgtable.h
include/asm-sparc64/pstate.h
include/asm-sparc64/sfafsr.h
include/asm-x86_64/Kbuild
include/asm-x86_64/const.h [deleted file]
include/asm-x86_64/page.h
include/asm-x86_64/pgtable.h
include/linux/Kbuild
include/linux/const.h [new file with mode: 0644]

index a7f44408c93bf91ddda8c2d76a57386ed3378e32..854fd3a65acfbfa002aeeae6cc1fef4f7952c284 100644 (file)
@@ -8,7 +8,6 @@ header-y += apb.h
 header-y += asi.h
 header-y += bbc.h
 header-y += bpp.h
-header-y += const.h
 header-y += display7seg.h
 header-y += envctrl.h
 header-y += ipc.h
diff --git a/include/asm-sparc64/const.h b/include/asm-sparc64/const.h
deleted file mode 100644 (file)
index 8ad902b..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-/* const.h: Macros for dealing with constants.  */
-
-#ifndef _SPARC64_CONST_H
-#define _SPARC64_CONST_H
-
-/* Some constant macros are used in both assembler and
- * C code.  Therefore we cannot annotate them always with
- * 'UL' and other type specificers unilaterally.  We
- * use the following macros to deal with this.
- */
-
-#ifdef __ASSEMBLY__
-#define _AC(X,Y)       X
-#else
-#define _AC(X,Y)       (X##Y)
-#endif
-
-
-#endif /* !(_SPARC64_CONST_H) */
index e5329c7f5833365d7c59fe29f65ca8d3bd9570e6..79f109840c398dfda74d18d75a2ea1aacffa3c15 100644 (file)
@@ -2,7 +2,7 @@
 #ifndef _SPARC64_LSU_H
 #define _SPARC64_LSU_H
 
-#include <asm/const.h>
+#include <linux/const.h>
 
 /* LSU Control Register */
 #define LSU_CONTROL_PM _AC(0x000001fe00000000,UL) /* Phys-watchpoint byte mask*/
index 70af4b6ce136910caa4b72a3aefd43ba56f46705..8abc58f0f9d707b0f79d438b2c238643843539e5 100644 (file)
@@ -1,8 +1,8 @@
 #ifndef __MMU_H
 #define __MMU_H
 
+#include <linux/const.h>
 #include <asm/page.h>
-#include <asm/const.h>
 #include <asm/hypervisor.h>
 
 #define CTX_NR_BITS            13
index ff736eafa64d2ecf31576f631b10778582cffde9..7af1077451ffb9d9fd80daf9086109a4ee039482 100644 (file)
@@ -5,7 +5,7 @@
 
 #ifdef __KERNEL__
 
-#include <asm/const.h>
+#include <linux/const.h>
 
 #if defined(CONFIG_SPARC64_PAGE_SIZE_8KB)
 #define PAGE_SHIFT   13
index 46705ef47d275fc39dff579129107ba9d638e1e0..9e80ad43b29ccc004cbf952497f5d91711e4ddf1 100644 (file)
 #include <asm-generic/pgtable-nopud.h>
 
 #include <linux/compiler.h>
+#include <linux/const.h>
 #include <asm/types.h>
 #include <asm/spitfire.h>
 #include <asm/asi.h>
 #include <asm/system.h>
 #include <asm/page.h>
 #include <asm/processor.h>
-#include <asm/const.h>
 
 /* The kernel image occupies 0x4000000 to 0x1000000 (4MB --> 32MB).
  * The page copy blockops can use 0x2000000 to 0x4000000.
index 49a7924a89abecb0058345c0e83746dc520cd720..f3c45484c63635fef86342942d715ce83ea25c16 100644 (file)
@@ -2,7 +2,7 @@
 #ifndef _SPARC64_PSTATE_H
 #define _SPARC64_PSTATE_H
 
-#include <asm/const.h>
+#include <linux/const.h>
 
 /* The V9 PSTATE Register (with SpitFire extensions).
  *
index 2f792c20b53c3124ecf4df43c0b4f21e26abb517..e96137b04a4f6ef75c29ef567acabd1d02101a57 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef _SPARC64_SFAFSR_H
 #define _SPARC64_SFAFSR_H
 
-#include <asm/const.h>
+#include <linux/const.h>
 
 /* Spitfire Asynchronous Fault Status register, ASI=0x4C VA<63:0>=0x0 */
 
index 89ad1fc27c8b660f5a1fb022a571ad9868c2bcc8..75a2deffca6808437c4b7c1ec5e08e51a4957a26 100644 (file)
@@ -19,4 +19,3 @@ unifdef-y += mce.h
 unifdef-y += msr.h
 unifdef-y += mtrr.h
 unifdef-y += vsyscall.h
-unifdef-y += const.h
diff --git a/include/asm-x86_64/const.h b/include/asm-x86_64/const.h
deleted file mode 100644 (file)
index 54fb08f..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-/* const.h: Macros for dealing with constants.  */
-
-#ifndef _X86_64_CONST_H
-#define _X86_64_CONST_H
-
-/* Some constant macros are used in both assembler and
- * C code.  Therefore we cannot annotate them always with
- * 'UL' and other type specificers unilaterally.  We
- * use the following macros to deal with this.
- */
-
-#ifdef __ASSEMBLY__
-#define _AC(X,Y)       X
-#else
-#define __AC(X,Y)      (X##Y)
-#define _AC(X,Y)       __AC(X,Y)
-#endif
-
-
-#endif /* !(_X86_64_CONST_H) */
index 4d04e2479569e64963f27f4bf5d2f44fe186238b..d7b101bb4a5f2971c7910c6eb38880234ca958b6 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef _X86_64_PAGE_H
 #define _X86_64_PAGE_H
 
-#include <asm/const.h>
+#include <linux/const.h>
 
 /* PAGE_SHIFT determines the page size */
 #define PAGE_SHIFT     12
index b21083891ce8695446cbe068dde04e06b27ed15e..4e86aca57aeaa20768c578d134cdda97210b917c 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef _X86_64_PGTABLE_H
 #define _X86_64_PGTABLE_H
 
-#include <asm/const.h>
+#include <linux/const.h>
 #ifndef __ASSEMBLY__
 
 /*
index 2c2b6fc91e303ee9fb1f53c65e5261c0dd7f2e44..d61983db4149e135da3918419c1ad1d74edef6ba 100644 (file)
@@ -45,6 +45,7 @@ header-y += coda_psdev.h
 header-y += coff.h
 header-y += comstats.h
 header-y += consolemap.h
+header-y += const.h
 header-y += cycx_cfm.h
 header-y += dlm_device.h
 header-y += dm-ioctl.h
diff --git a/include/linux/const.h b/include/linux/const.h
new file mode 100644 (file)
index 0000000..07b300b
--- /dev/null
@@ -0,0 +1,19 @@
+/* const.h: Macros for dealing with constants.  */
+
+#ifndef _LINUX_CONST_H
+#define _LINUX_CONST_H
+
+/* Some constant macros are used in both assembler and
+ * C code.  Therefore we cannot annotate them always with
+ * 'UL' and other type specifiers unilaterally.  We
+ * use the following macros to deal with this.
+ */
+
+#ifdef __ASSEMBLY__
+#define _AC(X,Y)       X
+#else
+#define __AC(X,Y)      (X##Y)
+#define _AC(X,Y)       __AC(X,Y)
+#endif
+
+#endif /* !(_LINUX_CONST_H) */