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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 13FDBC61D97 for ; Mon, 30 Jan 2023 17:05:37 +0000 (UTC) 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:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=rOCyf0JS8eG5IM1vGkxF+hzggLhWzuZIhIXWcHZgWLs=; b=bMX4uRpMtN/h3b YFbNobVBbz0AV4eQEDQk09ojew9OKswjBP7Zz7LUekO1yBXRcd3CyCyVuOYiplEpY3EaTGUxDztYf FQXi8z4Xri5nkhgON4XcP/VxvA6tcXwa+TdbShYQv2aEDTLKnAnwKbVbzWJLCKQ/gXAuBVtgKBu/u 5kQnrHQ0URRPToSKkQ4ioWNER4ZGNORS3FudwpvSMhITGbf9BDdBa2RCNzXjdkdzpx/qK3Fnh18Zd Yf0ME7jHGUfmvb2nCB8aXu7JeMWJbrijih4r2uQXWTAQxU/Jlg+O1lyAnrxfhqiQXVTah++jq8BGf Qn9OfzZyvGTglblSvrHw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pMXZD-004MMy-AZ; Mon, 30 Jan 2023 17:03:39 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pMXWb-004M3e-H6 for linux-arm-kernel@lists.infradead.org; Mon, 30 Jan 2023 17:00:59 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id F00131758; Mon, 30 Jan 2023 06:32:46 -0800 (PST) Received: from bogus (unknown [10.57.77.84]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 572E63F882; Mon, 30 Jan 2023 06:31:56 -0800 (PST) Date: Mon, 30 Jan 2023 14:31:53 +0000 From: Sudeep Holla To: Saravana Kannan Cc: Greg Kroah-Hartman , "Rafael J. Wysocki" , Sudeep Holla , Cristian Marussi , Linus Walleij , Bartosz Golaszewski , Thomas Gleixner , Marc Zyngier , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Rob Herring , Frank Rowand , Geert Uytterhoeven , Magnus Damm , Len Brown , Andy Shevchenko , Daniel Scally , Heikki Krogerus , Sakari Ailus , Tony Lindgren , Linux Kernel Functional Testing , Naresh Kamboju , Abel Vesa , Alexander Stein , Geert Uytterhoeven , John Stultz , Doug Anderson , Guenter Roeck , Dmitry Baryshkov , Maxim Kiselev , Maxim Kochetkov , Miquel Raynal , Luca Weiss , Colin Foster , Martin Kepplinger , Jean-Philippe Brucker , kernel-team@android.com, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-acpi@vger.kernel.org Subject: Re: [PATCH v2 04/11] gpiolib: Clear the gpio_device's fwnode initialized flag before adding Message-ID: <20230130143153.67dsxn4lugfetfwb@bogus> References: <20230127001141.407071-1-saravanak@google.com> <20230127001141.407071-5-saravanak@google.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20230127001141.407071-5-saravanak@google.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230130_090057_647914_3977FD54 X-CRM114-Status: GOOD ( 21.04 ) 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, Jan 26, 2023 at 04:11:31PM -0800, Saravana Kannan wrote: > Registering an irqdomain sets the flag for the fwnode. But having the > flag set when a device is added is interpreted by fw_devlink to mean the > device has already been initialized and will never probe. This prevents > fw_devlink from creating device links with the gpio_device as a > supplier. So, clear the flag before adding the device. > > Signed-off-by: Saravana Kannan > Acked-by: Bartosz Golaszewski > --- > drivers/gpio/gpiolib.c | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c > index 939c776b9488..b23140c6485f 100644 > --- a/drivers/gpio/gpiolib.c > +++ b/drivers/gpio/gpiolib.c > @@ -578,6 +578,12 @@ static int gpiochip_setup_dev(struct gpio_device *gdev) > { > int ret; > > + /* > + * If fwnode doesn't belong to another device, it's safe to clear its > + * initialized flag. > + */ > + if (!gdev->dev.fwnode->dev) > + fwnode_dev_initialized(gdev->dev.fwnode, false); This is the one causing the kernel crash during the boot on FVP which Naresh has reported. Just reverted this and was able to boot, confirming the issue with this patch. -- Regards, Sudeep _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel