* [PATCH 2/2] show_cpuinfo prints the name of the calling CPU, which i think is wrong.
@ 2008-10-13 17:36 Johannes Dickgreber
2008-10-13 22:21 ` Ralf Baechle
0 siblings, 1 reply; 4+ messages in thread
From: Johannes Dickgreber @ 2008-10-13 17:36 UTC (permalink / raw)
To: ralf; +Cc: linux-mips
Signed-off-by: Johannes Dickgreber <tanzy@gmx.de>
---
arch/mips/kernel/proc.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/mips/kernel/proc.c b/arch/mips/kernel/proc.c
index 9d60679..8897c53 100644
--- a/arch/mips/kernel/proc.c
+++ b/arch/mips/kernel/proc.c
@@ -38,7 +38,7 @@ static int show_cpuinfo(struct seq_file *m, void *v)
seq_printf(m, "processor\t\t: %ld\n", n);
sprintf(fmt, "cpu model\t\t: %%s V%%d.%%d%s\n",
cpu_data[n].options & MIPS_CPU_FPU ? " FPU V%d.%d" : "");
- seq_printf(m, fmt, __cpu_name[smp_processor_id()],
+ seq_printf(m, fmt, __cpu_name[n],
(version >> 4) & 0x0f, version & 0x0f,
(fp_vers >> 4) & 0x0f, fp_vers & 0x0f);
seq_printf(m, "BogoMIPS\t\t: %lu.%02lu\n",
--
1.6.0.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 2/2] show_cpuinfo prints the name of the calling CPU, which i think is wrong.
2008-10-13 17:36 [PATCH 2/2] show_cpuinfo prints the name of the calling CPU, which i think is wrong Johannes Dickgreber
@ 2008-10-13 22:21 ` Ralf Baechle
2008-10-13 23:34 ` David Daney
0 siblings, 1 reply; 4+ messages in thread
From: Ralf Baechle @ 2008-10-13 22:21 UTC (permalink / raw)
To: Johannes Dickgreber; +Cc: linux-mips
On Mon, Oct 13, 2008 at 07:36:21PM +0200, Johannes Dickgreber wrote:
> Cc: linux-mips@linux-mips.org
> Subject: [PATCH 2/2] show_cpuinfo prints the name of the calling CPU, which i
> think is wrong.
Patch is correct and so I applied it. Not a big issue though. There is
only one system supported currently that supports a mix of different
processor types (IP27) and those are very similar so it doesn't cause
pain.
Ralf
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 2/2] show_cpuinfo prints the name of the calling CPU, which i think is wrong.
2008-10-13 22:21 ` Ralf Baechle
@ 2008-10-13 23:34 ` David Daney
2008-10-14 8:36 ` Ralf Baechle
0 siblings, 1 reply; 4+ messages in thread
From: David Daney @ 2008-10-13 23:34 UTC (permalink / raw)
To: Ralf Baechle; +Cc: Johannes Dickgreber, linux-mips
Ralf Baechle wrote:
> On Mon, Oct 13, 2008 at 07:36:21PM +0200, Johannes Dickgreber wrote:
>
>> Cc: linux-mips@linux-mips.org
>> Subject: [PATCH 2/2] show_cpuinfo prints the name of the calling CPU, which i
>> think is wrong.
>
> Patch is correct and so I applied it. Not a big issue though. There is
> only one system supported currently that supports a mix of different
> processor types (IP27) and those are very similar so it doesn't cause
> pain.
>
> Ralf
The patch is required on SMP systems as without it you get:
BUG: using smp_processor_id() in preemptible [00000000] code: cat/687
caller is show_cpuinfo+0xc4/0x500
Call Trace:
[<ffffffff8111f4c8>] dump_stack+0x8/0x38
[<ffffffff812c235c>] debug_smp_processor_id+0xec/0x100
[<ffffffff8112de64>] show_cpuinfo+0xc4/0x500
[<ffffffff811d4128>] seq_read+0x2f8/0x420
[<ffffffff811fb658>] proc_reg_read+0x90/0xd8
[<ffffffff811b05ec>] vfs_read+0xbc/0x160
[<ffffffff811b0a88>] sys_read+0x50/0x98
[<ffffffff81129224>] handle_sysn32+0x44/0x84
David Daney
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 2/2] show_cpuinfo prints the name of the calling CPU, which i think is wrong.
2008-10-13 23:34 ` David Daney
@ 2008-10-14 8:36 ` Ralf Baechle
0 siblings, 0 replies; 4+ messages in thread
From: Ralf Baechle @ 2008-10-14 8:36 UTC (permalink / raw)
To: David Daney; +Cc: Johannes Dickgreber, linux-mips
On Mon, Oct 13, 2008 at 04:34:17PM -0700, David Daney wrote:
> The patch is required on SMP systems as without it you get:
>
> BUG: using smp_processor_id() in preemptible [00000000] code: cat/687
> caller is show_cpuinfo+0xc4/0x500
> Call Trace:
> [<ffffffff8111f4c8>] dump_stack+0x8/0x38
> [<ffffffff812c235c>] debug_smp_processor_id+0xec/0x100
> [<ffffffff8112de64>] show_cpuinfo+0xc4/0x500
> [<ffffffff811d4128>] seq_read+0x2f8/0x420
> [<ffffffff811fb658>] proc_reg_read+0x90/0xd8
> [<ffffffff811b05ec>] vfs_read+0xbc/0x160
> [<ffffffff811b0a88>] sys_read+0x50/0x98
> [<ffffffff81129224>] handle_sysn32+0x44/0x84
Uh indeed, makes sense ...
Ralf
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-10-14 8:36 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-13 17:36 [PATCH 2/2] show_cpuinfo prints the name of the calling CPU, which i think is wrong Johannes Dickgreber
2008-10-13 22:21 ` Ralf Baechle
2008-10-13 23:34 ` David Daney
2008-10-14 8:36 ` Ralf Baechle
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox