aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-26 16:49:29 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-26 16:49:29 -0400
commit0e4bd10c9b7e9ed65132f5935328275deb760384 (patch)
treeff5bd68ba7d6eb960fe2f818aa7e30d542c954a4
parentec3b67c11df42362ccda81261d62829042f223f0 (diff)
parent208652d6b2cb9d7155ca8ff8691c8ef88c8250af (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/sam/x86
* git://git.kernel.org/pub/scm/linux/kernel/git/sam/x86: x86: kill the old i386 and x86_64 directories x86: move i386 and x86_64 Kconfig files to x86 directory kconfig: small code refactoring in kconfig Makefile x86: unification of i386 and x86_64 Kconfig.debug x86: move defconfig files for i386 and x86_64 to x86 x86: move i386 and x86_64 Makefiles to arch/x86
-rw-r--r--Makefile7
-rw-r--r--arch/i386/.gitignore1
-rw-r--r--arch/x86/Kconfig.cpu (renamed from arch/i386/Kconfig.cpu)0
-rw-r--r--arch/x86/Kconfig.debug (renamed from arch/i386/Kconfig.debug)51
-rw-r--r--arch/x86/Kconfig.i386 (renamed from arch/i386/Kconfig)4
-rw-r--r--arch/x86/Kconfig.x86_64 (renamed from arch/x86_64/Kconfig)2
-rw-r--r--arch/x86/Makefile16
-rw-r--r--arch/x86/Makefile_32 (renamed from arch/i386/Makefile)7
-rw-r--r--arch/x86/Makefile_32.cpu (renamed from arch/i386/Makefile.cpu)0
-rw-r--r--arch/x86/Makefile_64 (renamed from arch/x86_64/Makefile)5
-rw-r--r--arch/x86/configs/i386_defconfig (renamed from arch/i386/defconfig)0
-rw-r--r--arch/x86/configs/x86_64_defconfig (renamed from arch/x86_64/defconfig)0
-rw-r--r--arch/x86_64/.gitignore1
-rw-r--r--arch/x86_64/Kconfig.debug61
-rw-r--r--scripts/kconfig/Makefile35
15 files changed, 89 insertions, 101 deletions
diff --git a/Makefile b/Makefile
index 2a4729024dfb..8816060cdf40 100644
--- a/Makefile
+++ b/Makefile
@@ -196,6 +196,9 @@ CROSS_COMPILE ?=
196UTS_MACHINE := $(ARCH) 196UTS_MACHINE := $(ARCH)
197SRCARCH := $(ARCH) 197SRCARCH := $(ARCH)
198 198
199# for i386 and x86_64 we use SRCARCH equal to x86
200SRCARCH := $(if $(filter x86_64 i386,$(SRCARCH)),x86,$(SRCARCH))
201
199KCONFIG_CONFIG ?= .config 202KCONFIG_CONFIG ?= .config
200 203
201# SHELL used by kbuild 204# SHELL used by kbuild
@@ -418,7 +421,7 @@ ifeq ($(config-targets),1)
418# Read arch specific Makefile to set KBUILD_DEFCONFIG as needed. 421# Read arch specific Makefile to set KBUILD_DEFCONFIG as needed.
419# KBUILD_DEFCONFIG may point out an alternative default configuration 422# KBUILD_DEFCONFIG may point out an alternative default configuration
420# used for 'make defconfig' 423# used for 'make defconfig'
421include $(srctree)/arch/$(ARCH)/Makefile 424include $(srctree)/arch/$(SRCARCH)/Makefile
422export KBUILD_DEFCONFIG 425export KBUILD_DEFCONFIG
423 426
424config %config: scripts_basic outputmakefile FORCE 427config %config: scripts_basic outputmakefile FORCE
@@ -497,7 +500,7 @@ else
497KBUILD_CFLAGS += -O2 500KBUILD_CFLAGS += -O2
498endif 501endif
499 502
500include $(srctree)/arch/$(ARCH)/Makefile 503include $(srctree)/arch/$(SRCARCH)/Makefile
501 504
502ifdef CONFIG_FRAME_POINTER 505ifdef CONFIG_FRAME_POINTER
503KBUILD_CFLAGS += -fno-omit-frame-pointer -fno-optimize-sibling-calls 506KBUILD_CFLAGS += -fno-omit-frame-pointer -fno-optimize-sibling-calls
diff --git a/arch/i386/.gitignore b/arch/i386/.gitignore
deleted file mode 100644
index 36ef4c374d25..000000000000
--- a/arch/i386/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
1boot
diff --git a/arch/i386/Kconfig.cpu b/arch/x86/Kconfig.cpu
index 0e2adadf5905..0e2adadf5905 100644
--- a/arch/i386/Kconfig.cpu
+++ b/arch/x86/Kconfig.cpu
diff --git a/arch/i386/Kconfig.debug b/arch/x86/Kconfig.debug
index f03531eacdfb..970b2defe7df 100644
--- a/arch/i386/Kconfig.debug
+++ b/arch/x86/Kconfig.debug
@@ -1,14 +1,14 @@
1menu "Kernel hacking" 1menu "Kernel hacking"
2 2
3config TRACE_IRQFLAGS_SUPPORT 3config TRACE_IRQFLAGS_SUPPORT
4 bool 4 def_bool y
5 default y
6 5
7source "lib/Kconfig.debug" 6source "lib/Kconfig.debug"
8 7
9config EARLY_PRINTK 8config EARLY_PRINTK
10 bool "Early printk" if EMBEDDED && DEBUG_KERNEL 9 bool "Early printk" if EMBEDDED && DEBUG_KERNEL
11 default y 10 default y
11 depends on X86_32
12 help 12 help
13 Write kernel log output directly into the VGA buffer or to a serial 13 Write kernel log output directly into the VGA buffer or to a serial
14 port. 14 port.
@@ -37,10 +37,12 @@ config DEBUG_STACK_USAGE
37 37
38comment "Page alloc debug is incompatible with Software Suspend on i386" 38comment "Page alloc debug is incompatible with Software Suspend on i386"
39 depends on DEBUG_KERNEL && HIBERNATION 39 depends on DEBUG_KERNEL && HIBERNATION
40 depends on X86_32
40 41
41config DEBUG_PAGEALLOC 42config DEBUG_PAGEALLOC
42 bool "Debug page memory allocations" 43 bool "Debug page memory allocations"
43 depends on DEBUG_KERNEL && !HIBERNATION && !HUGETLBFS 44 depends on DEBUG_KERNEL && !HIBERNATION && !HUGETLBFS
45 depends on X86_32
44 help 46 help
45 Unmap pages from the kernel linear mapping after free_pages(). 47 Unmap pages from the kernel linear mapping after free_pages().
46 This results in a large slowdown, but helps to find certain types 48 This results in a large slowdown, but helps to find certain types
@@ -59,6 +61,7 @@ config DEBUG_RODATA
59config 4KSTACKS 61config 4KSTACKS
60 bool "Use 4Kb for kernel stacks instead of 8Kb" 62 bool "Use 4Kb for kernel stacks instead of 8Kb"
61 depends on DEBUG_KERNEL 63 depends on DEBUG_KERNEL
64 depends on X86_32
62 help 65 help
63 If you say Y here the kernel will use a 4Kb stacksize for the 66 If you say Y here the kernel will use a 4Kb stacksize for the
64 kernel stack attached to each process/thread. This facilitates 67 kernel stack attached to each process/thread. This facilitates
@@ -67,22 +70,50 @@ config 4KSTACKS
67 will also use IRQ stacks to compensate for the reduced stackspace. 70 will also use IRQ stacks to compensate for the reduced stackspace.
68 71
69config X86_FIND_SMP_CONFIG 72config X86_FIND_SMP_CONFIG
70 bool 73 def_bool y
71 depends on X86_LOCAL_APIC || X86_VOYAGER 74 depends on X86_LOCAL_APIC || X86_VOYAGER
72 default y 75 depends on X86_32
73 76
74config X86_MPPARSE 77config X86_MPPARSE
75 bool 78 def_bool y
76 depends on X86_LOCAL_APIC && !X86_VISWS 79 depends on X86_LOCAL_APIC && !X86_VISWS
77 default y 80 depends on X86_32
78 81
79config DOUBLEFAULT 82config DOUBLEFAULT
80 default y 83 default y
81 bool "Enable doublefault exception handler" if EMBEDDED 84 bool "Enable doublefault exception handler" if EMBEDDED
85 depends on X86_32
86 help
87 This option allows trapping of rare doublefault exceptions that
88 would otherwise cause a system to silently reboot. Disabling this
89 option saves about 4k and might cause you much additional grey
90 hair.
91
92config IOMMU_DEBUG
93 bool "Enable IOMMU debugging"
94 depends on IOMMU && DEBUG_KERNEL
95 depends on X86_64
82 help 96 help
83 This option allows trapping of rare doublefault exceptions that 97 Force the IOMMU to on even when you have less than 4GB of
84 would otherwise cause a system to silently reboot. Disabling this 98 memory and add debugging code. On overflow always panic. And
85 option saves about 4k and might cause you much additional grey 99 allow to enable IOMMU leak tracing. Can be disabled at boot
86 hair. 100 time with iommu=noforce. This will also enable scatter gather
101 list merging. Currently not recommended for production
102 code. When you use it make sure you have a big enough
103 IOMMU/AGP aperture. Most of the options enabled by this can
104 be set more finegrained using the iommu= command line
105 options. See Documentation/x86_64/boot-options.txt for more
106 details.
107
108config IOMMU_LEAK
109 bool "IOMMU leak tracing"
110 depends on DEBUG_KERNEL
111 depends on IOMMU_DEBUG
112 help
113 Add a simple leak tracer to the IOMMU code. This is useful when you
114 are debugging a buggy device driver that leaks IOMMU mappings.
115
116#config X86_REMOTE_DEBUG
117# bool "kgdb debugging stub"
87 118
88endmenu 119endmenu
diff --git a/arch/i386/Kconfig b/arch/x86/Kconfig.i386
index b4437ce0f973..7331efe891a7 100644
--- a/arch/i386/Kconfig
+++ b/arch/x86/Kconfig.i386
@@ -287,7 +287,7 @@ config ES7000_CLUSTERED_APIC
287 default y 287 default y
288 depends on SMP && X86_ES7000 && MPENTIUMIII 288 depends on SMP && X86_ES7000 && MPENTIUMIII
289 289
290source "arch/i386/Kconfig.cpu" 290source "arch/x86/Kconfig.cpu"
291 291
292config HPET_TIMER 292config HPET_TIMER
293 bool "HPET Timer Support" 293 bool "HPET Timer Support"
@@ -1272,7 +1272,7 @@ source "fs/Kconfig"
1272 1272
1273source "kernel/Kconfig.instrumentation" 1273source "kernel/Kconfig.instrumentation"
1274 1274
1275source "arch/i386/Kconfig.debug" 1275source "arch/x86/Kconfig.debug"
1276 1276
1277source "security/Kconfig" 1277source "security/Kconfig"
1278 1278
diff --git a/arch/x86_64/Kconfig b/arch/x86/Kconfig.x86_64
index 308970aa5382..e2542e5b536c 100644
--- a/arch/x86_64/Kconfig
+++ b/arch/x86/Kconfig.x86_64
@@ -835,7 +835,7 @@ source fs/Kconfig
835 835
836source "kernel/Kconfig.instrumentation" 836source "kernel/Kconfig.instrumentation"
837 837
838source "arch/x86_64/Kconfig.debug" 838source "arch/x86/Kconfig.debug"
839 839
840source "security/Kconfig" 840source "security/Kconfig"
841 841
diff --git a/arch/x86/Makefile b/arch/x86/Makefile
new file mode 100644
index 000000000000..309597386a77
--- /dev/null
+++ b/arch/x86/Makefile
@@ -0,0 +1,16 @@
1# Unified Makefile for i386 and x86_64
2
3# select defconfig based on actual architecture
4KBUILD_DEFCONFIG := $(ARCH)_defconfig
5
6# # No need to remake these files
7$(srctree)/arch/x86/Makefile%: ;
8
9ifeq ($(ARCH),i386)
10 include $(srctree)/arch/x86/Makefile_32
11else
12 include $(srctree)/arch/x86/Makefile_64
13endif
14
15
16
diff --git a/arch/i386/Makefile b/arch/x86/Makefile_32
index f5b9a37def8b..346ac0766875 100644
--- a/arch/i386/Makefile
+++ b/arch/x86/Makefile_32
@@ -1,5 +1,5 @@
1# 1#
2# i386/Makefile 2# i386 Makefile
3# 3#
4# This file is included by the global makefile so that you can add your own 4# This file is included by the global makefile so that you can add your own
5# architecture-specific flags and dependencies. Remember to do have actions 5# architecture-specific flags and dependencies. Remember to do have actions
@@ -17,9 +17,6 @@
17# 20050320 Kianusch Sayah Karadji <kianusch@sk-tech.net> 17# 20050320 Kianusch Sayah Karadji <kianusch@sk-tech.net>
18# Added support for GEODE CPU 18# Added support for GEODE CPU
19 19
20# Fill in SRCARCH
21SRCARCH := x86
22
23# BITS is used as extension for files which are available in a 32 bit 20# BITS is used as extension for files which are available in a 32 bit
24# and a 64 bit version to simplify shared Makefiles. 21# and a 64 bit version to simplify shared Makefiles.
25# e.g.: obj-y += foo_$(BITS).o 22# e.g.: obj-y += foo_$(BITS).o
@@ -46,7 +43,7 @@ KBUILD_CFLAGS += -pipe -msoft-float -mregparm=3 -freg-struct-return
46KBUILD_CFLAGS += $(call cc-option,-mpreferred-stack-boundary=2) 43KBUILD_CFLAGS += $(call cc-option,-mpreferred-stack-boundary=2)
47 44
48# CPU-specific tuning. Anything which can be shared with UML should go here. 45# CPU-specific tuning. Anything which can be shared with UML should go here.
49include $(srctree)/arch/i386/Makefile.cpu 46include $(srctree)/arch/x86/Makefile_32.cpu
50 47
51# temporary until string.h is fixed 48# temporary until string.h is fixed
52cflags-y += -ffreestanding 49cflags-y += -ffreestanding
diff --git a/arch/i386/Makefile.cpu b/arch/x86/Makefile_32.cpu
index e372b584e919..e372b584e919 100644
--- a/arch/i386/Makefile.cpu
+++ b/arch/x86/Makefile_32.cpu
diff --git a/arch/x86_64/Makefile b/arch/x86/Makefile_64
index 20eb69bd5a6d..57e714a47af7 100644
--- a/arch/x86_64/Makefile
+++ b/arch/x86/Makefile_64
@@ -1,5 +1,5 @@
1# 1#
2# x86_64/Makefile 2# x86_64 Makefile
3# 3#
4# This file is included by the global makefile so that you can add your own 4# This file is included by the global makefile so that you can add your own
5# architecture-specific flags and dependencies. Remember to do have actions 5# architecture-specific flags and dependencies. Remember to do have actions
@@ -21,9 +21,6 @@
21# 21#
22# $Id: Makefile,v 1.31 2002/03/22 15:56:07 ak Exp $ 22# $Id: Makefile,v 1.31 2002/03/22 15:56:07 ak Exp $
23 23
24# Fill in SRCARCH
25SRCARCH := x86
26
27# BITS is used as extension for files which are available in a 32 bit 24# BITS is used as extension for files which are available in a 32 bit
28# and a 64 bit version to simplify shared Makefiles. 25# and a 64 bit version to simplify shared Makefiles.
29# e.g.: obj-y += foo_$(BITS).o 26# e.g.: obj-y += foo_$(BITS).o
diff --git a/arch/i386/defconfig b/arch/x86/configs/i386_defconfig
index 54ee1764fdae..54ee1764fdae 100644
--- a/arch/i386/defconfig
+++ b/arch/x86/configs/i386_defconfig
diff --git a/arch/x86_64/defconfig b/arch/x86/configs/x86_64_defconfig
index b091c5e35558..b091c5e35558 100644
--- a/arch/x86_64/defconfig
+++ b/arch/x86/configs/x86_64_defconfig
diff --git a/arch/x86_64/.gitignore b/arch/x86_64/.gitignore
deleted file mode 100644
index 36ef4c374d25..000000000000
--- a/arch/x86_64/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
1boot
diff --git a/arch/x86_64/Kconfig.debug b/arch/x86_64/Kconfig.debug
deleted file mode 100644
index 775d211a5cf9..000000000000
--- a/arch/x86_64/Kconfig.debug
+++ /dev/null
@@ -1,61 +0,0 @@
1menu "Kernel hacking"
2
3config TRACE_IRQFLAGS_SUPPORT
4 bool
5 default y
6
7source "lib/Kconfig.debug"
8
9config DEBUG_RODATA
10 bool "Write protect kernel read-only data structures"
11 depends on DEBUG_KERNEL
12 help
13 Mark the kernel read-only data as write-protected in the pagetables,
14 in order to catch accidental (and incorrect) writes to such const data.
15 This option may have a slight performance impact because a portion
16 of the kernel code won't be covered by a 2MB TLB anymore.
17 If in doubt, say "N".
18
19config IOMMU_DEBUG
20 depends on IOMMU && DEBUG_KERNEL
21 bool "Enable IOMMU debugging"
22 help
23 Force the IOMMU to on even when you have less than 4GB of
24 memory and add debugging code. On overflow always panic. And
25 allow to enable IOMMU leak tracing. Can be disabled at boot
26 time with iommu=noforce. This will also enable scatter gather
27 list merging. Currently not recommended for production
28 code. When you use it make sure you have a big enough
29 IOMMU/AGP aperture. Most of the options enabled by this can
30 be set more finegrained using the iommu= command line
31 options. See Documentation/x86_64/boot-options.txt for more
32 details.
33
34config IOMMU_LEAK
35 bool "IOMMU leak tracing"
36 depends on DEBUG_KERNEL
37 depends on IOMMU_DEBUG
38 help
39 Add a simple leak tracer to the IOMMU code. This is useful when you
40 are debugging a buggy device driver that leaks IOMMU mappings.
41
42config DEBUG_STACKOVERFLOW
43 bool "Check for stack overflows"
44 depends on DEBUG_KERNEL
45 help
46 This option will cause messages to be printed if free stack space
47 drops below a certain limit.
48
49config DEBUG_STACK_USAGE
50 bool "Stack utilization instrumentation"
51 depends on DEBUG_KERNEL
52 help
53 Enables the display of the minimum amount of free stack which each
54 task has ever had available in the sysrq-T and sysrq-P debug output.
55
56 This option will slow down process creation somewhat.
57
58#config X86_REMOTE_DEBUG
59# bool "kgdb debugging stub"
60
61endmenu
diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile
index 83c5e76414ce..59594126e8b6 100644
--- a/scripts/kconfig/Makefile
+++ b/scripts/kconfig/Makefile
@@ -4,23 +4,30 @@
4 4
5PHONY += oldconfig xconfig gconfig menuconfig config silentoldconfig update-po-config 5PHONY += oldconfig xconfig gconfig menuconfig config silentoldconfig update-po-config
6 6
7# If a arch/$(SRCARCH)/Kconfig.$(ARCH) file exist use it
8ifneq ($(wildcard $(srctree)/arch/$(SRCARCH)/Kconfig.$(ARCH)),)
9 Kconfig := arch/$(SRCARCH)/Kconfig.$(ARCH)
10else
11 Kconfig := arch/$(SRCARCH)/Kconfig
12endif
13
7xconfig: $(obj)/qconf 14xconfig: $(obj)/qconf
8 $< arch/$(ARCH)/Kconfig 15 $< $(Kconfig)
9 16
10gconfig: $(obj)/gconf 17gconfig: $(obj)/gconf
11 $< arch/$(ARCH)/Kconfig 18 $< $(Kconfig)
12 19
13menuconfig: $(obj)/mconf 20menuconfig: $(obj)/mconf
14 $< arch/$(ARCH)/Kconfig 21 $< $(Kconfig)
15 22
16config: $(obj)/conf 23config: $(obj)/conf
17 $< arch/$(ARCH)/Kconfig 24 $< $(Kconfig)
18 25
19oldconfig: $(obj)/conf 26oldconfig: $(obj)/conf
20 $< -o arch/$(ARCH)/Kconfig 27 $< -o $(Kconfig)
21 28
22silentoldconfig: $(obj)/conf 29silentoldconfig: $(obj)/conf
23 $< -s arch/$(ARCH)/Kconfig 30 $< -s $(Kconfig)
24 31
25# Create new linux.po file 32# Create new linux.po file
26# Adjust charset to UTF-8 in .po file to accept UTF-8 in Kconfig files 33# Adjust charset to UTF-8 in .po file to accept UTF-8 in Kconfig files
@@ -45,27 +52,27 @@ update-po-config: $(obj)/kxgettext
45PHONY += randconfig allyesconfig allnoconfig allmodconfig defconfig 52PHONY += randconfig allyesconfig allnoconfig allmodconfig defconfig
46 53
47randconfig: $(obj)/conf 54randconfig: $(obj)/conf
48 $< -r arch/$(ARCH)/Kconfig 55 $< -r $(Kconfig)
49 56
50allyesconfig: $(obj)/conf 57allyesconfig: $(obj)/conf
51 $< -y arch/$(ARCH)/Kconfig 58 $< -y $(Kconfig)
52 59
53allnoconfig: $(obj)/conf 60allnoconfig: $(obj)/conf
54 $< -n arch/$(ARCH)/Kconfig 61 $< -n $(Kconfig)
55 62
56allmodconfig: $(obj)/conf 63allmodconfig: $(obj)/conf
57 $< -m arch/$(ARCH)/Kconfig 64 $< -m $(Kconfig)
58 65
59defconfig: $(obj)/conf 66defconfig: $(obj)/conf
60ifeq ($(KBUILD_DEFCONFIG),) 67ifeq ($(KBUILD_DEFCONFIG),)
61 $< -d arch/$(ARCH)/Kconfig 68 $< -d $(Kconfig)
62else 69else
63 @echo *** Default configuration is based on '$(KBUILD_DEFCONFIG)' 70 @echo "*** Default configuration is based on '$(KBUILD_DEFCONFIG)'"
64 $(Q)$< -D arch/$(ARCH)/configs/$(KBUILD_DEFCONFIG) arch/$(ARCH)/Kconfig 71 $(Q)$< -D arch/$(SRCARCH)/configs/$(KBUILD_DEFCONFIG) $(Kconfig)
65endif 72endif
66 73
67%_defconfig: $(obj)/conf 74%_defconfig: $(obj)/conf
68 $(Q)$< -D arch/$(ARCH)/configs/$@ arch/$(ARCH)/Kconfig 75 $(Q)$< -D arch/$(SRCARCH)/configs/$@ $(Kconfig)
69 76
70# Help text used by make help 77# Help text used by make help
71help: 78help: