From: tip-bot for Jacob Shin <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, eranian@google.com, hpa@zytor.com,
mingo@kernel.org, a.p.zijlstra@chello.nl,
acme@ghostprotocols.net, bp@alien8.de, jolsa@redhat.com,
jacob.shin@amd.com, tglx@linutronix.de, bp@suse.de
Subject: [tip:perf/core] perf/x86/amd: Fix AMD NB and L2I "uncore" support
Date: Mon, 22 Apr 2013 01:29:39 -0700 [thread overview]
Message-ID: <tip-94f4db3590893c600506105b88dab581c7f6f5c8@git.kernel.org> (raw)
In-Reply-To: <20130421180627.GA21049@jshin-Toonie>
Commit-ID: 94f4db3590893c600506105b88dab581c7f6f5c8
Gitweb: http://git.kernel.org/tip/94f4db3590893c600506105b88dab581c7f6f5c8
Author: Jacob Shin <jacob.shin@amd.com>
AuthorDate: Sun, 21 Apr 2013 13:06:27 -0500
Committer: Ingo Molnar <mingo@kernel.org>
CommitDate: Mon, 22 Apr 2013 10:10:55 +0200
perf/x86/amd: Fix AMD NB and L2I "uncore" support
Borislav Petkov reported a lockdep splat warning about kzalloc()
done in an IPI (hardirq) handler.
This is a real bug, do not call kzalloc() in a smp_call_function_single()
handler because it can schedule and crash.
Reported-by: Borislav Petkov <bp@suse.de>
Signed-off-by: Jacob Shin <jacob.shin@amd.com>
Tested-by: Borislav Petkov <bp@suse.de>
Cc: Borislav Petkov <bp@alien8.de>
Cc: <eranian@google.com>
Cc: <a.p.zijlstra@chello.nl>
Cc: <acme@ghostprotocols.net>
Cc: <jolsa@redhat.com>
Link: http://lkml.kernel.org/r/20130421180627.GA21049@jshin-Toonie
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
arch/x86/kernel/cpu/perf_event_amd_uncore.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/arch/x86/kernel/cpu/perf_event_amd_uncore.c b/arch/x86/kernel/cpu/perf_event_amd_uncore.c
index 6dc6227..c0c661a 100644
--- a/arch/x86/kernel/cpu/perf_event_amd_uncore.c
+++ b/arch/x86/kernel/cpu/perf_event_amd_uncore.c
@@ -498,7 +498,6 @@ static void __init init_cpu_already_online(void *dummy)
{
unsigned int cpu = smp_processor_id();
- amd_uncore_cpu_up_prepare(cpu);
amd_uncore_cpu_starting(cpu);
amd_uncore_cpu_online(cpu);
}
@@ -535,8 +534,10 @@ static int __init amd_uncore_init(void)
get_online_cpus();
/* init cpus already online before registering for hotplug notifier */
- for_each_online_cpu(cpu)
+ for_each_online_cpu(cpu) {
+ amd_uncore_cpu_up_prepare(cpu);
smp_call_function_single(cpu, init_cpu_already_online, NULL, 1);
+ }
register_cpu_notifier(&amd_uncore_cpu_notifier_block);
put_online_cpus();
next prev parent reply other threads:[~2013-04-22 8:31 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-15 17:21 [PATCH 0/2] perf, amd: support for AMD NB and L2I "uncore" counters Jacob Shin
2013-04-15 17:21 ` [PATCH 1/2] perf, amd: remove NB counter support from perf_event_amd.c Jacob Shin
2013-04-22 7:59 ` [tip:perf/core] perf/x86/amd: Remove old-style " tip-bot for Jacob Shin
2013-04-15 17:21 ` [PATCH 2/2] perf, amd: support for AMD NB and L2I "uncore" counters Jacob Shin
2013-04-18 11:28 ` Peter Zijlstra
2013-04-18 16:33 ` Jacob Shin
2013-04-19 12:27 ` Peter Zijlstra
2013-04-19 14:41 ` Jacob Shin
2013-04-19 18:55 ` Peter Zijlstra
2013-04-19 21:34 ` Jacob Shin
2013-04-21 12:48 ` [tip:perf/core] perf/x86/amd: Add support for AMD NB and L2I " uncore" counters tip-bot for Jacob Shin
2013-04-21 14:32 ` Jacob Shin
2013-04-21 17:02 ` Borislav Petkov
2013-04-21 17:33 ` Jacob Shin
2013-04-21 18:05 ` Borislav Petkov
2013-04-21 18:06 ` Jacob Shin
2013-04-21 18:22 ` Borislav Petkov
2013-04-22 8:29 ` tip-bot for Jacob Shin [this message]
2013-04-17 15:35 ` [PATCH 0/2] perf, amd: support for AMD NB and L2I "uncore" counters Jacob Shin
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=tip-94f4db3590893c600506105b88dab581c7f6f5c8@git.kernel.org \
--to=tipbot@zytor.com \
--cc=a.p.zijlstra@chello.nl \
--cc=acme@ghostprotocols.net \
--cc=bp@alien8.de \
--cc=bp@suse.de \
--cc=eranian@google.com \
--cc=hpa@zytor.com \
--cc=jacob.shin@amd.com \
--cc=jolsa@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=tglx@linutronix.de \
/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;
as well as URLs for NNTP newsgroup(s).