From patchwork Tue Sep 26 05:20:02 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 13398665 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 9D2DAE8181D for ; Tue, 26 Sep 2023 05:21:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=WuIgPjBlCYwg5R0uUYCWrnkRl9fyb15WgMFQvMWaX68=; b=0/lmsmdLNCtYRL 4meRu00YQZDlvbrIAw+0OA8gs/N2BRH+fmqiQ7/jeX7GBP630Yw4rRMBjaHR1pGR7loO0VyaHmgti ZinMA1EkOVO5qOtKJ74lKO0fMbNn+w2Wemz8OFzxNv7hLTCB4FU57q65HgFz6G/NTENP6XcICsblB rjPA/4gARxmgJRU1wJ0agmihLRwQxlMt0T3RFMrlqb6C/bCA1X8yTym8QwTTBCSMtbps4zivfmacy JKcknIP7vPh4Wq2dNE+0Y+/YMAH5oc0anjKf8t5Yu3Oj3StrM60hbZm/ojiNfMjy9IpicMw+03HTL 4zCP7dgFAo43gJHpmXuw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1ql0Un-00FbvC-2u; Tue, 26 Sep 2023 05:20:29 +0000 Received: from mgamail.intel.com ([134.134.136.20]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1ql0Uk-00Fbt5-2P for linux-arm-kernel@lists.infradead.org; Tue, 26 Sep 2023 05:20:28 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1695705626; x=1727241626; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=8WwRDr25TqRIwoayNtleziPeT4USa3sxRbOwFlmDtVA=; b=UPqFiI35XozAmPu3vsf773Oxk736/b/Nz+tkFbf/IATnw5SosjGTNTy4 sZ9mShEeoxFD0KpnMoGHKmWruGGIfy2AK0/pDJWxQC+WJluzkk0F+XxXc UHUYcbURnu4oN7S8Sa7keeekZ1fg11rZMBhR0qaHhK0pGgVnhw1W5VJNv iPOngspmDnbU4eSL4mNFSbi+txotp1eOrI1CVuodYeBYBDVDVBWscEe7p qHJ6nuQOELujHm6vFc97QOrF7BTQCts9o6vvnMYy+u1ORju5zxCqFfpHW UiMCYGUQCYbMKR8mTwI/Cun1hFONKta72V7Pb5KZbHJXwvlgS4lNRvtap w==; X-IronPort-AV: E=McAfee;i="6600,9927,10843"; a="371820569" X-IronPort-AV: E=Sophos;i="6.03,177,1694761200"; d="scan'208";a="371820569" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Sep 2023 22:20:23 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10843"; a="783824215" X-IronPort-AV: E=Sophos;i="6.03,177,1694761200"; d="scan'208";a="783824215" Received: from black.fi.intel.com ([10.237.72.28]) by orsmga001.jf.intel.com with ESMTP; 25 Sep 2023 22:20:20 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id D4D3311D; Tue, 26 Sep 2023 08:20:18 +0300 (EEST) From: Andy Shevchenko To: Andy Shevchenko , Linus Walleij , Bartosz Golaszewski , Yury Norov , linux-gpio@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Shubhrajyoti Datta , Srinivas Neeli , Michal Simek , Bartosz Golaszewski , Andy Shevchenko , Rasmus Villemoes , =?utf-8?q?Marek_Beh=C3=BAn?= Subject: [PATCH v1 0/5] bitmap: get rid of bitmap_remap() and bitmap_biremap() uses Date: Tue, 26 Sep 2023 08:20:02 +0300 Message-Id: <20230926052007.3917389-1-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.40.0.1.gaa8946217a0b MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230925_222026_867203_F3FD9870 X-CRM114-Status: GOOD ( 12.90 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org As Rasmus suggested [1], the bit remapping APIs should be local to NUMA. However, they are being in use outside of that for a while. To make above happen, introduces simplified APIs that can be used otherwise. It seems we might have yet another user of the above mentioned APIs. The last patch has not been tested anyhow (except compilation, so all testing and comments are welcome). The idea is to get an immutable tag (via my tree) that can be pulled by bitmap and GPIO trees on the need (while usually I send PR to the GPIO subsystem). Link: https://lore.kernel.org/all/20230815235934.47782-1-yury.norov@gmail.com/ [1] Andy Shevchenko (5): lib/test_bitmap: Excape space symbols when printing input string lib/bitmap: Introduce bitmap_scatter() and bitmap_gather() helpers gpio: xilinx: Switch to use new bitmap_scatter() helper gpio: xilinx: Replace bitmap_bitremap() calls gpiolib: cdev: Utilize more bitmap APIs drivers/gpio/gpio-xilinx.c | 13 ++---- drivers/gpio/gpiolib-cdev.c | 79 +++++++++++++++++-------------------- include/linux/bitmap.h | 9 +++++ lib/bitmap.c | 70 ++++++++++++++++++++++++++++++++ lib/test_bitmap.c | 25 +++++++++++- 5 files changed, 143 insertions(+), 53 deletions(-) Acked-by: Linus Walleij