From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932645AbcHKLxK (ORCPT ); Thu, 11 Aug 2016 07:53:10 -0400 Received: from foss.arm.com ([217.140.101.70]:53647 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932236AbcHKLxH (ORCPT ); Thu, 11 Aug 2016 07:53:07 -0400 Subject: Re: [Regression] "irqdomain: Don't set type when mapping an IRQ" breaks nexus7 gpio buttons To: Jon Hunter , Linus Walleij , John Stultz References: <57AC3959.2030404@arm.com> <57AC654E.8090000@arm.com> Cc: Thomas Gleixner , lkml , Bjorn Andersson From: Marc Zyngier Organization: ARM Ltd Message-ID: <57AC6720.9090404@arm.com> Date: Thu, 11 Aug 2016 12:53:04 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Icedove/38.7.0 MIME-Version: 1.0 In-Reply-To: <57AC654E.8090000@arm.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/08/16 12:45, Marc Zyngier wrote: > On 11/08/16 10:47, Jon Hunter wrote: >> >> On 11/08/16 09:37, Marc Zyngier wrote: >>> On 08/08/16 22:48, Linus Walleij wrote: >>>> On Sat, Aug 6, 2016 at 1:45 AM, John Stultz wrote: >>>> >>>>> @@ -614,7 +615,11 @@ unsigned int irq_create_fwspec_mapping(struct >>>>> irq_fwspec *fwspec) >>>>> * it now and return the interrupt number. >>>>> */ >>>>> if (irq_get_trigger_type(virq) == IRQ_TYPE_NONE) { >>>>> - irq_set_irq_type(virq, type); >>>>> + irq_data = irq_get_irq_data(virq); >>>>> + if (!irq_data) >>>>> + return 0; >>>>> + >>>>> + irqd_set_trigger_type(irq_data, type); >>>>> return virq; >>>>> } >>>>> >>>>> If I revert just that, it works again. >>>> >>>> This makes my platform work too. >>>> Tested-by: Linus Walleij >>> >>> Hmmm. I'm now booting your kernel on the APQ8060, and reverting this >>> hunk doesn't fix it for me. I'm confused... >>> >>> The interesting part is this: >>> 109: 100000 0 msmgpio 88 Level (null) >> >> 88 is the pm8058 parent interrupt and so I am surprised you would even >> see this in /proc/interrupts as it should be a chained interrupt, right? > > That's because it repeatedly fires without a proper handler, and only > appears then. > >> Are you seeing this with all the ethernet updates for the APQ8060 in >> Linus' branch? I am curious what you see with stock v4.8-rc1 and if >> interrupts work ok with the change I had proposed. Hard to tell if there >> is more than one issue here. > > (mostly) stock v4.8-rc1 exhibits the same issue, and your fix doesn't > help this particular issue. Reverting your fix *and* applying the above > revert makes it work again. Which is just papering over the issue, as it > only does something when the interrupt is seen for a second time. Also: this behaviour only affects the second cascade (from the pm8058 to the tlmm). I can perfectly configure the first one (from the tlmm to the GIC) with your fix. M. -- Jazz is not dead. It just smells funny...