From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Kiszka Subject: Re: [PATCH v3 2/4] genirq: Inform handler about line sharing state Date: Wed, 15 Dec 2010 00:01:12 +0100 Message-ID: <4D07F738.8080204@web.de> References: Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig245298DB062D05CC2ABA9269" Cc: Avi Kivity , Marcelo Tosatti , linux-kernel@vger.kernel.org, kvm , Tom Lyon , Alex Williamson , "Michael S. Tsirkin" , Jan Kiszka To: Thomas Gleixner Return-path: In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org List-Id: kvm.vger.kernel.org This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig245298DB062D05CC2ABA9269 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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 =3D __setup_irq(irq, desc, action); >> chip_bus_sync_unlock(desc); >> =20 >> - if (retval) >> + if (retval) { >> + if (desc->action && !desc->action->next) >> + desc->irq_data.drv_status &=3D ~IRQS_SHARED; >=20 > 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. Jan --------------enig245298DB062D05CC2ABA9269 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.15 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org/ iEYEARECAAYFAk0H9zgACgkQitSsb3rl5xSqaQCgllV4iEoXl3BH8cypYhb42kTW EdYAoKyTZ0Cn/Sj6N3K/zoYAtnApFXC3 =Q03i -----END PGP SIGNATURE----- --------------enig245298DB062D05CC2ABA9269--