* [PATCH] x86: Fix show_msr= debug print out
@ 2012-02-12 3:08 Yinghai Lu
2012-02-12 11:14 ` Ingo Molnar
0 siblings, 1 reply; 3+ messages in thread
From: Yinghai Lu @ 2012-02-12 3:08 UTC (permalink / raw)
To: Ingo Molnar, Thomas Gleixner, H. Peter Anvin; +Cc: linux-kernel, Yinghai Lu
Found show_msr=n is broken when try to ask user to get debug info
about broken mtrr. (setting are different between cpus)
Originally we call print_cpu_msr from print_cpu_info(), but
| commit 2eaad1fddd7450a48ad464229775f97fbfe8af36
| Author: Mike Travis <travis@sgi.com>
| Date: Thu Dec 10 17:19:36 2009 -0800
|
| x86: Limit the number of processor bootup messages
just remove whole print_cpu_info calling for all APs. So show_msr=n
stop working now.
Try to put back calling of print_cpu_msr, and it will only print msr
when user specify show_msr=n
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
---
arch/x86/include/asm/processor.h | 1 +
arch/x86/kernel/cpu/common.c | 12 +++++-------
arch/x86/kernel/smpboot.c | 5 +++--
3 files changed, 9 insertions(+), 9 deletions(-)
Index: linux-2.6/arch/x86/include/asm/processor.h
===================================================================
--- linux-2.6.orig/arch/x86/include/asm/processor.h
+++ linux-2.6/arch/x86/include/asm/processor.h
@@ -162,6 +162,7 @@ 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 unsigned short num_cache_leaves;
Index: linux-2.6/arch/x86/kernel/cpu/common.c
===================================================================
--- linux-2.6.orig/arch/x86/kernel/cpu/common.c
+++ linux-2.6/arch/x86/kernel/cpu/common.c
@@ -933,7 +933,7 @@ static const struct msr_range msr_range_
{ 0xc0011000, 0xc001103b},
};
-static void __cpuinit print_cpu_msr(void)
+static void __cpuinit __print_cpu_msr(void)
{
unsigned index_min, index_max;
unsigned index;
@@ -996,14 +996,12 @@ void __cpuinit print_cpu_info(struct cpu
printk(KERN_CONT " stepping %02x\n", c->x86_mask);
else
printk(KERN_CONT "\n");
+}
-#ifdef CONFIG_SMP
+void __cpuinit print_cpu_mdr(struct cpuinfo_x86 *c)
+{
if (c->cpu_index < show_msr)
- print_cpu_msr();
-#else
- if (show_msr)
- print_cpu_msr();
-#endif
+ __print_cpu_msr();
}
static __init int setup_disablecpuid(char *arg)
Index: linux-2.6/arch/x86/kernel/smpboot.c
===================================================================
--- linux-2.6.orig/arch/x86/kernel/smpboot.c
+++ linux-2.6/arch/x86/kernel/smpboot.c
@@ -791,9 +791,10 @@ do_rest:
schedule();
}
- if (cpumask_test_cpu(cpu, cpu_callin_mask))
+ if (cpumask_test_cpu(cpu, cpu_callin_mask)) {
+ print_cpu_msr(&cpu_data(cpu));
pr_debug("CPU%d: has booted.\n", cpu);
- else {
+ } else {
boot_error = 1;
if (*(volatile u32 *)TRAMPOLINE_SYM(trampoline_status)
== 0xA5A5A5A5)
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] x86: Fix show_msr= debug print out
2012-02-12 3:08 [PATCH] x86: Fix show_msr= debug print out Yinghai Lu
@ 2012-02-12 11:14 ` Ingo Molnar
2012-02-12 17:54 ` Yinghai Lu
0 siblings, 1 reply; 3+ messages in thread
From: Ingo Molnar @ 2012-02-12 11:14 UTC (permalink / raw)
To: Yinghai Lu; +Cc: Thomas Gleixner, H. Peter Anvin, linux-kernel
* Yinghai Lu <yinghai@kernel.org> wrote:
> +void print_cpu_msr(struct cpuinfo_x86 *);
> +void __cpuinit print_cpu_mdr(struct cpuinfo_x86 *c)
> + print_cpu_msr(&cpu_data(cpu));
This patch cannot possibly have been build tested, let alone
boot tested.
Thanks,
Ingo
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] x86: Fix show_msr= debug print out
2012-02-12 11:14 ` Ingo Molnar
@ 2012-02-12 17:54 ` Yinghai Lu
0 siblings, 0 replies; 3+ messages in thread
From: Yinghai Lu @ 2012-02-12 17:54 UTC (permalink / raw)
To: Ingo Molnar; +Cc: Thomas Gleixner, H. Peter Anvin, linux-kernel
On Sun, Feb 12, 2012 at 3:14 AM, Ingo Molnar <mingo@elte.hu> wrote:
>
> * Yinghai Lu <yinghai@kernel.org> wrote:
>
>> +void print_cpu_msr(struct cpuinfo_x86 *);
>> +void __cpuinit print_cpu_mdr(struct cpuinfo_x86 *c)
>> + print_cpu_msr(&cpu_data(cpu));
>
> This patch cannot possibly have been build tested, let alone
> boot tested.
sorry about that. Just send out tested version (-v3)
Yinghai
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-02-12 17:54 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-12 3:08 [PATCH] x86: Fix show_msr= debug print out Yinghai Lu
2012-02-12 11:14 ` Ingo Molnar
2012-02-12 17:54 ` Yinghai Lu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox