Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp596371rwr; Wed, 26 Apr 2023 03:54:59 -0700 (PDT) X-Google-Smtp-Source: AKy350aaJPZ0uhBhPrEe2z7UxVIpCkoKyEeG5xube6aSrQFXqxG33y3G4UP8xRGw4zftbpftaYyu X-Received: by 2002:a17:902:bb0f:b0:1a6:a375:cb49 with SMTP id im15-20020a170902bb0f00b001a6a375cb49mr17976237plb.39.1682506498724; Wed, 26 Apr 2023 03:54:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682506498; cv=none; d=google.com; s=arc-20160816; b=V4NqNky9xT7NgMKk2hvSjPxPHaWJUgZS/yXZ4AjRewnx1BCJsHWkc5/oaTTZuMTQX3 0AGJqN8KQ8IMzsr0pAlluz5tixJHs9+LGvznnR49X/BqHggfui92CnlsTeVlxFQZs6Vm jp0BBaj4PVVeidj+zcZITgH5HmL7I0lRbtvz2l+QSiytliVnSAPAXOnLgjhR5S0cpo8x gn03rmxemwaRYqh13eaI7zHR2MH6kNBKax9RHvJ7PI/ptGiCIjcDwmIZp+Xa6btHxXZn FJguc81vKF1fpPs6uK5+NZa+/iMoOWPMXXP51Ux3qIfGF8MVTsG7SKodSq3T9dDAUGro 0MWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:date:from; bh=BMwqWHjleewi/iEEOsg9eYykbAFd9ENK0ySN0Z7lcXc=; b=mV7aWoQPQWcHuKV2Rb1wTIIilbraKUo4alblszPXRs7+Q21+4nbM24e0Tr0epJTKXR s02pF7P5UvbKjlXl9ingfJts7nQth4xMRRoqSP3cPIY27PQhf5Th58QnYbn1CfCZ0xUp izAiHuH9M5NFCuwb9X9ghA/69PO21UJNHFFGt22I0Co0o9D+p02in4CFu5+WAd2cgxpf WuVZ/vZUlV3y0fR/rZzNOEdpmeSnSC4CLgbyyb7T+1wYjOCXzIEAMSUBY94LFogmSdJW 5ncLFPdiCdYQXnnyuy+QcBZJx93qwhHAllNL7RSf6BnUk0kwEt8R+Gd6pr65n0Ne3wMT +CUA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ik1-20020a170902ab0100b001a6dc4f4a7csi15629626plb.147.2023.04.26.03.54.44; Wed, 26 Apr 2023 03:54:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240585AbjDZKyH (ORCPT + 99 others); Wed, 26 Apr 2023 06:54:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48092 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240660AbjDZKxx (ORCPT ); Wed, 26 Apr 2023 06:53:53 -0400 Received: from fgw21-7.mail.saunalahti.fi (fgw21-7.mail.saunalahti.fi [62.142.5.82]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C75034EC3 for ; Wed, 26 Apr 2023 03:53:20 -0700 (PDT) Received: from localhost (88-113-26-95.elisa-laajakaista.fi [88.113.26.95]) by fgw21.mail.saunalahti.fi (Halon) with ESMTP id 7de87a15-e420-11ed-abf4-005056bdd08f; Wed, 26 Apr 2023 13:52:53 +0300 (EEST) From: andy.shevchenko@gmail.com Date: Wed, 26 Apr 2023 13:52:51 +0300 To: Andreas Kemnade Cc: Tony Lindgren , Aaro Koskinen , linux-omap@vger.kernel.org, linux-gpio@vger.kernel.org, Bartosz Golaszewski , linux-kernel@vger.kernel.org, Linus Walleij Subject: Re: [BISECTED REGRESSION] OMAP1 GPIO breakage Message-ID: References: <20230425173241.GF444508@darkstar.musicnaut.iki.fi> <20230425201117.457f224c@aktux> <20230425183857.GG444508@darkstar.musicnaut.iki.fi> <20230425212040.5a4d5b09@aktux> <20230425193637.GH444508@darkstar.musicnaut.iki.fi> <20230425215848.247a936a@aktux> <20230426071910.GE14287@atomide.com> <20230426093920.3e9b5c61@aktux> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230426093920.3e9b5c61@aktux> X-Spam-Status: No, score=0.7 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, FORGED_GMAIL_RCVD,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED,SPF_HELO_NONE, SPF_SOFTFAIL,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Wed, Apr 26, 2023 at 09:39:20AM +0200, Andreas Kemnade kirjoitti: > On Wed, 26 Apr 2023 10:19:10 +0300 > Tony Lindgren wrote: > > * Andreas Kemnade [230425 19:58]: > > > On Tue, 25 Apr 2023 22:36:37 +0300 > > > Aaro Koskinen wrote: > > > > On Tue, Apr 25, 2023 at 09:20:40PM +0200, Andreas Kemnade wrote: > > > > > Aaro Koskinen wrote: ... > > > > > > Which commit introduced that regression? Also, the changelog mentions > > > > > > it happens only with "unusual" probe order. Now, all the ordinary cases > > > > > > for OMAP1 are broken. > > > > > > > > > > > did not bisect that to an exact commit. > > > > > Unusual probe order: on the device where I tested it, > > > > > I did not see a completely successful probe. > > > > > > > > If you cannot point out a working past commit, there was no regression. If > > > > you fix something that hasn't worked before or has been long time broken, > > > > it must not cause breakage to other current users. > > > > > > > Well, I did not take the time for a bisect. As we need a less aggressive > > > fix, it seems to be worth doing it. > > > > > > > > > And it's not just that tps65010 thing. E.g. 770 fails to boot as well > > > > > > and it doesn't use it; and reverting 92bf78b33b0b fixes that one as > > > > > > well. AFAIK it's because all the gpio_request()s in OMAP1 board files > > > > > > stopped now working. > > > > > > > > > > > so we break every non-devicetree user of omap-gpio? > > > > > > > > It seems so. > > > > > > > or maybe an if (not_using_devicetree()) > > > > Not sure what the best way to fix this might be, adding Linus W to Cc too. > > Maybe using gpio line names in the legacy platform data instead of numbers? > > > > Seems that we should just revert this patch for now and try again after > > the issues have been fixed. > > > I think the reason for the patch (besides of cleaning up warnings) is that > dynamic allocation seems to start at 512, static at zero. > If both are there, like registering twl_gpio between omap gpiochip 4 and 5, > dynamic allocation seems just to start after the last static number, > calling for trouble. > > If dynamic alloc would just start at 512 in that case too, no problem would appear. > As said I have not bisected it to an exact commit yet. > So if we need to move backward, we should IMHO first fix that allocation thing. I agree. As PoC can the reported add the following lines if (gdev->base < GPIO_DYNAMIC_BASE) continue; after https://elixir.bootlin.com/linux/latest/source/drivers/gpio/gpiolib.c#L190 and test your idea? -- With Best Regards, Andy Shevchenko