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 C511EC433F5 for ; Thu, 30 Sep 2021 13:56:49 +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 619EF61390 for ; Thu, 30 Sep 2021 13:56:49 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 619EF61390 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=nzqRL+3icjnsO20lJ22gcvQoFLdHpEfuXp5E7f2Y/Lk=; b=K0D3lPk+Mk48uO UYYbnKh9U/6FOmCg+zo+uZOWUAfXCDfUu+MyzKqo9uL2bMj/AGWDjplZUwoXv2Q0baqRp489eEUsN eOIiRhoTFYojkBM/wqhSpIqzoUBGPfm73mzfGPY3sRONQn4tuZ4H5Smpv5PhS0WCR6GE0b4Xz3qJp 0tXuXI0clC6ELsdf21XkMVQ2gmR3WFjS12z2VbmtJENTystRyokfC1qvBZKUrvZYS/KEEzOlDVAbZ WIRri5282MU5VXgilywnPZFUE7tV5xg/rv+Gvpo40sHz8muoLSeTDLMppJv+1PB9X3cd4w9Fgo1gg ssyyUF69/3q9jBWB6BuQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mVwVW-00EaBD-3u; Thu, 30 Sep 2021 13:53:54 +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 1mVwVS-00EaAc-Qm for linux-arm-kernel@lists.infradead.org; Thu, 30 Sep 2021 13:53:52 +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 88D3361440; Thu, 30 Sep 2021 13:53:50 +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 1mVwVQ-00E025-OM; Thu, 30 Sep 2021 14:53:48 +0100 Date: Thu, 30 Sep 2021 14:53:48 +0100 Message-ID: <871r56tbir.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> 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_065350_920828_A3C30518 X-CRM114-Status: GOOD ( 23.67 ) 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:36:52 +0100, Daniel Palmer wrote: > > Hi Marc, > > On Thu, 30 Sept 2021 at 22:06, Marc Zyngier wrote: > > No, this is the right spot if you really need to set the handler. But > > it should really be after the parent allocation (see below for > > something totally untested). > > Your change resolves the null pointer difference when enabling the > interrupt but when it triggers the below happens. > This might just be my driver so I'll try to debug. > > Thanks, > > Daniel > > # gpiomon -r 0 44 > [ 61.770519] irq 66, desc: (ptrval), depth: 0, count: 0, unhandled: 0 > [ 61.770646] > [ 61.770659] ============================= > [ 61.770670] [ BUG: Invalid wait context ] > [ 61.770683] 5.15.0-rc2+ #2583 Not tainted > [ 61.770702] ----------------------------- > [ 61.770712] swapper/0/0 is trying to lock: > [ 61.770729] c1789eb0 (&port_lock_key){-.-.}-{3:3}, at: > serial8250_console_write+0x1b0/0x254 > [ 61.770840] other info that might help us debug this: > [ 61.770853] context-{2:2} > [ 61.770868] 2 locks held by swapper/0/0: > [ 61.770889] #0: c10189ec (console_lock){+.+.}-{0:0}, at: > vprintk_emit+0xa4/0x200 > [ 61.770986] #1: c1018b44 (console_owner){-...}-{0:0}, at: > console_unlock+0x1e8/0x4b4 > [ 61.771080] stack backtrace: > [ 61.771093] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 5.15.0-rc2+ #2583 > [ 61.771130] Hardware name: MStar/Sigmastar Armv7 (Device Tree) > [ 61.771156] [] (unwind_backtrace) from [] > (show_stack+0x10/0x14) > [ 61.771235] [] (show_stack) from [] > (dump_stack_lvl+0x58/0x70) > [ 61.771312] [] (dump_stack_lvl) from [] > (__lock_acquire+0x384/0x16a0) > [ 61.771394] [] (__lock_acquire) from [] > (lock_acquire+0x2a0/0x320) > [ 61.771470] [] (lock_acquire) from [] > (_raw_spin_lock_irqsave+0x5c/0x70) > [ 61.771542] [] (_raw_spin_lock_irqsave) from [] > (serial8250_console_write+0x1b0/0x254) > [ 61.771620] [] (serial8250_console_write) from > [] (console_unlock+0x3fc/0x4b4) > [ 61.771699] [] (console_unlock) from [] > (vprintk_emit+0x1d0/0x200) > [ 61.771769] [] (vprintk_emit) from [] > (vprintk_default+0x1c/0x24) > [ 61.771840] [] (vprintk_default) from [] > (_printk+0x18/0x28) > [ 61.771914] [] (_printk) from [] > (handle_bad_irq+0x44/0x22c) > [ 61.771991] [] (handle_bad_irq) from [] > (handle_irq_desc+0x24/0x34) > [ 61.772066] [] (handle_irq_desc) from [] > (ssd20xd_gpi_chainedhandler+0xb4/0xc4) > [ 61.772147] [] (ssd20xd_gpi_chainedhandler) from > [] (handle_irq_desc+0x24/0x34) > [ 61.772223] [] (handle_irq_desc) from [] > (handle_domain_irq+0x40/0x54) > [ 61.772299] [] (handle_domain_irq) from [] > (gic_handle_irq+0x60/0x6c) > [ 61.772372] [] (gic_handle_irq) from [] > (__irq_svc+0x4c/0x64) 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? 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