mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: pm list <linux-pm@lists.linux-foundation.org>,
	LKML <linux-kernel@vger.kernel.org>, Ingo Molnar <mingo@elte.hu>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [Regression, post-2.6.34-rc1][PATCH] x86 / perf: Fix suspend to RAM on HP nx6325
Date: Sat, 20 Mar 2010 18:36:49 +0100	[thread overview]
Message-ID: <1269106609.9440.529.camel@laptop> (raw)
In-Reply-To: <201003201507.15358.rjw@sisk.pl>

On Sat, 2010-03-20 at 15:07 +0100, Rafael J. Wysocki wrote:
> Hi Peter,
> 
> Your commit 3f6da3905398826d85731247e7fbcf53400c18bd
> (perf: Rework and fix the arch CPU-hotplug hooks) unfortunately broke suspend
> to RAM (probably hibernation too, but I haven't checked) on my HP nx6325.
> I also expect more (if not all) AMD-based boxes to be broken by it.
> 
> The machine simply hangs solid while trying to disable CPU1 during suspend.
> 
> The patch below fixes it, although I'm not exactly sure why calling
> amd_pmu_cpu_offline() during suspend causes the hang to happen.  If there's a
> better way to fix this, please let me know.

Hrmm, I'll have a poke at my AMD once I'm back home again, but does
something like the below cure things for you?

---
 arch/x86/kernel/cpu/perf_event_amd.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/arch/x86/kernel/cpu/perf_event_amd.c b/arch/x86/kernel/cpu/perf_event_amd.c
index 358a8e3..0189af4 100644
--- a/arch/x86/kernel/cpu/perf_event_amd.c
+++ b/arch/x86/kernel/cpu/perf_event_amd.c
@@ -345,6 +345,8 @@ static void amd_pmu_cpu_offline(int cpu)
 		return;
 
 	cpuhw = &per_cpu(cpu_hw_events, cpu);
+	if (!cpuhw)
+		return;
 
 	raw_spin_lock(&amd_nb_lock);
 



  reply	other threads:[~2010-03-20 17:36 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-20 14:07 Rafael J. Wysocki
2010-03-20 17:36 ` Peter Zijlstra [this message]
2010-03-20 17:47   ` Linus Torvalds
2010-03-20 20:48     ` Rafael J. Wysocki
2010-03-21  1:10       ` Peter Zijlstra
2010-03-21 17:31       ` Linus Torvalds
2010-03-21 20:51         ` Rafael J. Wysocki

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=1269106609.9440.529.camel@laptop \
    --to=peterz@infradead.org \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@lists.linux-foundation.org \
    --cc=mingo@elte.hu \
    --cc=rjw@sisk.pl \
    --cc=torvalds@linux-foundation.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

Powered by JetHome