Skip to content

Commit

Permalink
i386/x86_64: move headers to include/asm-x86
Browse files Browse the repository at this point in the history
Move the headers to include/asm-x86 and fixup the
header install make rules

Signed-off-by: Thomas Gleixner <[email protected]>
Signed-off-by: Ingo Molnar <[email protected]>
  • Loading branch information
KAGA-KOKO committed Oct 11, 2007
1 parent 27bd0c9 commit 96a388d
Show file tree
Hide file tree
Showing 556 changed files with 1,035 additions and 182 deletions.
2 changes: 1 addition & 1 deletion Documentation/lguest/lguest.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ typedef uint32_t u32;
typedef uint16_t u16;
typedef uint8_t u8;
#include "../../include/linux/lguest_launcher.h"
#include "../../include/asm-i386/e820.h"
#include "../../include/asm-x86/e820_32.h"
/*:*/

#define PAGE_PRESENT 0x7 /* Present, RW, Execute */
Expand Down
2 changes: 1 addition & 1 deletion Kbuild
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
# 1) Generate asm-offsets.h
#

offsets-file := include/asm-$(ARCH)/asm-offsets.h
offsets-file := include/asm-$(SRCARCH)/asm-offsets.h

always := $(offsets-file)
targets := $(offsets-file)
Expand Down
17 changes: 9 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -863,7 +863,7 @@ ifneq ($(KBUILD_SRC),)
/bin/false; \
fi;
$(Q)if [ ! -d include2 ]; then mkdir -p include2; fi;
$(Q)ln -fsn $(srctree)/include/asm-$(ARCH) include2/asm
$(Q)ln -fsn $(srctree)/include/asm-$(SRCARCH) include2/asm
endif

# prepare2 creates a makefile if using a separate output directory
Expand Down Expand Up @@ -895,9 +895,9 @@ export CPPFLAGS_vmlinux.lds += -P -C -U$(ARCH)
# before switching between archs anyway.

include/asm:
@echo ' SYMLINK $@ -> include/asm-$(ARCH)'
@echo ' SYMLINK $@ -> include/asm-$(SRCARCH)'
$(Q)if [ ! -d include ]; then mkdir -p include; fi;
@ln -fsn asm-$(ARCH) $@
@ln -fsn asm-$(SRCARCH) $@

# Generate some files
# ---------------------------------------------------------------------------
Expand Down Expand Up @@ -937,7 +937,8 @@ depend dep:
INSTALL_HDR_PATH=$(objtree)/usr
export INSTALL_HDR_PATH

HDRARCHES=$(filter-out generic,$(patsubst $(srctree)/include/asm-%/Kbuild,%,$(wildcard $(srctree)/include/asm-*/Kbuild)))
HDRFILTER=generic i386 x86_64
HDRARCHES=$(filter-out $(HDRFILTER),$(patsubst $(srctree)/include/asm-%/Kbuild,%,$(wildcard $(srctree)/include/asm-*/Kbuild)))

PHONY += headers_install_all
headers_install_all: include/linux/version.h scripts_basic FORCE
Expand All @@ -948,11 +949,11 @@ headers_install_all: include/linux/version.h scripts_basic FORCE

PHONY += headers_install
headers_install: include/linux/version.h scripts_basic FORCE
@if [ ! -r $(srctree)/include/asm-$(ARCH)/Kbuild ]; then \
echo '*** Error: Headers not exportable for this architecture ($(ARCH))'; \
@if [ ! -r $(srctree)/include/asm-$(SRCARCH)/Kbuild ]; then \
echo '*** Error: Headers not exportable for this architecture ($(SRCARCH))'; \
exit 1 ; fi
$(Q)$(MAKE) $(build)=scripts scripts/unifdef
$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.headersinst obj=include
$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.headersinst ARCH=$(SRCARCH) obj=include

PHONY += headers_check_all
headers_check_all: headers_install_all
Expand All @@ -962,7 +963,7 @@ headers_check_all: headers_install_all

PHONY += headers_check
headers_check: headers_install
$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.headersinst obj=include HDRCHECK=1
$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.headersinst ARCH=$(SRCARCH) obj=include HDRCHECK=1

# ---------------------------------------------------------------------------
# Modules
Expand Down
16 changes: 8 additions & 8 deletions arch/i386/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -71,40 +71,40 @@ CFLAGS += $(cflags-y)
mcore-y := arch/x86/mach-default

# Voyager subarch support
mflags-$(CONFIG_X86_VOYAGER) := -Iinclude/asm-i386/mach-voyager
mflags-$(CONFIG_X86_VOYAGER) := -Iinclude/asm-x86/mach-voyager
mcore-$(CONFIG_X86_VOYAGER) := arch/x86/mach-voyager

# VISWS subarch support
mflags-$(CONFIG_X86_VISWS) := -Iinclude/asm-i386/mach-visws
mflags-$(CONFIG_X86_VISWS) := -Iinclude/asm-x86/mach-visws
mcore-$(CONFIG_X86_VISWS) := arch/x86/mach-visws

# NUMAQ subarch support
mflags-$(CONFIG_X86_NUMAQ) := -Iinclude/asm-i386/mach-numaq
mflags-$(CONFIG_X86_NUMAQ) := -Iinclude/asm-x86/mach-numaq
mcore-$(CONFIG_X86_NUMAQ) := arch/x86/mach-default

# BIGSMP subarch support
mflags-$(CONFIG_X86_BIGSMP) := -Iinclude/asm-i386/mach-bigsmp
mflags-$(CONFIG_X86_BIGSMP) := -Iinclude/asm-x86/mach-bigsmp
mcore-$(CONFIG_X86_BIGSMP) := arch/x86/mach-default

#Summit subarch support
mflags-$(CONFIG_X86_SUMMIT) := -Iinclude/asm-i386/mach-summit
mflags-$(CONFIG_X86_SUMMIT) := -Iinclude/asm-x86/mach-summit
mcore-$(CONFIG_X86_SUMMIT) := arch/x86/mach-default

# generic subarchitecture
mflags-$(CONFIG_X86_GENERICARCH) := -Iinclude/asm-i386/mach-generic
mflags-$(CONFIG_X86_GENERICARCH) := -Iinclude/asm-x86/mach-generic
mcore-$(CONFIG_X86_GENERICARCH) := arch/x86/mach-default
core-$(CONFIG_X86_GENERICARCH) += arch/x86/mach-generic/

# ES7000 subarch support
mflags-$(CONFIG_X86_ES7000) := -Iinclude/asm-i386/mach-es7000
mflags-$(CONFIG_X86_ES7000) := -Iinclude/asm-x86/mach-es7000
mcore-$(CONFIG_X86_ES7000) := arch/x86/mach-default
core-$(CONFIG_X86_ES7000) := arch/x86/mach-es7000/

# Xen paravirtualization support
core-$(CONFIG_XEN) += arch/x86/xen/

# default subarch .h files
mflags-y += -Iinclude/asm-i386/mach-default
mflags-y += -Iinclude/asm-x86/mach-default

head-y := arch/x86/kernel/head_32.o arch/x86/kernel/init_task_32.o

Expand Down
2 changes: 1 addition & 1 deletion arch/ia64/ia32/audit.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include <asm-i386/unistd.h>
#include <asm-x86/unistd_32.h>

