Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752573AbdGFQgt (ORCPT ); Thu, 6 Jul 2017 12:36:49 -0400 Received: from mailapp01.imgtec.com ([195.59.15.196]:28843 "EHLO imgpgp01.kl.imgtec.org" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751828AbdGFQgr (ORCPT ); Thu, 6 Jul 2017 12:36:47 -0400 X-PGP-Universal: processed; by imgpgp01.kl.imgtec.org on Thu, 06 Jul 2017 18:47:00 +0100 From: Paul Burton To: Thomas Gleixner , CC: Jason Cooper , Marc Zyngier , LKML , Matt Redfearn , Ralf Baechle Subject: Re: [PATCH v2] irqchip/mips-gic: Add missing shared interrupt handler Date: Thu, 6 Jul 2017 09:36:27 -0700 Message-ID: <1899006.mg0Xau33DN@np-p-burton> Organization: Imagination Technologies In-Reply-To: References: <20170706092058.20079-1-jrjang@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart14726745.kMqSC5350R"; micalg=pgp-sha256; protocol="application/pgp-signature" X-Originating-IP: [10.20.1.33] X-ESG-ENCRYPT-TAG: 1b7d744b Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3668 Lines: 98 --nextPart14726745.kMqSC5350R Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Hello, On Thursday, 6 July 2017 05:03:59 PDT Thomas Gleixner wrote: > On Thu, 6 Jul 2017, jrjang@gmail.com wrote: > > CC+ MIPS folks. There is a reason WHY I added them to my previous reply. Thanks Thomas. > > From: Jun-Ru Chang > > > > Commit b87281e7f205 ("irqchip/mips-gic: Remove device IRQ domain") > > removes the device IRQ domain and uses gic_irq_domain_alloc() to > > allocate the shared/local domain. However, the shared interrupt handler > > is not set after allocating. It causes that the system hangs with > > "unexpected IRQ" messages disaply. I don't see the driver doing irq_set_handler(..., handle_level_irq) for device interrupts prior to b87281e7f205 ("irqchip/mips-gic: Remove device IRQ domain"), so I'm confused about 1) why this is a problem given that we don't see it on our systems and 2) why you point the finger at that commit. What system are you using? I presume it's a device interrupt you're seeing issues with? How are you using it? Via device tree or otherwise? Can you provide directions to reproduce this problem? > > And commit 8ada00a650ec ("irqchip/mips-gic: Replace static map with > > dynamic") renames gic_irq_domain_alloc() to gic_irq_domain_map() to set > > up the handler and chip. Fix this by setting the handle_level_irq > > handler for shared interrupts. I also don't understand from this why that commit is relevant either. That commit didn't remove any calls to irq_set_handler, which is what your patch adds. You outline above some of what 8ada00a650ec ("irqchip/mips-gic: Replace static map with dynamic") does, but not why it's a problem. It's difficult to see why you think it needs fixing if you don't describe why you think it's broken. Thanks, Paul > > > > Fixes: b87281e7f205 ("irqchip/mips-gic: Remove device IRQ domain") > > Signed-off-by: Jun-Ru Chang > > --- > > Change in v2: > > - changed commit message > > > > drivers/irqchip/irq-mips-gic.c | 1 + > > 1 file changed, 1 insertion(+) > > > > diff --git a/drivers/irqchip/irq-mips-gic.c > > b/drivers/irqchip/irq-mips-gic.c index 929f8558bf1c..0a5fb30deb17 100644 > > --- a/drivers/irqchip/irq-mips-gic.c > > +++ b/drivers/irqchip/irq-mips-gic.c > > @@ -716,6 +716,7 @@ static int gic_irq_domain_map(struct irq_domain *d, > > unsigned int virq,> > > if (err) > > > > return err; > > > > + irq_set_handler(virq, handle_level_irq); > > > > return gic_shared_irq_domain_map(d, virq, hwirq, 0); > > > > } --nextPart14726745.kMqSC5350R Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part. Content-Transfer-Encoding: 7Bit -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEELIGR03D5+Fg+69wPgiDZ+mk8HGUFAlleZwsACgkQgiDZ+mk8 HGXDfQ//dL46Ji5wmsZkxjK+ZaAtJTc7J/CjwhTF0kzW3NnPe8lvAE8YOoOhOCio VHHygX6YhYcT3l7JtHrxbrex0LmQhyzcqUevYKZdgzmk3gToQbdK/Q3hVVTiy0ru CE/jeJh5Hj0+77FujUPlEFgv0iLVlwmg8GHwBAQxAelaRaigb5L8e5RUP6OwwerM WOkLfEAJqCWcYki1FBYx9L5xOg3o6EvuQmXnOq/fHkIO9KgTqt3pMrUbSvoN6DNH mhJSJTK4ADF/bKGo/b2bm/+u1AN4lOKjB6pOB1pLAxU9M8iCFh3E6k49HtqL/PVd xOCU234VOFYsanitY0BMRy15gnuXUxDfxHpbq/0z6csZ0XPQBG2sQEJiGRxsXy5D 28sYiJM6dcyaWI1VSD4+kYzt2knNjraugsey4FDNfeowJRqShwle/znHsqaIUNL4 OckMxK8qK+QGLF3w07TRWdwepfayway5v/z4bUpahDYmEPmDcOXyFhixPLue53S9 yGIWu1NLxA/QdhWFyAW78xZ+xj1dx5drMWkfjVfkt6AqzYYxkdR6FoAdHdt/BMtn P7HUIwHIqaUPZuymQVvTeNNVdBCD5dDygYfjXF+Mi1Ol3jm8CX/Cvb01g1vi2X5G wWyjLhYyyvgVC5KEi2EHDHvjHIzN0ziIqgmsu4Hyx1pGLr/SU+0= =wkPD -----END PGP SIGNATURE----- --nextPart14726745.kMqSC5350R--