Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp1878843rdh; Tue, 26 Sep 2023 06:22:55 -0700 (PDT) X-Google-Smtp-Source: AGHT+IELdo5GovJhyznmaFvpFKyEcFSV09/CWQDsXJZ4AS9AoHYd7Jicu0ISUyyVUGhRgCQN+wmz X-Received: by 2002:a17:902:a407:b0:1c0:b17a:7576 with SMTP id p7-20020a170902a40700b001c0b17a7576mr8582829plq.42.1695734574846; Tue, 26 Sep 2023 06:22:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695734574; cv=none; d=google.com; s=arc-20160816; b=cV8Gv9fn6SVjJ2Xw3H8GHRVm48PlL5iIBaRkYxS4dX55CS2cO9dG1+4VrZurnzvoUb 1ZuiLHEn8VSAgPC/b+u4gnH+CTEUPTI4IEL94n5CLaWY08ZhwhCpFIlHJNv/HYg7/PlJ FA1a8ylfQy1vFg313RQ1bUDnvQvt6dM8vSnoGvHjvvXPrl2EtPZgn+PHOUWQNdioyorp zv8kIRH4yVMTa0lw7bJ0ka6SXLSZfT+yYR4NE6g/TfnOybFr9UEtIz8K+tooCYGqR00T ZHORPONMS7oBNP4zfK2NWCHV5tW1peKyzCIhy75085TMX6CXyQLdocSpRQoB5kDGnNRf 4pTQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:organization:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=l8NAoWgdYvGXVlhiWHf8O49WNhC3kLjiowSAvo5fqgQ=; fh=qWQtwVV+WCm0y4KZqI/bA4ZEXdjz163lbD01PBlh7VU=; b=k4qmFnrINGPNfxlRmlr7wK+RVJSPwHx6ePsaNW3Wlxy8tjBdxt5qrFKpjtLYjUwiR+ 1SDU6u8V+kOaNYi09rmkAsM/y9gsJnlKRnmCPXPO1BajbsD0YpmcaBeohY5C/ojWf458 rOd8JeXNXLvgTorvBZIi5iaoz5akUaM1cQaZRqADOq1zrA3u4IV9cO82iN5DX8ULMELC pe6766A7M/8wKYSjvuTUXZETxq1qpO+ba+kHPX8g+GbMklwTqb3Y49V8Gb5xg153N92e 6uB810Tzkfcz1NEF+niHuMbX8zM1or59y7RtFRvThZBm4tiuglR3udJ+kwzGzMyKctSo Q4fg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=RXnBsy8m; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id c1-20020a170903234100b001c4401a7e18si10265781plh.382.2023.09.26.06.22.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Sep 2023 06:22:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=RXnBsy8m; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id B6AF78099CCB; Tue, 26 Sep 2023 04:11:27 -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 S229783AbjIZLL3 (ORCPT + 99 others); Tue, 26 Sep 2023 07:11:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35408 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229437AbjIZLL2 (ORCPT ); Tue, 26 Sep 2023 07:11:28 -0400 Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.100]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 26BD9E5; Tue, 26 Sep 2023 04:11:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1695726682; x=1727262682; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=bcmQvoUINisqkhRF3+IALIewrp6wbQqm3oJ9C0S/4TA=; b=RXnBsy8mpST3Z2ZMBNgSyldOTxXPkdQwYo2ZkhsYHksfvBDVXkswpOcp fE9042hAaYNEViOFgvh3U97Xgwuk/5NVhKmpi4/7z06JZo71HRYwR0cqp kcWc5vM8ZMjVusgz778KS7qHK3mxpVqhMoNZk1YSctj+ijgAFD/JzpKUQ 2K8e9m3ljY9fyGFxFoRAdd1k11Okav+WaYQFeO/bT5CX3z4xam1tBmOA5 wcIPGu1Zik0tL6Q0bYmR7Rfye0NEGJuwAOxPVUL0XeuJucC1g9ZJZlKt+ UDV84KWHzPI6+XJBWOEyEn3b1dSY5xZu6jJkrnnS9tzdfqRVgBz35VDNl w==; X-IronPort-AV: E=McAfee;i="6600,9927,10843"; a="448039810" X-IronPort-AV: E=Sophos;i="6.03,177,1694761200"; d="scan'208";a="448039810" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Sep 2023 04:11:21 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10843"; a="698432385" X-IronPort-AV: E=Sophos;i="6.03,177,1694761200"; d="scan'208";a="698432385" Received: from smile.fi.intel.com ([10.237.72.54]) by orsmga003.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Sep 2023 04:11:18 -0700 Received: from andy by smile.fi.intel.com with local (Exim 4.97-RC0) (envelope-from ) id 1ql5yF-00000000aM0-0723; Tue, 26 Sep 2023 14:11:15 +0300 Date: Tue, 26 Sep 2023 14:11:14 +0300 From: Andy Shevchenko To: Kent Gibson 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: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,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:11:27 -0700 (PDT) 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. (The spelling will be fixed in the next version.) -- With Best Regards, Andy Shevchenko