unsigned ia32_dir_class[] = {
#include <asm-generic/audit_dir_write.h>
Expand Down
4 changes: 2 additions & 2 deletions arch/um/sys-x86_64/syscall_table.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@

#define __SYSCALL(nr, sym) extern asmlinkage void sym(void) ;
#undef _ASM_X86_64_UNISTD_H_
#include <asm-x86_64/unistd.h>
#include <asm-x86/unistd_64.h>

#undef __SYSCALL
#define __SYSCALL(nr, sym) [ nr ] = sym,
Expand All @@ -49,5 +49,5 @@ extern void sys_ni_syscall(void);
sys_call_ptr_t sys_call_table[UM_NR_syscall_max+1] __cacheline_aligned = {
/* Smells like a like a compiler bug -- it doesn't work when the & below is removed. */
[0 ... UM_NR_syscall_max] = &sys_ni_syscall,
#include <asm-x86_64/unistd.h>
#include <asm-x86/unistd_64.h>
};
2 changes: 1 addition & 1 deletion arch/x86/ia32/audit.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include <asm-i386/unistd.h>
#include <asm/unistd_32.h>

unsigned ia32_dir_class[] = {
#include <asm-generic/audit_dir_write.h>
Expand Down
2 changes: 1 addition & 1 deletion arch/x86/ia32/ipc32.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#include <linux/ipc.h>
#include <linux/compat.h>

#include <asm-i386/ipc.h>
#include <asm/ipc.h>

asmlinkage long
sys32_ipc(u32 call, int first, int second, int third,
Expand Down
2 changes: 1 addition & 1 deletion arch/x86/kernel/cpu/mtrr/state.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include <asm/io.h>
#include <asm/mtrr.h>
#include <asm/msr.h>
#include <asm-i386/processor-cyrix.h>
#include <asm/processor-cyrix.h>
#include "mtrr.h"


Expand Down
4 changes: 2 additions & 2 deletions arch/x86/kernel/syscall_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

#define __SYSCALL(nr, sym) extern asmlinkage void sym(void) ;
#undef _ASM_X86_64_UNISTD_H_
#include <asm-x86_64/unistd.h>
#include <asm/unistd_64.h>

#undef __SYSCALL
#define __SYSCALL(nr, sym) [ nr ] = sym,
Expand All @@ -22,5 +22,5 @@ extern void sys_ni_syscall(void);
const sys_call_ptr_t sys_call_table[__NR_syscall_max+1] = {
/* Smells like a like a compiler bug -- it doesn't work when the & below is removed. */
[0 ... __NR_syscall_max] = &sys_ni_syscall,
#include <asm-x86_64/unistd.h>
#include <asm/unistd_64.h>
};
12 changes: 0 additions & 12 deletions include/asm-i386/Kbuild

This file was deleted.

1 change: 0 additions & 1 deletion include/asm-i386/k8.h

This file was deleted.

1 change: 0 additions & 1 deletion include/asm-i386/pci-direct.h

This file was deleted.

1 change: 0 additions & 1 deletion include/asm-i386/stacktrace.h

This file was deleted.

2 changes: 1 addition & 1 deletion include/asm-sh/mpc1211/mc146818rtc.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* MPC1211 uses PC/AT style RTC definitions.
*/
#include <asm-i386/mc146818rtc.h>
#include <asm-x86/mc146818rtc_32.h>


5 changes: 5 additions & 0 deletions include/asm-x86/8253pit.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#ifdef CONFIG_X86_32
# include "8253pit_32.h"
#else
# include "8253pit_64.h"
#endif
File renamed without changes.
File renamed without changes.
88 changes: 88 additions & 0 deletions include/asm-x86/Kbuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
include include/asm-generic/Kbuild.asm

header-y += boot.h
header-y += bootsetup.h
header-y += debugreg_32.h
header-y += debugreg_64.h
header-y += debugreg.h
header-y += ldt_32.h
header-y += ldt_64.h
header-y += ldt.h
header-y += msr-index.h
header-y += prctl.h
header-y += ptrace-abi_32.h
header-y += ptrace-abi_64.h
header-y += ptrace-abi.h
header-y += sigcontext32.h
header-y += ucontext_32.h
header-y += ucontext_64.h
header-y += ucontext.h
header-y += vsyscall32.h

unifdef-y += a.out_32.h
unifdef-y += a.out_64.h
unifdef-y += auxvec_32.h
unifdef-y += auxvec_64.h
unifdef-y += byteorder_32.h
unifdef-y += byteorder_64.h
unifdef-y += elf_32.h
unifdef-y += elf_64.h
unifdef-y += errno_32.h
unifdef-y += errno_64.h
unifdef-y += ioctls_32.h
unifdef-y += ioctls_64.h
unifdef-y += ipcbuf_32.h
unifdef-y += ipcbuf_64.h
unifdef-y += mce.h
unifdef-y += mman_32.h
unifdef-y += mman_64.h
unifdef-y += msgbuf_32.h
unifdef-y += msgbuf_64.h
unifdef-y += msr_32.h
unifdef-y += msr_64.h
unifdef-y += msr.h
unifdef-y += mtrr_32.h
unifdef-y += mtrr_64.h
unifdef-y += mtrr.h
unifdef-y += page_32.h
unifdef-y += page_64.h
unifdef-y += param_32.h
unifdef-y += param_64.h
unifdef-y += posix_types_32.h
unifdef-y += posix_types_64.h
unifdef-y += ptrace_32.h
unifdef-y += ptrace_64.h
unifdef-y += resource_32.h
unifdef-y += resource_64.h
unifdef-y += sembuf_32.h
unifdef-y += sembuf_64.h
unifdef-y += setup_32.h
unifdef-y += setup_64.h
unifdef-y += shmbuf_32.h
unifdef-y += shmbuf_64.h
unifdef-y += shmparam_32.h
unifdef-y += shmparam_64.h
unifdef-y += sigcontext_32.h
unifdef-y += sigcontext_64.h
unifdef-y += siginfo_32.h
unifdef-y += siginfo_64.h
unifdef-y += signal_32.h
unifdef-y += signal_64.h
unifdef-y += sockios_32.h
unifdef-y += sockios_64.h
unifdef-y += stat_32.h
unifdef-y += stat_64.h
unifdef-y += statfs_32.h
unifdef-y += statfs_64.h
unifdef-y += termbits_32.h
unifdef-y += termbits_64.h
unifdef-y += termios_32.h
unifdef-y += termios_64.h
unifdef-y += types_32.h
unifdef-y += types_64.h
unifdef-y += unistd_32.h
unifdef-y += unistd_64.h
unifdef-y += user_32.h
unifdef-y += user_64.h
unifdef-y += vm86.h
unifdef-y += vsyscall.h
13 changes: 13 additions & 0 deletions include/asm-x86/a.out.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#ifdef __KERNEL__
# ifdef CONFIG_X86_32
# include "a.out_32.h"
# else
# include "a.out_64.h"
# endif
#else
# ifdef __i386__
# include "a.out_32.h"
# else
# include "a.out_64.h"
# endif
#endif
File renamed without changes.
File renamed without changes.
5 changes: 5 additions & 0 deletions include/asm-x86/acpi.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#ifdef CONFIG_X86_32
# include "acpi_32.h"
#else
# include "acpi_64.h"
#endif
File renamed without changes.
File renamed without changes.
5 changes: 5 additions & 0 deletions include/asm-x86/agp.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#ifdef CONFIG_X86_32
# include "agp_32.h"
#else
# include "agp_64.h"
#endif
File renamed without changes.
File renamed without changes.
5 changes: 5 additions & 0 deletions include/asm-x86/alternative-asm.i
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#ifdef CONFIG_X86_32
# include "alternative-asm_32.i"
#else
# include "alternative-asm_64.i"
#endif
File renamed without changes.
File renamed without changes.
5 changes: 5 additions & 0 deletions include/asm-x86/alternative.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#ifdef CONFIG_X86_32
# include "alternative_32.h"
#else
# include "alternative_64.h"
#endif
File renamed without changes.
File renamed without changes.
5 changes: 5 additions & 0 deletions include/asm-x86/apic.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#ifdef CONFIG_X86_32
# include "apic_32.h"
#else
# include "apic_64.h"
#endif
File renamed without changes.
File renamed without changes.
5 changes: 5 additions & 0 deletions include/asm-x86/apicdef.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#ifdef CONFIG_X86_32
# include "apicdef_32.h"
#else
# include "apicdef_64.h"
#endif
File renamed without changes.
File renamed without changes.
File renamed without changes.
5 changes: 5 additions & 0 deletions include/asm-x86/atomic.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#ifdef CONFIG_X86_32
# include "atomic_32.h"
#else
# include "atomic_64.h"
#endif
File renamed without changes.
File renamed without changes.
13 changes: 13 additions & 0 deletions include/asm-x86/auxvec.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#ifdef __KERNEL__
# ifdef CONFIG_X86_32
# include "auxvec_32.h"
# else
# include "auxvec_64.h"
# endif
#else
# ifdef __i386__
# include "auxvec_32.h"
# else
# include "auxvec_64.h"
# endif
#endif
File renamed without changes.
File renamed without changes.
5 changes: 5 additions & 0 deletions include/asm-x86/bitops.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#ifdef CONFIG_X86_32
# include "bitops_32.h"
#else
# include "bitops_64.h"
#endif
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
5 changes: 5 additions & 0 deletions include/asm-x86/bug.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#ifdef CONFIG_X86_32
# include "bug_32.h"
#else
# include "bug_64.h"
#endif
File renamed without changes.
File renamed without changes.
5 changes: 5 additions & 0 deletions include/asm-x86/bugs.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#ifdef CONFIG_X86_32
# include "bugs_32.h"
#else
# include "bugs_64.h"
#endif
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit 96a388d

Please sign in to comment.