Skip to content

Commit

Permalink
consolidate asm/const.h to linux/const.h
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Randy Dunlap authored and Linus Torvalds committed May 8, 2007
1 parent 8e39c93 commit 6df95fd
Show file tree
Hide file tree
Showing 13 changed files with 13 additions and 34 deletions.
1 change: 0 additions & 1 deletion include/asm-sparc64/Kbuild
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
19 changes: 0 additions & 19 deletions include/asm-sparc64/const.h

This file was deleted.

2 changes: 1 addition & 1 deletion include/asm-sparc64/lsu.h
Original file line number Diff line number Diff line change
Expand Up @@ -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*/
Expand Down
2 changes: 1 addition & 1 deletion include/asm-sparc64/mmu.h
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion include/asm-sparc64/page.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion include/asm-sparc64/pgtable.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@
#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.
Expand Down
2 changes: 1 addition & 1 deletion include/asm-sparc64/pstate.h
Original file line number Diff line number Diff line change
Expand Up @@ -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).
*
Expand Down
2 changes: 1 addition & 1 deletion include/asm-sparc64/sfafsr.h
Original file line number Diff line number Diff line change
@@ -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 */

Expand Down
1 change: 0 additions & 1 deletion include/asm-x86_64/Kbuild
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,3 @@ unifdef-y += mce.h
unifdef-y += msr.h
unifdef-y += mtrr.h
unifdef-y += vsyscall.h
unifdef-y += const.h
2 changes: 1 addition & 1 deletion include/asm-x86_64/page.h
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion include/asm-x86_64/pgtable.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#ifndef _X86_64_PGTABLE_H
#define _X86_64_PGTABLE_H

#include <asm/const.h>
#include <linux/const.h>
#ifndef __ASSEMBLY__

/*
Expand Down
1 change: 1 addition & 0 deletions include/linux/Kbuild
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 4 additions & 5 deletions include/asm-x86_64/const.h → include/linux/const.h
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
/* const.h: Macros for dealing with constants. */

#ifndef _X86_64_CONST_H
#define _X86_64_CONST_H
#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 specificers unilaterally. We
* 'UL' and other type specifiers unilaterally. We
* use the following macros to deal with this.
*/

Expand All @@ -16,5 +16,4 @@
#define _AC(X,Y) __AC(X,Y)
#endif


#endif /* !(_X86_64_CONST_H) */
#endif /* !(_LINUX_CONST_H) */

0 comments on commit 6df95fd

Please sign in to comment.