From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753760Ab0CWWkz (ORCPT ); Tue, 23 Mar 2010 18:40:55 -0400 Received: from smtp-out.google.com ([216.239.44.51]:12707 "EHLO smtp-out.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753342Ab0CWWky convert rfc822-to-8bit (ORCPT ); Tue, 23 Mar 2010 18:40:54 -0400 DomainKey-Signature: a=rsa-sha1; s=beta; d=google.com; c=nofws; q=dns; h=mime-version:in-reply-to:references:date:message-id:subject:from:to: cc:content-type:content-transfer-encoding:x-system-of-record; b=or8wfyOo7abiyLACXVTXg6p/LjYzjKnf7UeTIWoHva/KA/rJitj7iiIfvQgt7rTBe ZpDcqWaYIUKLL7/82Lvvw== MIME-Version: 1.0 In-Reply-To: <201003232318.11332.rjw@sisk.pl> References: <20100323090206.33932wop73sdefm6@unsolicited.net> <4BA8C7A4.8050502@ladisch.de> <201003232318.11332.rjw@sisk.pl> Date: Tue, 23 Mar 2010 23:40:47 +0100 Message-ID: Subject: Re: 2.6.34-rc2 - crash on shutdown From: Stephane Eranian To: "Rafael J. Wysocki" Cc: Clemens Ladisch , David R , linux-kernel@vger.kernel.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT X-System-Of-Record: true Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Mar 23, 2010 at 11:18 PM, Rafael J. Wysocki wrote: > On Tuesday 23 March 2010, Clemens Ladisch wrote: >> Stephane Eranian wrote: >> > On Tue, Mar 23, 2010 at 1:02 PM, Clemens Ladisch wrote: >> > > The only pointer access in this function is cpuhw->amd_nb, but >> > > I don't see any obvious bugs. >> > >> > I reported a problem with the AMD initialization just last week. >> > There is an issue with amd_pmu_cpu_online() which gets called >> > too early, and thus fails. That leaves some bogus state and causes >> > a crash in amd_pmu_cpu_offline(). >> > >> > I proposed a fix which was rejected. The alternative involves moving >> > some the of CPU initialization code (on AMD) to an earlier position,i.e., >> > which would be executed before the CPU_STARTED notifier. Nobody >> > has proposed anything else so far. >> >> I don't know about the early bootmem stuff, but regardless of this issue, >> if amd_pmu_cpu_online() can fail, then amd_pmu_cpu_offline() must be able >> to handle this without blowing up.  Something like this (untested): > > I guess we handle that already: > > http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=a90110c61073eab95d1986322693c2b9a8a6a5f6 > Ok, the fix avoids the crash but perf_events support for AMD is still broken. The root of the problem is elsewhere as I pointed out last week. Peter proposed a patch today and I think this would be enough to avoid the crash and have perf_events working again on AMD.