From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932542AbcHKPv1 (ORCPT ); Thu, 11 Aug 2016 11:51:27 -0400 Received: from foss.arm.com ([217.140.101.70]:54984 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932222AbcHKPv0 (ORCPT ); Thu, 11 Aug 2016 11:51:26 -0400 Subject: Re: [Regression] "irqdomain: Don't set type when mapping an IRQ" breaks nexus7 gpio buttons To: John Stultz References: <57AC3959.2030404@arm.com> <57AC7388.6070900@arm.com> Cc: Jon Hunter , Linus Walleij , Thomas Gleixner , lkml , Bjorn Andersson From: Marc Zyngier Organization: ARM Ltd Message-ID: <57AC9EFB.3030302@arm.com> Date: Thu, 11 Aug 2016 16:51:23 +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: 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 16:32, John Stultz wrote: > On Thu, Aug 11, 2016 at 5:46 AM, Marc Zyngier wrote: > >> Nailed the sucker: >> >> diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c >> index b4c1bc7..9d7284a 100644 >> --- a/kernel/irq/chip.c >> +++ b/kernel/irq/chip.c >> @@ -820,6 +820,18 @@ __irq_do_set_handler(struct irq_desc *desc, irq_flow_handler_t handle, >> desc->name = name; >> >> if (handle != handle_bad_irq && is_chained) { >> + int ret; >> + >> + ret = __irq_set_trigger(desc, >> + irqd_get_trigger_type(&desc->irq_data)); >> + WARN_ON(ret); >> + /* >> + * This is beyond ugly: .set_type may have overridden >> + * the flow, not not knowing that we're dealing with a >> + * chained handler. Reset it here because we know >> + * better. >> + */ >> + desc->handle_irq = handle; >> irq_settings_set_noprobe(desc); >> irq_settings_set_norequest(desc); >> irq_settings_set_nothread(desc); >> >> Linus, Jon: Can you please confirm this fixes your respective issues? > > Yep. That works for me! > > Tested-by: John Stultz > > Thanks so much for hunting this down! Thanks for the report and the testing! I'll post the final patch shortly. tglx being away for a couple of weeks, it may take some time before this hits mainline though. M. -- Jazz is not dead. It just smells funny...