From patchwork Mon May 10 19:46:29 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 12249261 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 92884C43460 for ; Mon, 10 May 2021 19:48:46 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2C67261288 for ; Mon, 10 May 2021 19:48:46 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2C67261288 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: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:List-Owner; bh=aN7lSEA/gFevGeuHreNN5p6sVWDuEztQsA9ibpQCFqw=; b=DidKNOcy9OftIraGf2X9QGJLJ 08RwUG0sqhiKnAe4ENnV8uaXIPruIPyZaPgy8AX1D5IfMubF/7UTDttTXYP411xkkK8e/PiAeSUl1 8MWo/XEAHBfIfj/8RJU1+2WZR0iMucN6t1g+TDSo3HUVaShJ72//MX/LBSNtMt0Mp8qlue0nYhTut gBaHTa0JF7QmLVUfpl6lU77fdBTc9061eNeKWTipoZYZocic76RORGejAVryrAnloGzDzQMdKup0p G5IgpCKph/kLEFm8Osx3y8a/t7+1BC8P8DZjY70o/DU3dJjBvyVbI++NSNXrdJoxbZWRbRWMVpZjq llIqT2fGw==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lgBrY-00FatX-Nv; Mon, 10 May 2021 19:46:44 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lgBrQ-00FarX-23 for linux-arm-kernel@desiato.infradead.org; Mon, 10 May 2021 19:46:36 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description; bh=pAkTe+AR1PYdg3kzz2pRJGxqb07CGmK5UpnbOiu/3Eo=; b=LAIypbaEnVlJYN0EuqS0D+uBld pNjlQVZfcsA8awDaVKupwiCewkARekNf2rNxM9/q19DiTVtGseRwFnGIeUZZTUp6Dd9YWhpJ6H99C vPiYUHh6WM+dlQqns4u37hQeN7rEAUXe3EBdVLM3DZ57WeFFjvzCXOMGixgnp58ospup5ZUmeQlXP GC46MbMvRA9Baf6HkdK4B1DhOi73sQxcsAuw3rOmtq/H67//AMD18llgRMsjraJMTwXCLz6Kcubwf GD+w8yQ0S8hbDis849z5Y4jO+PWpY8kX7KRrwrFm5zYmkm+cw6AGDxGEngsAzQqC4jAcOuwO0ev2P Qabtcz4g==; Received: from mga12.intel.com ([192.55.52.136]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lgBrN-00958g-KP for linux-arm-kernel@lists.infradead.org; Mon, 10 May 2021 19:46:34 +0000 IronPort-SDR: /heR37UUTH3FyFuWQJAAWk4ekLw9/YQOCg2x2vfE2dYz/s4Tc7Pmdn1ho7YL+5pXT5U1AGS0ki f71tO5gNLLNg== X-IronPort-AV: E=McAfee;i="6200,9189,9980"; a="178862760" X-IronPort-AV: E=Sophos;i="5.82,288,1613462400"; d="scan'208";a="178862760" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 May 2021 12:46:32 -0700 IronPort-SDR: skx2BXdixhd2BIcN0VDt47fjCUwxy0uOVBKUMtthJMfWfvLwEhsQ4tDuCEvcFEimNNJA3BV3Dm SXh/3aGkwKzA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.82,288,1613462400"; d="scan'208";a="621386418" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga006.fm.intel.com with ESMTP; 10 May 2021 12:46:29 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id 5850DD7; Mon, 10 May 2021 22:46:50 +0300 (EEST) From: Andy Shevchenko To: Linus Walleij , Srinivas Neeli , Andy Shevchenko , linux-gpio@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Shubhrajyoti Datta , Michal Simek , Bartosz Golaszewski , Yury Norov , Rasmus Villemoes , Neeli Srinivas Subject: [PATCH v2 1/5] bitmap: Make bitmap_remap() and bitmap_bitremap() available to users Date: Mon, 10 May 2021 22:46:29 +0300 Message-Id: <20210510194633.11943-2-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210510194633.11943-1-andriy.shevchenko@linux.intel.com> References: <20210510194633.11943-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210510_124633_695749_F795E3A1 X-CRM114-Status: GOOD ( 10.94 ) 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 Currently the bitmap_remap() and bitmap_bitremap() are available only for CONFIG_NUMA=y case, while some users may benefit out of it and being independent to NUMA code. Make them available to users by moving out of ifdeffery and exporting for modules. Signed-off-by: Andy Shevchenko Tested-by: Neeli Srinivas Acked-by: Yury Norov Reviewed-by: Linus Walleij --- lib/bitmap.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/bitmap.c b/lib/bitmap.c index 74ceb02f45e3..7b6b2a67a6a6 100644 --- a/lib/bitmap.c +++ b/lib/bitmap.c @@ -784,8 +784,6 @@ int bitmap_parse(const char *start, unsigned int buflen, } EXPORT_SYMBOL(bitmap_parse); - -#ifdef CONFIG_NUMA /** * bitmap_pos_to_ord - find ordinal of set bit at given position in bitmap * @buf: pointer to a bitmap @@ -894,6 +892,7 @@ void bitmap_remap(unsigned long *dst, const unsigned long *src, set_bit(bitmap_ord_to_pos(new, n % w, nbits), dst); } } +EXPORT_SYMBOL(bitmap_remap); /** * bitmap_bitremap - Apply map defined by a pair of bitmaps to a single bit @@ -931,7 +930,9 @@ int bitmap_bitremap(int oldbit, const unsigned long *old, else return bitmap_ord_to_pos(new, n % w, bits); } +EXPORT_SYMBOL(bitmap_bitremap); +#ifdef CONFIG_NUMA /** * bitmap_onto - translate one bitmap relative to another * @dst: resulting translated bitmap