From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2E67EC433EF for ; Thu, 30 Sep 2021 14:11:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0804A60FC0 for ; Thu, 30 Sep 2021 14:11:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1351849AbhI3ONT (ORCPT ); Thu, 30 Sep 2021 10:13:19 -0400 Received: from mail.kernel.org ([198.145.29.99]:57016 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1351826AbhI3ONR (ORCPT ); Thu, 30 Sep 2021 10:13:17 -0400 Received: from disco-boy.misterjones.org (disco-boy.misterjones.org [51.254.78.96]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 1791560FC0; Thu, 30 Sep 2021 14:11:35 +0000 (UTC) Received: from sofa.misterjones.org ([185.219.108.64] helo=why.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1mVwmb-00E0In-58; Thu, 30 Sep 2021 15:11:33 +0100 Date: Thu, 30 Sep 2021 15:11:32 +0100 Message-ID: <87y27erw4r.wl-maz@kernel.org> From: Marc Zyngier To: Daniel Palmer Cc: Linus Walleij , DTML , Rob Herring , Thomas Gleixner , linux-arm-kernel , Romain Perier Subject: Re: [PATCH 2/3] irqchip: SigmaStar SSD20xD gpi In-Reply-To: References: <20210914100415.1549208-1-daniel@0x0f.com> <20210914100415.1549208-3-daniel@0x0f.com> <87zgs7vavl.wl-maz@kernel.org> <87wnnbv6ac.wl-maz@kernel.org> <87lf3quydn.wl-maz@kernel.org> <874ka2tdqe.wl-maz@kernel.org> <871r56tbir.wl-maz@kernel.org> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/27.1 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: daniel@0x0f.com, linus.walleij@linaro.org, devicetree@vger.kernel.org, robh+dt@kernel.org, tglx@linutronix.de, linux-arm-kernel@lists.infradead.org, romain.perier@gmail.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org On Thu, 30 Sep 2021 14:59:24 +0100, Daniel Palmer wrote: > > Hi Marc, > > On Thu, 30 Sept 2021 at 22:53, Marc Zyngier wrote: > > Somehow, the handler for this interrupt is set to handle_bad_irq(), > > which probably isn't what you want. You'll have to find out who sets > > this (there is a comment about that in gpiolib.c, but I haven't had a > > chance to find where this is coming from). > > > > Do you happen to set it in your driver? > > The gpio driver (gpio-msc313.c) sets it during probe: > > gpioirqchip = &gpiochip->irq; > gpioirqchip->chip = &msc313_gpio_irqchip; > gpioirqchip->fwnode = of_node_to_fwnode(dev->of_node); > gpioirqchip->parent_domain = parent_domain; > gpioirqchip->child_to_parent_hwirq = match_data->child_to_parent_hwirq; > gpioirqchip->populate_parent_alloc_arg = match_data->populate_parent_fwspec; > gpioirqchip->handler = handle_bad_irq; > gpioirqchip->default_type = IRQ_TYPE_NONE; Right. I have no idea why this is a requirement, and I would normally set it to whatever is the normal flow handler on this HW, but this looks like the GPIO subsystem has some expectations here. I'll let Linus comment on it. M. -- Without deviation from the norm, progress is not possible. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7487DC433EF for ; Thu, 30 Sep 2021 14:13:32 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 34CB161268 for ; Thu, 30 Sep 2021 14:13:32 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 34CB161268 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Subject:Cc:To:From:Message-ID:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=WcGrTv1aUGkLQPw1KjAyFuLIhnA3Urt6Pq6nXZ9Viec=; b=028Fs+S8t8BNJ+ xpbtG+76rEu+7jRHu1PB5Lc+xH/0AdB7UsU4vuGgbEXiy154Om93g50WkxAwCJ9tlBnbpihZOp87G L/tlgWhJgVR8mFV25DNxaj9uKUNjv546fqoj0MhLZKPi8o56W+Q01/dOu9kzDdDBdCf68DqoBCcvG IBQ0u/KfGhyESvIBuxWqRLExfGWHoompVBu01OURy15ETpqVxg7ZDgIJk5mJ0Q7ww5sJf/SJs8Bnz R/THgBkmatVr7w9JPgNpYF0u87JDCXKwtDT9bsSFtJP4OrSOi+brOt5hiobg4FhPjqLmE6ObquRMP ahDZ+tjsBUPUxazNdyWA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mVwmh-00EewP-9q; Thu, 30 Sep 2021 14:11:39 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mVwmd-00Eevi-CF for linux-arm-kernel@lists.infradead.org; Thu, 30 Sep 2021 14:11:36 +0000 Received: from disco-boy.misterjones.org (disco-boy.misterjones.org [51.254.78.96]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 1791560FC0; Thu, 30 Sep 2021 14:11:35 +0000 (UTC) Received: from sofa.misterjones.org ([185.219.108.64] helo=why.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1mVwmb-00E0In-58; Thu, 30 Sep 2021 15:11:33 +0100 Date: Thu, 30 Sep 2021 15:11:32 +0100 Message-ID: <87y27erw4r.wl-maz@kernel.org> From: Marc Zyngier To: Daniel Palmer Cc: Linus Walleij , DTML , Rob Herring , Thomas Gleixner , linux-arm-kernel , Romain Perier Subject: Re: [PATCH 2/3] irqchip: SigmaStar SSD20xD gpi In-Reply-To: References: <20210914100415.1549208-1-daniel@0x0f.com> <20210914100415.1549208-3-daniel@0x0f.com> <87zgs7vavl.wl-maz@kernel.org> <87wnnbv6ac.wl-maz@kernel.org> <87lf3quydn.wl-maz@kernel.org> <874ka2tdqe.wl-maz@kernel.org> <871r56tbir.wl-maz@kernel.org> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/27.1 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: daniel@0x0f.com, linus.walleij@linaro.org, devicetree@vger.kernel.org, robh+dt@kernel.org, tglx@linutronix.de, linux-arm-kernel@lists.infradead.org, romain.perier@gmail.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210930_071135_455507_EB34D2D2 X-CRM114-Status: GOOD ( 22.76 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, 30 Sep 2021 14:59:24 +0100, Daniel Palmer wrote: > > Hi Marc, > > On Thu, 30 Sept 2021 at 22:53, Marc Zyngier wrote: > > Somehow, the handler for this interrupt is set to handle_bad_irq(), > > which probably isn't what you want. You'll have to find out who sets > > this (there is a comment about that in gpiolib.c, but I haven't had a > > chance to find where this is coming from). > > > > Do you happen to set it in your driver? > > The gpio driver (gpio-msc313.c) sets it during probe: > > gpioirqchip = &gpiochip->irq; > gpioirqchip->chip = &msc313_gpio_irqchip; > gpioirqchip->fwnode = of_node_to_fwnode(dev->of_node); > gpioirqchip->parent_domain = parent_domain; > gpioirqchip->child_to_parent_hwirq = match_data->child_to_parent_hwirq; > gpioirqchip->populate_parent_alloc_arg = match_data->populate_parent_fwspec; > gpioirqchip->handler = handle_bad_irq; > gpioirqchip->default_type = IRQ_TYPE_NONE; Right. I have no idea why this is a requirement, and I would normally set it to whatever is the normal flow handler on this HW, but this looks like the GPIO subsystem has some expectations here. I'll let Linus comment on it. M. -- Without deviation from the norm, progress is not possible. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel