Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp2021499rdh; Tue, 26 Sep 2023 09:56:46 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEg6tK7f+gkaeBQWAExvKXkMt0EW+X2kyw4LRhfzJ4Xy5SbNUCls/rBw7QJlnOIqaNKj1Vl X-Received: by 2002:a05:6a21:18a:b0:13a:6bca:7a84 with SMTP id le10-20020a056a21018a00b0013a6bca7a84mr14239330pzb.44.1695747405916; Tue, 26 Sep 2023 09:56:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695747405; cv=none; d=google.com; s=arc-20160816; b=LlpdMsLmwxpxKlcRSnNE8lBJY8x7taKds9YDTGhb68E5pJosvV3cY2QwJiv3JULeL1 vcwzT2jmkhBzYre+Je7JhijOV26Y1j4zM5rDEHQ/DkNKlaQsV5MwrsOXXfR5U1wApid7 ST0MU1euUdiqOamWWPqMOtf3AIA3fnR2rGJvZ40LkQZWgkJ0OXmk98qfCtUDEzi2U5fs uG+UBQmm4R9OZRsVaYWm5DdS+L9qHtX3OtN4ToqtrR75KMsG/YcZc1Fl/t5ah8MX7+GC sJ5GwgacT+OpXshkJaEYP7kcWkGJ1o2lFMnHGdQYKN5YW5CkLmHOcDzBMs4bV4OBlP0L AxLw== 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:from:date:dkim-signature; bh=ZWBGxa76m7aeagTgko1i4QtCRID1/zltTLr5CfyYfo0=; fh=GhAzZS0VrcP9Wgh2MyACsocSO4ETsMarljI7HvQ0MVM=; b=vYeC4oBJmufcl/8+oi6aDl7myIw+pyK+SK3hzNc1iIyQxGUrhtrHhBoHEUl5xM8sdj 5d01YFD4wpnNq0QPtgPw285P7kJUNL8XhwiimcWKbylKw7y/mokGHQ4oABydhQmC7FwQ HEnmt7zvdXmVG5dfZ4vZHQL6XuD+crc6NkZmTdNHiEu3GN0K6VO+8qF/Rwx31q7yo1tu jVvXX20Gg4HnMfSvWtUZ6N+AnsFvSezvXu/MZmQ9UUZKl7lQlSJ2EICOcsN+jc25VkfH FgUDK+3g93M+ePwjC3Mlw5t6gUXIexZNyYt3SHvNVqAtCJjF/rfXZg5u9l8Pbz1vyQg1 0ykA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=RUyfcL9+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 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 agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id n10-20020a17090ade8a00b0026803b4ddfcsi5031919pjv.103.2023.09.26.09.56.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Sep 2023 09:56:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=RUyfcL9+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 3572381ADB70; Tue, 26 Sep 2023 04:18:11 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230231AbjIZLSI (ORCPT + 99 others); Tue, 26 Sep 2023 07:18:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38110 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229507AbjIZLSH (ORCPT ); Tue, 26 Sep 2023 07:18:07 -0400 Received: from mail-pf1-x431.google.com (mail-pf1-x431.google.com [IPv6:2607:f8b0:4864:20::431]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 35A35E5; Tue, 26 Sep 2023 04:18:01 -0700 (PDT) Received: by mail-pf1-x431.google.com with SMTP id d2e1a72fcca58-690d8fb3b7eso7551412b3a.1; Tue, 26 Sep 2023 04:18:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1695727080; x=1696331880; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=ZWBGxa76m7aeagTgko1i4QtCRID1/zltTLr5CfyYfo0=; b=RUyfcL9+hYc06OG+MapNaaORN9Qgdzy8AE5hODr/UBAbGdHSRXMKwJtp+sdYR+xnhZ Fl23Jsx2MY1/+FZqYSBpZL+FKrD8j4PQLaZ3QYXcnu1Tuay0lZtdm1kw3rGWezeVBNM4 Ae1uK79LrLUn2+wDdkGiMiWBk06bJFCrtLVZ5uUEsGdRxfXFcHJ2dANld+AtR47ASCDA YfOxXfAKCNb9xAzzbpp7SH7w7Ww+vO8HAS7KxUsrRk/zwuDNQ22pj2+UiTGRwxM+eaKj 7DlvgQvr5tSrBQp9+lbw1pl0fsY7cBjSJWdnEPTLF353eqC7SI7KGV6Zz09tfK+s0WCc R4Cg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695727080; x=1696331880; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=ZWBGxa76m7aeagTgko1i4QtCRID1/zltTLr5CfyYfo0=; b=mrSq7EJ9SefN1tO6bnRV9VzKFfcypqttxc+O/MixObdFmQQZvw1cL0j+CYX6nXsD0Z xhYnArsVlefz9HJcc9Oc4Us6yF0UPXFtmXA4WbYfj/d9P1yZ/IhbPfU7H2mIH4NzY3/U JV8Sww8oO5IWQMDRavbVsvvUjUQX6128GxSGF9QYLEb7D1vXjA3/nvZlAzvyMbdu9dxM TPM3CS7zvXnrizc4yq1zrsv3RNFrqxXfF73xCGYpFhSXLxEdTnzHN/li6311Ur5xbtMZ A/UQNHFNsL5RKvNpgagufN9vyvMkXgTk+ieDtDTNYY19g3F9w/yvISHqZ8IENQJncFdS K3EA== X-Gm-Message-State: AOJu0Yw52AjVYku1IQTuUtKN3c+QJ7QosQgT54tSmV7OlqN+Sqo3pO2b DotDVHfxRMIImczIiu24Qfg= X-Received: by 2002:aa7:8893:0:b0:690:2ecd:a597 with SMTP id z19-20020aa78893000000b006902ecda597mr9672823pfe.21.1695727080615; Tue, 26 Sep 2023 04:18:00 -0700 (PDT) Received: from sol (60-242-83-31.tpgi.com.au. [60.242.83.31]) by smtp.gmail.com with ESMTPSA id l22-20020a62be16000000b0068fe9c7b199sm5814518pff.105.2023.09.26.04.17.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Sep 2023 04:18:00 -0700 (PDT) Date: Tue, 26 Sep 2023 19:17:52 +0800 From: Kent Gibson To: Andy Shevchenko Cc: Linus Walleij , Bartosz Golaszewski , Yury Norov , linux-gpio@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Shubhrajyoti Datta , Srinivas Neeli , Michal Simek , Bartosz Golaszewski , Rasmus Villemoes , Marek =?iso-8859-1?Q?Beh=FAn?= Subject: Re: [PATCH v1 4/5] gpio: xilinx: Replace bitmap_bitremap() calls Message-ID: References: <20230926052007.3917389-1-andriy.shevchenko@linux.intel.com> <20230926052007.3917389-5-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Tue, 26 Sep 2023 04:18:11 -0700 (PDT) On Tue, Sep 26, 2023 at 02:11:14PM +0300, Andy Shevchenko wrote: > On Tue, Sep 26, 2023 at 06:41:00PM +0800, Kent Gibson wrote: > > On Tue, Sep 26, 2023 at 08:20:06AM +0300, Andy Shevchenko wrote: > > > We have sparse and dence masks of the line mappings based on > > > > dense > > > > > the view point (Linux numbering or hardware numbering). Since > > > the Linux side uses sequential bits for the mask, we can simply > > > convert a Linux number to the hardware one and vise versa by > > > > vice > > > > > counting set bits in the respective mask. Hence replace > > > bitmap_bitremap() calls by simpler equivalents. > > > > > > With this done the dence mask is not needed and thus dropped. > > > > And dense again. > > Thank you, Kent, I really appreciate your help with my poor English, > nevertheless it would be nice if you can look at the last patch and > maybe even test it, so we have a bit of confidence that it works > as expected. > Well that is the plan, but I haven't been in the GPIO space for a while so I need to pull my test setup out of mothballs first - so don't hold your breath. > (The spelling will be fixed in the next version.) > Those I can spot without needing to compile anything ;-). Cheers, Kent.