Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp4657533rwe; Tue, 30 Aug 2022 14:29:28 -0700 (PDT) X-Google-Smtp-Source: AA6agR6RiiMAHQ+fmswV9LcJpMWgrV1a0fi8FhPC7JqSA2shAnJXKTpl9gkg5wzSZCI06kR+zCDP X-Received: by 2002:aa7:8881:0:b0:537:cc74:d197 with SMTP id z1-20020aa78881000000b00537cc74d197mr21211437pfe.19.1661894967933; Tue, 30 Aug 2022 14:29:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661894967; cv=none; d=google.com; s=arc-20160816; b=SLj3FpSOZamhmIqMiMJNTbBtkl6Y42itxMntr31ULyLgQNVdyyG9A3fwnGRcmWxQt4 9JZ5UO59EIl5jWNgyEjx41dcvbRsgwM1s3RPtjHUnjAX3w/m5FRy/BZxj1MvCMft/aBS LSYpye3QbifcZhSRHLV6iyNq76QmATgHGqQ/FUS56TafGTnc4Qz6t3Ope8NTxL/LqkRA xygZqh/LhAH+0jf6e8ABmmhKwly9EcZpMs3kGAEYvJwqJm07N1Ch5ymI7a5+xeudg9mf hLb6KjicawlOJpYkllqyr59y8ku3zo0iJ/TkNZrO4MX4chBRl/XWU90R6jlaWUI8Zi6p UEiA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=GSwCSxkfswCTAr2W0z1p9wm8OPsGIVQ+vLw8r+QCbaI=; b=ylY989YKMA7Hc7pb20XQRabv4ZnX6au9VsKisd2yOAJrRpawFs4jEqugI+LJ/J0k6q Eg8oXrh+gxnv0PnKdVLzvmJfJhTpQK/G7iCOeCzCCgwvq86Zr8/phZRlregPHLqpj11C UFpCmePEGNuHDPjsh25WBf7ArxYTCRyUSIHkRnzQqVVe7cbOKrdX9TxN2bk7Z0pOfNOV H3ZmBmyG9RyTUVvm7K4ovi3fu/jFR+ZLovQgvEEbJcxlRPj4hmTm9vhjcpe98dCeA9X1 3GhHLiy/H4w/Kg9WMW1Qcdi2JKlllrl+QviILZ1Wm+0pIbRtdt/ZQ1o6uQE12IxHIatR UMWA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=n319MBFg; 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=pass (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 b2-20020a170902d40200b0016da4dcae60si11487415ple.64.2022.08.30.14.29.16; Tue, 30 Aug 2022 14:29:27 -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; dkim=pass header.i=@gmail.com header.s=20210112 header.b=n319MBFg; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231134AbiH3UV6 (ORCPT + 99 others); Tue, 30 Aug 2022 16:21:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52624 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229914AbiH3UV4 (ORCPT ); Tue, 30 Aug 2022 16:21:56 -0400 Received: from mail-qt1-x836.google.com (mail-qt1-x836.google.com [IPv6:2607:f8b0:4864:20::836]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9EB8B52E46; Tue, 30 Aug 2022 13:21:55 -0700 (PDT) Received: by mail-qt1-x836.google.com with SMTP id w28so9492908qtc.7; Tue, 30 Aug 2022 13:21:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc; bh=GSwCSxkfswCTAr2W0z1p9wm8OPsGIVQ+vLw8r+QCbaI=; b=n319MBFg0fYTSh7VP5cO10oaO8edZv/xWNrw7cy5VJI/79qfQEp9RdCxrEqW8qkiJG brcnn03BWSCN55OFZOF+VAKsC8lbqcwMRTls8GozUjUDdipjjdahcGrj4OdUCrGV2xTv m5Oflc3GWdKmZN21oyHOcEYrcGsrBrl0xxbYGtuNovusufG6XDfMA79gPLa2/IZTrJxq qnUwiYFY3aHjJLkKTib/aIEby8FwdMMD8VcohEJ1j6Ndlj6AayluaWjbN1pH6s744ou8 /g+yXMBj7Nema420sJSOmode1xbhgIQehSWOY+U0GOXYTuT947QPPZXt2dsxPJSQO6fz aSiQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc; bh=GSwCSxkfswCTAr2W0z1p9wm8OPsGIVQ+vLw8r+QCbaI=; b=HA3iBrGcY8tjAUkF9VkIQpLKZ/0z4kwVCz+YmJishqnys4KPI5fuklg7GYx3W45A+a Pi9JthR/mKDrNspu9chjaJJ02YutWCWgC9Qg/cZLCqf/NIMpAyXgi69kk4SVlr37WCDk zxd3Xh0q/uc9NdeWQzLRHhI45YqH+2pnmnzKN7iqZrbgrb9LObbeEMrOGHpPYnTAQJ2T YBEwybkUHcZ4iOMMG0YZ3pkOAE44y5luQ8R35ECa9dYDtFooHg64hblB9AA9JyGoRoiW jGioYIu0AlIH4w6N3uOAOEzibgoNqWVAg7XnnavuQuDYvStnXJ0LOBXh1ATaCkJl8nK0 0VYA== X-Gm-Message-State: ACgBeo211UXA9/kzijkZVspx5gXM/ZQP/aGyTyMOaErmscXBqhGvxEk0 sODUKOes4HUQrSTngkPJplWqGeC4bIy73Y8LL5A= X-Received: by 2002:ac8:7f92:0:b0:344:8cd8:59a1 with SMTP id z18-20020ac87f92000000b003448cd859a1mr16713627qtj.384.1661890914718; Tue, 30 Aug 2022 13:21:54 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Andy Shevchenko Date: Tue, 30 Aug 2022 23:21:18 +0300 Message-ID: Subject: Re: [PATCH v1 0/8] gpio: Get rid of ARCH_NR_GPIOS (v1) To: Christophe Leroy Cc: Linus Walleij , Bartosz Golaszewski , Geert Uytterhoeven , Keerthy , Russell King , Arnd Bergmann , Jonathan Corbet , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , "H. Peter Anvin" , Catalin Marinas , Will Deacon , Linux Kernel Mailing List , "open list:GPIO SUBSYSTEM" , linux-arm Mailing List , Linux-Arch , Linux Documentation List , "maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)" Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 On Tue, Aug 30, 2022 at 11:20 PM Andy Shevchenko wrote: > > On Mon, Aug 29, 2022 at 7:17 PM Christophe Leroy > wrote: > > > > Since commit 14e85c0e69d5 ("gpio: remove gpio_descs global array") > > there is no limitation on the number of GPIOs that can be allocated > > in the system since the allocation is fully dynamic. > > > > ARCH_NR_GPIOS is today only used in order to provide downwards > > gpiobase allocation from that value, while static allocation is > > performed upwards from 0. However that has the disadvantage of > > limiting the number of GPIOs that can be registered in the system. > > > > To overcome this limitation without requiring each and every > > platform to provide its 'best-guess' maximum number, rework the > > allocation to allocate from 256 upwards, allowing approx 2 millions > > of GPIOs. > > > > In the meantime, add a warning for drivers how are still doing > > static allocation, so that in the future the static allocation gets > > removed completely and dynamic allocation can start at base 0. > > For non-commented (by me or others) patches > Reviewed-by: Andy Shevchenko Should be Reviewed-by: Andy Shevchenko > For the patch 1 if you are going to address as suggested by the author > of the driver, you may also add my tag. -- With Best Regards, Andy Shevchenko