Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752277Ab0LOJs5 (ORCPT ); Wed, 15 Dec 2010 04:48:57 -0500 Received: from www.tglx.de ([62.245.132.106]:58219 "EHLO www.tglx.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751722Ab0LOJs4 (ORCPT ); Wed, 15 Dec 2010 04:48:56 -0500 Date: Wed, 15 Dec 2010 10:48:25 +0100 (CET) From: Thomas Gleixner To: Jan Kiszka cc: Jan Kiszka , Avi Kivity , Marcelo Tosatti , "linux-kernel@vger.kernel.org" , kvm , Tom Lyon , Alex Williamson , "Michael S. Tsirkin" Subject: Re: [PATCH v3 2/4] genirq: Inform handler about line sharing state In-Reply-To: <4D088C77.8030701@siemens.com> Message-ID: References: <4D07F738.8080204@web.de> <4D088C77.8030701@siemens.com> User-Agent: Alpine 2.00 (LFD 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1448 Lines: 38 On Wed, 15 Dec 2010, Jan Kiszka wrote: > Am 15.12.2010 09:05, Thomas Gleixner wrote: > > On Wed, 15 Dec 2010, Jan Kiszka wrote: > > > >> Am 14.12.2010 22:46, Thomas Gleixner wrote: > >>> On Mon, 13 Dec 2010, Jan Kiszka wrote: > >>>> From: Jan Kiszka > >>>> chip_bus_lock(desc); > >>>> retval = __setup_irq(irq, desc, action); > >>>> chip_bus_sync_unlock(desc); > >>>> > >>>> - if (retval) > >>>> + if (retval) { > >>>> + if (desc->action && !desc->action->next) > >>>> + desc->irq_data.drv_status &= ~IRQS_SHARED; > >>> > >>> This is redundant. IRQS_SHARED gets set in a code path where all > >>> checks are done already. > >> > >> Nope, it's also set before entry of __setup_irq in case we call an > >> IRQF_ADAPTIVE handler. > >> > >> We need to set it that early as we may race with IRQ events for the > >> already registered handler happening between the sharing notification > >> and the actual registration of the second handler. > > > > Hmm, ok. Though the MAKE_SHAREABLE flag should be sufficient to do the > > notification. > > For notification, yes. But we need SHARED once we reenable the line > after the notification. Darn. Will think more about it. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/