From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755027AbcDAOCW (ORCPT ); Fri, 1 Apr 2016 10:02:22 -0400 Received: from bh-25.webhostbox.net ([208.91.199.152]:42614 "EHLO bh-25.webhostbox.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752549AbcDAOCV (ORCPT ); Fri, 1 Apr 2016 10:02:21 -0400 Date: Fri, 1 Apr 2016 07:02:18 -0700 From: Guenter Roeck To: Linus Walleij Cc: Russell King , "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH] ARM: sa1100: Initialize gpio after gpio subsystem has been initialized Message-ID: <20160401140218.GA14502@roeck-us.net> References: <1459275349-11356-1-git-send-email-linux@roeck-us.net> <20160331162116.GB5605@roeck-us.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-Authenticated_sender: guenter@roeck-us.net X-OutGoing-Spam-Status: No, score=-1.0 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - bh-25.webhostbox.net X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - roeck-us.net X-Get-Message-Sender-Via: bh-25.webhostbox.net: authenticated_id: guenter@roeck-us.net X-Authenticated-Sender: bh-25.webhostbox.net: guenter@roeck-us.net X-Source: X-Source-Args: X-Source-Dir: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Apr 01, 2016 at 10:04:57AM +0200, Linus Walleij wrote: > On Thu, Mar 31, 2016 at 6:21 PM, Guenter Roeck wrote: > > On Tue, Mar 29, 2016 at 11:15:49AM -0700, Guenter Roeck wrote: > >> The sa1100 gpio driver was initialized from interrupt initialization code, > >> which is earlier than the gpio subsystem is initialized. Since commit > >> ff2b13592299 ("gpio: make the gpiochip a real device"), this is fatal > >> and causes the system to crash. > >> > >> The sa1100 gpio driver must be initialized prior to arch_initcall, since > >> its gpio pins are used in arch_initcall code, but after the gpio subsystem > >> is initialized (core_initcall). Initialize it with postcore_initcall. > >> > >> Fixes: ff2b13592299 ("gpio: make the gpiochip a real device") > >> Cc: Linus Walleij > >> Signed-off-by: Guenter Roeck > > > > Please ignore/drop this patch - a better (cleaner) fix is in the works > > for gpiolib. > > This delivers though. I tested it on my also regressing iPAQ. > I am a bit concerned that the gpio initialization was that early on purpose, and that by moving it we might miss some use cases. I did not find any, but that doesn't mean that there are none. Without knowing _why_ the initialization was that early, I would prefer not to touch the code if it can be avoided. Thanks, Guenter