Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752283Ab0LOJiU (ORCPT ); Wed, 15 Dec 2010 04:38:20 -0500 Received: from thoth.sbs.de ([192.35.17.2]:22703 "EHLO thoth.sbs.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752146Ab0LOJiS (ORCPT ); Wed, 15 Dec 2010 04:38:18 -0500 Message-ID: <4D088C77.8030701@siemens.com> Date: Wed, 15 Dec 2010 10:37:59 +0100 From: Jan Kiszka User-Agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); de; rv:1.8.1.12) Gecko/20080226 SUSE/2.0.0.12-1.1 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666 MIME-Version: 1.0 To: Thomas Gleixner 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 References: <4D07F738.8080204@web.de> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1416 Lines: 41 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. Jan -- Siemens AG, Corporate Technology, CT T DE IT 1 Corporate Competence Center Embedded Linux -- 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/