The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Sam Ravnborg <sam@ravnborg.org>
To: David Miller <davem@davemloft.net>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: lkml <linux-kernel@vger.kernel.org>,
	sparclinux <sparclinux@vger.kernel.org>
Subject: sparc boot failure due to perf init
Date: Fri, 7 Jan 2011 21:18:05 +0100	[thread overview]
Message-ID: <20110107201805.GA28104@merkur.ravnborg.org> (raw)

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


             reply	other threads:[~2011-01-07 20:18 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-07 20:18 Sam Ravnborg [this message]
2011-01-07 20:22 ` sparc boot failure due to perf init 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110107201805.GA28104@merkur.ravnborg.org \
    --to=sam@ravnborg.org \
    --cc=a.p.zijlstra@chello.nl \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sparclinux@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox