From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758760AbYDGWTr (ORCPT ); Mon, 7 Apr 2008 18:19:47 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1758569AbYDGWTd (ORCPT ); Mon, 7 Apr 2008 18:19:33 -0400 Received: from one.firstfloor.org ([213.235.205.2]:37145 "EHLO one.firstfloor.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758558AbYDGWTc (ORCPT ); Mon, 7 Apr 2008 18:19:32 -0400 Date: Tue, 8 Apr 2008 00:23:52 +0200 From: Andi Kleen To: Jiri Kosina Cc: Andi Kleen , Zdenek Kabelac , Kernel development list , Ingo Molnar , Thomas Gleixner , rjw@sisk.pl Subject: Re: BUG: using smp_processor_id() during suspend with 2.6.25-rc8 Message-ID: <20080407222352.GG16647@one.firstfloor.org> References: <87abk5qq6u.fsf@basil.nowhere.org> <20080407221210.GF16647@one.firstfloor.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.1i Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Apr 08, 2008 at 12:11:17AM +0200, Jiri Kosina wrote: > On Tue, 8 Apr 2008, Andi Kleen wrote: > > > > I know. However preempt_count is a little bit inconsistent in such cases > > > though. > > And? interrupts off beats preempt count anyways. Why did you write the > > patch? Was there a (incorrect) warning triggered? > > Reported at http://lkml.org/lkml/2008/4/7/130 > > BTW is also mce_init() (called from mce_resume()) guaranteed to run with > IRQs off? [cc rafael] The mce resume is a sysdev. sysdevs were always supposed to run completely with interrupts off. If they don't anymore that's some kind of higher level resume code bug which you need to fix there, not hack around in the low level code. If it does that it likely broke more code too. Obviously turning on preemption anywhere around the machine check is fatal because it touches CPU state and if you reschedule you could switch to another CPU and change or access the wrong CPU's state. -Andi