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: 726592 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A3DACE8181E for ; Tue, 26 Sep 2023 05:20:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231308AbjIZFUc (ORCPT ); Tue, 26 Sep 2023 01:20:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46262 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231449AbjIZFUa (ORCPT ); Tue, 26 Sep 2023 01:20:30 -0400 Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4FD0FF2; Mon, 25 Sep 2023 22:20:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1695705624; x=1727241624; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=8WwRDr25TqRIwoayNtleziPeT4USa3sxRbOwFlmDtVA=; b=CZ9JT25olegywqm8x8Jiqw+fQzX9YVnI+AtsguFLLGwsUtkJViJ6mECi N53GEu422wuwSIN1+XLYciuZ8ZbaYvxvlj5+h7O3Om2y3Bw581fy75/Za lfYhpE98kvsSj3vlBM3hApHYCSmnRY7duAgU23v1ahGLz6Et+F5Il05Rg hd7+8AD8e+CQ0PrmDVw2sdubZEHGKya+nyIpr98irnvMhyaiF0zrKMyrc Is6spiQUJquU3pUa2wuep9iiL5K+J9k+Zn+mdH6f5oT2nBX6CGP/xAx7S iXdlhcbcHV3K1ZoT5/iaMXJEgo+7M2aGdenpRfv3xwrW/Hd2hKfJLX4Qo Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10843"; a="371820567" X-IronPort-AV: E=Sophos;i="6.03,177,1694761200"; d="scan'208";a="371820567" 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 Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.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(-)