lkml.org 
[lkml]   [2015]   [Jul]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 42/42] x86: fix msr print again
Date
msr early print out get broken again, fix it.

Signed-off-by: Yinghai Lu <yinghai@kernel.org>
---
arch/x86/include/asm/processor.h | 1 -
arch/x86/kernel/cpu/common.c | 61 +++++++++++++++++++++-------------------
2 files changed, 32 insertions(+), 30 deletions(-)

diff --git a/arch/x86/include/asm/processor.h b/arch/x86/include/asm/processor.h
index 43e6519..3a7bd35 100644
--- a/arch/x86/include/asm/processor.h
+++ b/arch/x86/include/asm/processor.h
@@ -177,7 +177,6 @@ extern void early_cpu_init(void);
extern void identify_boot_cpu(void);
extern void identify_secondary_cpu(struct cpuinfo_x86 *);
extern void print_cpu_info(struct cpuinfo_x86 *);
-void print_cpu_msr(struct cpuinfo_x86 *);
extern void init_scattered_cpuid_features(struct cpuinfo_x86 *c);
extern unsigned int init_intel_cacheinfo(struct cpuinfo_x86 *c);
extern void init_amd_cacheinfo(struct cpuinfo_x86 *c);
diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c
index 922c5e0..3c87e75 100644
--- a/arch/x86/kernel/cpu/common.c
+++ b/arch/x86/kernel/cpu/common.c
@@ -1016,27 +1016,6 @@ out:
}
#endif

-void __init identify_boot_cpu(void)
-{
- identify_cpu(&boot_cpu_data);
- init_amd_e400_c1e_mask();
-#ifdef CONFIG_X86_32
- sysenter_setup();
- enable_sep_cpu();
-#endif
- cpu_detect_tlb(&boot_cpu_data);
-}
-
-void identify_secondary_cpu(struct cpuinfo_x86 *c)
-{
- BUG_ON(c == &boot_cpu_data);
- identify_cpu(c);
-#ifdef CONFIG_X86_32
- enable_sep_cpu();
-#endif
- mtrr_ap_init();
-}
-
struct msr_range {
unsigned min;
unsigned max;
@@ -1082,6 +1061,38 @@ static __init int setup_show_msr(char *arg)
}
__setup("show_msr=", setup_show_msr);

+static void print_cpu_msr(struct cpuinfo_x86 *c)
+{
+ if (c->cpu_index < show_msr)
+ __print_cpu_msr();
+}
+
+void __init identify_boot_cpu(void)
+{
+ identify_cpu(&boot_cpu_data);
+ init_amd_e400_c1e_mask();
+#ifdef CONFIG_X86_32
+ sysenter_setup();
+ enable_sep_cpu();
+#endif
+ cpu_detect_tlb(&boot_cpu_data);
+
+ print_cpu_msr(&boot_cpu_data);
+}
+
+void identify_secondary_cpu(struct cpuinfo_x86 *c)
+{
+ BUG_ON(c == &boot_cpu_data);
+ identify_cpu(c);
+#ifdef CONFIG_X86_32
+ enable_sep_cpu();
+#endif
+
+ print_cpu_msr(c);
+
+ mtrr_ap_init();
+}
+
static __init int setup_noclflush(char *arg)
{
setup_clear_cpu_cap(X86_FEATURE_CLFLUSH);
@@ -1115,14 +1126,6 @@ void print_cpu_info(struct cpuinfo_x86 *c)
printk(KERN_CONT ", stepping: %02x)\n", c->x86_mask);
else
printk(KERN_CONT ")\n");
-
- print_cpu_msr(c);
-}
-
-void print_cpu_msr(struct cpuinfo_x86 *c)
-{
- if (c->cpu_index < show_msr)
- __print_cpu_msr();
}

static __init int setup_disablecpuid(char *arg)
--
1.8.4.5


\
 
 \ /
  Last update: 2015-07-07 22:41    [W:0.324 / U:0.324 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site