The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* sparc boot failure due to perf init
@ 2011-01-07 20:18 Sam Ravnborg
  2011-01-07 20:22 ` Sam Ravnborg
  2011-01-07 20:23 ` Peter Zijlstra
  0 siblings, 2 replies; 12+ messages in thread
From: Sam Ravnborg @ 2011-01-07 20:18 UTC (permalink / raw)
  To: David Miller, Peter Zijlstra; +Cc: lkml, sparclinux

I have upgraded my Sun Blade 100 to latest mainline,
and when it booted I hit an oops.

Relevant bits from the oops:
Mount-cache hash table entries: 512
Performance events: perf (null)    <<<<<<<<<<<<<<<<<<<
Unable to handle kernel NULL pointer dereference
tsk->{mm,active_mm}->context = 0000000000000000
tsk->{mm,active_mm}->pgd = fffff800003e4634
              \|/ ____ \|/
              "@'/ .. \`@"
              /_| \__/ |_\
                 \__U_/
swapper(1): Oops [#1]
TSTATE: 0000004480001606 TPC: 000000000055c180 TNPC: 000000000055c184 Y: 00000000    Not tainted
TPC: <strcmp+0x0/0x40>
g0: fffff8000f03f800 g1: 00000000007df800 g2: 000000000078f918 g3: 0000000000799168
g4: fffff8000f0358c0 g5: fffff80000c22000 g6: fffff8000f038000 g7: 0000000000000001
o0: 0000000000000000 o1: 000000000073b050 o2: 0000000000000001 o3: 0000000000000001
o4: fffff8000f0356c8 o5: 0000000000000000 sp: fffff8000f03b531 ret_pc: 00000000007b9e30
RPC: <init_hw_perf_events+0x30/0x168>
l0: 0000000000000000 l1: 00000000007e0a80 l2: 00000000007e2140 l3: 0000000000000001
l4: 0000000000000000 l5: 0000000000000000 l6: 0000000000000000 l7: 0000000000777b78
i0: fffff80001402a80 i1: 0000000000000000 i2: 0000000000000001 i3: 0000000000000001
i4: 0000000000000000 i5: 0000000000000005 i6: fffff8000f03b5e1 i7: 00000000007b41c8
I7: <do_one_initcall+0x68/0x140>

The line mared "<<<<<<<<<<<<<" is added by my printf debugging.
It shows that sparc_pmu_type is NULL.

sparc_pmu_type is set in cpu_type_probe(void) which is:

   arch_initcall(cpu_type_probe);

But init_hw_perf_events() is:

   early_initcall(init_hw_perf_events);

So we end up calling init_hw_perf_events() before we call cpu_type_probe(),
and sparc_pmu_type is not set.

This was introduced by: 
"perf, arch: Cleanup perf-pmu init vs lockup-detector" - 004417a6d468e24399e383645c068b498eed84ad

I did not see any obvious fix.
(To avoid it is simple - I can disable it in my config).

	Sam


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2011-01-13 20:24 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-07 20:18 sparc boot failure due to perf init Sam Ravnborg
2011-01-07 20:22 ` Sam Ravnborg
2011-01-07 20:23 ` Peter Zijlstra
2011-01-07 20:27   ` Peter Zijlstra
2011-01-07 20:31     ` Sam Ravnborg
2011-01-09 23:37       ` David Miller
2011-01-10 15:21         ` Peter Zijlstra
2011-01-13 10:55         ` Peter Zijlstra
2011-01-13 12:25           ` Sam Ravnborg
2011-01-13 12:33             ` Peter Zijlstra
2011-01-13 20:25           ` David Miller
2011-01-08  2:23   ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox