aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel
diff options
context:
space:
mode:
authorRobert Richter <robert.richter@amd.com>2008-06-12 14:19:23 -0400
committerIngo Molnar <mingo@elte.hu>2008-07-08 01:47:39 -0400
commit3a27dd1ce5de08e21e0266ddf00e6f1f843bfe8b (patch)
treeb72316cfbe10d1f955a0cb9553879fb2bb14344b /arch/x86/kernel
parent24bfdca7b7da971ef9a483303a096ac6d4b3a02c (diff)
x86: Move PCI IO ECS code to x86/pci
"Form follows function". Code is now where it belongs to. Signed-off-by: Robert Richter <robert.richter@amd.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel')
-rw-r--r--arch/x86/kernel/cpu/amd.c3
-rw-r--r--arch/x86/kernel/cpu/amd_64.c4
-rw-r--r--arch/x86/kernel/cpu/cpu.h2
-rw-r--r--arch/x86/kernel/setup.c13
4 files changed, 0 insertions, 22 deletions
diff --git a/arch/x86/kernel/cpu/amd.c b/arch/x86/kernel/cpu/amd.c
index acc891ae5901..81a07ca65d44 100644
--- a/arch/x86/kernel/cpu/amd.c
+++ b/arch/x86/kernel/cpu/amd.c
@@ -266,9 +266,6 @@ static void __cpuinit init_amd(struct cpuinfo_x86 *c)
266 266
267 if (cpu_has_xmm2) 267 if (cpu_has_xmm2)
268 set_cpu_cap(c, X86_FEATURE_MFENCE_RDTSC); 268 set_cpu_cap(c, X86_FEATURE_MFENCE_RDTSC);
269
270 if (c->x86 == 0x10)
271 amd_enable_pci_ext_cfg(c);
272} 269}
273 270
274static unsigned int __cpuinit amd_size_cache(struct cpuinfo_x86 *c, unsigned int size) 271static unsigned int __cpuinit amd_size_cache(struct cpuinfo_x86 *c, unsigned int size)
diff --git a/arch/x86/kernel/cpu/amd_64.c b/arch/x86/kernel/cpu/amd_64.c
index f8d20588bde9..250bfe6064af 100644
--- a/arch/x86/kernel/cpu/amd_64.c
+++ b/arch/x86/kernel/cpu/amd_64.c
@@ -6,7 +6,6 @@
6#include <asm/cacheflush.h> 6#include <asm/cacheflush.h>
7 7
8#include <mach_apic.h> 8#include <mach_apic.h>
9#include "cpu.h"
10 9
11extern int __cpuinit get_model_name(struct cpuinfo_x86 *c); 10extern int __cpuinit get_model_name(struct cpuinfo_x86 *c);
12extern void __cpuinit display_cacheinfo(struct cpuinfo_x86 *c); 11extern void __cpuinit display_cacheinfo(struct cpuinfo_x86 *c);
@@ -187,9 +186,6 @@ void __cpuinit init_amd(struct cpuinfo_x86 *c)
187 if (c->x86 == 0x10) 186 if (c->x86 == 0x10)
188 fam10h_check_enable_mmcfg(); 187 fam10h_check_enable_mmcfg();
189 188
190 if (c->x86 == 0x10)
191 amd_enable_pci_ext_cfg(c);
192
193 if (c == &boot_cpu_data && c->x86 >= 0xf && c->x86 <= 0x11) { 189 if (c == &boot_cpu_data && c->x86 >= 0xf && c->x86 <= 0x11) {
194 unsigned long long tseg; 190 unsigned long long tseg;
195 191
diff --git a/arch/x86/kernel/cpu/cpu.h b/arch/x86/kernel/cpu/cpu.h
index f5d5bb1b5541..40ad1893fe87 100644
--- a/arch/x86/kernel/cpu/cpu.h
+++ b/arch/x86/kernel/cpu/cpu.h
@@ -39,5 +39,3 @@ extern int get_model_name(struct cpuinfo_x86 *c);
39extern void display_cacheinfo(struct cpuinfo_x86 *c); 39extern void display_cacheinfo(struct cpuinfo_x86 *c);
40 40
41#endif /* CONFIG_X86_32 */ 41#endif /* CONFIG_X86_32 */
42
43extern void __cpuinit amd_enable_pci_ext_cfg(struct cpuinfo_x86 *c);
diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
index 20e14dbef107..6f80b852a196 100644
--- a/arch/x86/kernel/setup.c
+++ b/arch/x86/kernel/setup.c
@@ -137,16 +137,3 @@ void __init setup_per_cpu_areas(void)
137} 137}
138 138
139#endif 139#endif
140#define ENABLE_CF8_EXT_CFG (1ULL << 46)
141
142void __cpuinit amd_enable_pci_ext_cfg(struct cpuinfo_x86 *c)
143{
144 u64 reg;
145 rdmsrl(MSR_AMD64_NB_CFG, reg);
146 if (!(reg & ENABLE_CF8_EXT_CFG)) {
147 reg |= ENABLE_CF8_EXT_CFG;
148 wrmsrl(MSR_AMD64_NB_CFG, reg);
149 }
150 set_cpu_cap(c, X86_FEATURE_PCI_EXT_CFG);
151}
152