aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86_64
diff options
context:
space:
mode:
authorAndi Kleen <ak@suse.de>2006-12-06 20:14:09 -0500
committerAndi Kleen <andi@basil.nowhere.org>2006-12-06 20:14:09 -0500
commit713819989aa4dd141a37074dbc369e7c620bc619 (patch)
tree31a9166ffb2f767fbe1b20cd294dbffe74e0d675 /arch/x86_64
parent8542b200cbe5609edd7aae0c304c091a1c290452 (diff)
[PATCH] x86-64: Add option to compile for Core2
Add an option to compile for Intel's Core 2 The Kconfig help is a mouthful due to the inventiveness of Intel's product naming department. Mainly for the 64bit cache line sizes because gcc doesn't support optimizing for core2 yet. However it will and then the kernel should be ready by passing the right option Also fix the old MPSC help text to confirm better to reality. Signed-off-by: Andi Kleen <ak@suse.de>
Diffstat (limited to 'arch/x86_64')
-rw-r--r--arch/x86_64/Kconfig27
-rw-r--r--arch/x86_64/Makefile4
2 files changed, 25 insertions, 6 deletions
diff --git a/arch/x86_64/Kconfig b/arch/x86_64/Kconfig
index 5cb509dbffe4..6eece27d579c 100644
--- a/arch/x86_64/Kconfig
+++ b/arch/x86_64/Kconfig
@@ -122,7 +122,7 @@ endchoice
122 122
123choice 123choice
124 prompt "Processor family" 124 prompt "Processor family"
125 default MK8 125 default GENERIC_CPU
126 126
127config MK8 127config MK8
128 bool "AMD-Opteron/Athlon64" 128 bool "AMD-Opteron/Athlon64"
@@ -130,16 +130,31 @@ config MK8
130 Optimize for AMD Opteron/Athlon64/Hammer/K8 CPUs. 130 Optimize for AMD Opteron/Athlon64/Hammer/K8 CPUs.
131 131
132config MPSC 132config MPSC
133 bool "Intel EM64T" 133 bool "Intel P4 / older Netburst based Xeon"
134 help 134 help
135 Optimize for Intel Pentium 4 and Xeon CPUs with Intel 135 Optimize for Intel Pentium 4 and older Nocona/Dempsey Xeon CPUs
136 Extended Memory 64 Technology(EM64T). For details see 136 with Intel Extended Memory 64 Technology(EM64T). For details see
137 <http://www.intel.com/technology/64bitextensions/>. 137 <http://www.intel.com/technology/64bitextensions/>.
138 Note the the latest Xeons (Xeon 51xx and 53xx) are not based on the
139 Netburst core and shouldn't use this option. You can distingush them
140 using the cpu family field
141 in /proc/cpuinfo. Family 15 is a older Xeon, Family 6 a newer one
142 (this rule only applies to system that support EM64T)
143
144config MCORE2
145 bool "Intel Core2 / newer Xeon"
146 help
147 Optimize for Intel Core2 and newer Xeons (51xx)
148 You can distingush the newer Xeons from the older ones using
149 the cpu family field in /proc/cpuinfo. 15 is a older Xeon
150 (use CONFIG_MPSC then), 6 is a newer one. This rule only
151 applies to CPUs that support EM64T.
138 152
139config GENERIC_CPU 153config GENERIC_CPU
140 bool "Generic-x86-64" 154 bool "Generic-x86-64"
141 help 155 help
142 Generic x86-64 CPU. 156 Generic x86-64 CPU.
157 Run equally well on all x86-64 CPUs.
143 158
144endchoice 159endchoice
145 160
@@ -149,12 +164,12 @@ endchoice
149config X86_L1_CACHE_BYTES 164config X86_L1_CACHE_BYTES
150 int 165 int
151 default "128" if GENERIC_CPU || MPSC 166 default "128" if GENERIC_CPU || MPSC
152 default "64" if MK8 167 default "64" if MK8 || MCORE2
153 168
154config X86_L1_CACHE_SHIFT 169config X86_L1_CACHE_SHIFT
155 int 170 int
156 default "7" if GENERIC_CPU || MPSC 171 default "7" if GENERIC_CPU || MPSC
157 default "6" if MK8 172 default "6" if MK8 || MCORE2
158 173
159config X86_INTERNODE_CACHE_BYTES 174config X86_INTERNODE_CACHE_BYTES
160 int 175 int
diff --git a/arch/x86_64/Makefile b/arch/x86_64/Makefile
index 6e38d4daeed7..b471b8550d03 100644
--- a/arch/x86_64/Makefile
+++ b/arch/x86_64/Makefile
@@ -30,6 +30,10 @@ cflags-y :=
30cflags-kernel-y := 30cflags-kernel-y :=
31cflags-$(CONFIG_MK8) += $(call cc-option,-march=k8) 31cflags-$(CONFIG_MK8) += $(call cc-option,-march=k8)
32cflags-$(CONFIG_MPSC) += $(call cc-option,-march=nocona) 32cflags-$(CONFIG_MPSC) += $(call cc-option,-march=nocona)
33# gcc doesn't support -march=core2 yet as of gcc 4.3, but I hope it
34# will eventually. Use -mtune=generic as fallback
35cflags-$(CONFIG_MCORE2) += \
36 $(call cc-option,-march=core2,$(call cc-option,-mtune=generic))
33cflags-$(CONFIG_GENERIC_CPU) += $(call cc-option,-mtune=generic) 37cflags-$(CONFIG_GENERIC_CPU) += $(call cc-option,-mtune=generic)
34 38
35cflags-y += -m64 39cflags-y += -m64