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 X-Spam-Level: X-Spam-Status: No, score=-5.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A0489C433DB for ; Thu, 28 Jan 2021 15:08:05 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 587F264DFA for ; Thu, 28 Jan 2021 15:08:05 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 587F264DFA Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Type:Cc: List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: In-Reply-To:MIME-Version:References:Message-ID:Subject:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=bGnp2ydaQROjBSiutwdBMTSN5F+YFvyAEWXVJuG253M=; b=yg3wkzvuHSq7bJ3dC6nVDbMT/ RXYQ0dMd92MxYX17yjlseYFA/FbAf9BBKSgnG3cGYbNrCyTgA2yEzNEO8W4u1TfQZF9FZC/MLzTtp vRc/oeAXKKX9N/P6UCM4YqdBL+2N0NeW1OhUSSxKbVyPqWWb4gFVMEs8SyNjDyPQd/5VK8a8WMquC +5O9JQaXdhYkskW9tw/oBuLd+Db0u7dmCPFP9H2oLqFxhRPOBHpnz2go587HDpm9qS5jIXMSU80Xz 25u8S9l1Kpvwr99Uk6jWnpe1VAORa4HzO+FCJqo4WFPZGF1BMSChn5zmmZ91XLkQ8YAcXxM617LlG ayQVJjyaw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l58sd-0002nO-Aw; Thu, 28 Jan 2021 15:06:43 +0000 Received: from mail.kernel.org ([198.145.29.99]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1l58sa-0002n0-LG for linux-arm-kernel@lists.infradead.org; Thu, 28 Jan 2021 15:06:41 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id 3702F64DFA; Thu, 28 Jan 2021 15:06:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1611846399; bh=xk1dd2N7bT2aaQG6gk2VFDmTx80tdLgmCS2g5QD6Vfg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=O6Qj/jHawGkiZqPgEDvLj9ZPJP6+o8nSO8qVzILGm0EHlGi5Z8yj3Ddvbrv7HkFx3 uLgqQN82C5Vy9RuaoKW46TXPdoh5cdTsCr7IfzLZ2sAvdoFo4B1vjAlANA+lcg5wwa I0JPWfOmnqbOQAczwbWWIOhOg1bXToaz/wY1SuCJfYA/5FPylqbhh/oWB76W5SPit2 oJaHd3NyeZh6DZElOO9Sw68M+z3IERMbUjLFff5jxNq+zZXIpTXQR0WsYQVT8LRmC/ TnaNNQjrjr+U/mC+Vw3wFUnM0QtzC2HmFS1deKAGjRuDksxGPXLfJEaKTWGy1xhLVg EWZsXImulRUfw== Date: Thu, 28 Jan 2021 15:05:55 +0000 From: Mark Brown To: Andre Przywara Subject: Re: [PATCH v5 05/20] Input: axp20x-pek: Bail out if AXP has no interrupt line connected Message-ID: <20210128150555.GD4537@sirena.org.uk> References: <20210127172500.13356-1-andre.przywara@arm.com> <20210127172500.13356-6-andre.przywara@arm.com> <20210128104627.76b35a5c@slackpad.fritz.box> <20210128113601.GA4537@sirena.org.uk> <20210128123136.417eea7c@slackpad.fritz.box> MIME-Version: 1.0 In-Reply-To: <20210128123136.417eea7c@slackpad.fritz.box> X-Cookie: Do not pick the flowers. User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210128_100640_869429_86DFAF00 X-CRM114-Status: GOOD ( 19.89 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jernej Skrabec , Samuel Holland , Yangtao Li , linux-sunxi@googlegroups.com, Dmitry Torokhov , linux-kernel@vger.kernel.org, Maxime Ripard , Chen-Yu Tsai , =?iso-8859-1?Q?Cl=E9ment_P=E9ron?= , linux-input@vger.kernel.org, Shuosheng Huang , Lee Jones , linux-arm-kernel@lists.infradead.org, Icenowy Zheng Content-Type: multipart/mixed; boundary="===============1304175024704035135==" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org --===============1304175024704035135== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="pQhZXvAqiZgbeUkD" Content-Disposition: inline --pQhZXvAqiZgbeUkD Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Thu, Jan 28, 2021 at 12:31:36PM +0000, Andre Przywara wrote: > Mark Brown wrote: > > It sounds like you're trying to register an IRQ chip with a somehow > > bogus configuration? > I patched the AXP MFD driver [1] to skip the regmap-irq creation when no > interrupts DT property was found, but this NULL pointer now > understandably confuses the -pek driver, and leads to this crash: > http://lists.infradead.org/pipermail/linux-arm-kernel/2021-January/634969.html > Hence I wanted to plug this hole, which seems useful regardless of this > particular issue. The driver code here looks pretty confused. It appears to be looking up the interrupt to use from a resource (which is what I'd expect for a MFD child) then for reasons I can't fathom trying to pass that resource into regmap_irq_get_virq() which is at best going to just return the value that was passed in but may potentially end up just returning a random interrupt other than the one that was asked for since we're passing in a global interrupt number rather than a controller relative one. I really can't tell what's supposed to be going on there. A driver should either use resources or it should use regmap_irq_get_virq(), using both is a bug. The MFD for this device is also just plain buggy in that it is providing IRQ resources to the children when there is in fact no support for the interrupts on the device in the system. This means that the MFD core sees that it has no interrupt domain, assumes that those interrupt resources are in fact absolute interrupt numbers and passes them straight through to the children. This means that the children will just be requesting random interrupts in the system which may actually exist and be requestable which probably isn't going to end well. When there is no interrupt controller the parent should not be trying to supply interrupt resources to the children at all. --pQhZXvAqiZgbeUkD Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmAS0tIACgkQJNaLcl1U h9AEMwf/eFfLeC/kkFhgn9OSqbusFPI39IMYbjPipgnGjB5lbEJDgqfI5u2yChVO FlxvhKEY40Qhu4FFuT/yx16fJJi6AzPbuKuCstGQWdpO7njXX6GgF2Zecc+bvr93 MBCpXPizJnmoddwMAxQ5mKFuQUkn1QBtoFWQ+5wcAh10X4Pl3PyA3vpQgqzaErvT qNp+eLszYjPfRlvWBWogxKtJ68tewcA1H8dHTMbGax4CfUhiKDvuZ99vjryK3Kc4 pmZSZzzi3gU33uz/zCc+Op1eqzDsXzEuznt5ip2B8UKJ9QGOEeYKU9/R8+kldKKb iZayujeDX/cpnEggntD5az/CLmLQ4g== =HQTd -----END PGP SIGNATURE----- --pQhZXvAqiZgbeUkD-- --===============1304175024704035135== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel --===============1304175024704035135==--