From patchwork Mon Feb 12 07:56:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Herve Codina X-Patchwork-Id: 199608 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:50ea:b0:106:860b:bbdd with SMTP id r10csp2289707dyd; Mon, 12 Feb 2024 00:01:01 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCU0IDvW1NKgTzB2t7BfajHC5Geqt0C1vPIr8oKElxKVylSgezPCdWA0LGHQ+i/vM3YKk9bU2aB/CsIEzZiAd+6mNGcY6g== X-Google-Smtp-Source: AGHT+IEEDXkaohAKij+1YUAw5O333Cpzo3rmoO7Grsn4jLMiMYW46hYKjQpoLvchmoLwfmbGEEHS X-Received: by 2002:a17:90b:3842:b0:296:6702:b042 with SMTP id nl2-20020a17090b384200b002966702b042mr3556755pjb.9.1707724861397; Mon, 12 Feb 2024 00:01:01 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707724861; cv=pass; d=google.com; s=arc-20160816; b=Z3QKsCoKxS3sZ9Ybu12gT66gtuUU8zK3yR2smrI31gnWkoqd50bagiKayF3gfhOH0f vewGRGvPSJfOJceBI0wql2qQzWjle6j9XPOTPKij9na/sIN3BSYlbztpJaRIvUB7gjDI nHYAip7H+ltMaYESJUU8yoNmxK6rgPPIWWWGOYjdnIDafEDKvmeNUZrw+4pmMKrshFuO 0sPpvHqrJ9/cd0tbFz2Q/2mv1fpwGVgARhyJQc1SO6dowbxf129iGByNI+PUetMIYIBR k3UzOHUspV8GSzc0Nvjjbldvolm2BK9JhAs4BQroY1gV/FRDSMJgy7RicWtzyLRODD3b jeAQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=9ic1ckcjchbcoVTjdKWShBulE5zgYlgBqlicFqMJYpM=; fh=DMbuuphMpctfTgk8jh2cYdfhE6XKBct69czD4bX8S0Y=; b=eEzrBMDPDHQvDN57uR9CpP3aUNWADxxzm573ofayxMjajfTe6b4/sV8oRtoKN+2ctW OcluslP4bjLWb2Tyr9VqFR9GWlJkdSGQoCpHt1b0LtBXhORg7Trve2tQmkVvpyoVE+Il Sb1EKupbNzkup1WeKpaLEqA/gjPhBx5WplFsdaOZBP03Nu3ZdehVztjZAomNQlzosSNx XWf75My8hUUeC7GPFvKhRwBES/z8ANY0SxF81jzkufmxErYqyVKuGOav80K+nah4pPHT g0fNQKMtif3Wa9BYp5mdUN8CWthZEKl/1azOHwtX5Jaz6XN16huKzfNhDY3b7ESv6Tff vyoQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=d+EVX4fX; arc=pass (i=1 spf=pass spfdomain=bootlin.com dkim=pass dkdomain=bootlin.com dmarc=pass fromdomain=bootlin.com); spf=pass (google.com: domain of linux-kernel+bounces-61171-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-61171-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com X-Forwarded-Encrypted: i=2; AJvYcCUeiDT+VKix07RQAfdmeJ6R+HqPcjYogS3r3BsUC2bF5IWNv/sJ8kaqVO6uSIyy/as3eL8ehbky7W1tlAPYYOK8TgCQHQ== Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id u16-20020a17090ae01000b002903e315e4bsi5946564pjy.81.2024.02.12.00.01.01 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Feb 2024 00:01:01 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-61171-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=d+EVX4fX; arc=pass (i=1 spf=pass spfdomain=bootlin.com dkim=pass dkdomain=bootlin.com dmarc=pass fromdomain=bootlin.com); spf=pass (google.com: domain of linux-kernel+bounces-61171-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-61171-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 2EEEE284EDF for ; Mon, 12 Feb 2024 08:01:01 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 014CC1F5E6; Mon, 12 Feb 2024 07:57:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="d+EVX4fX" Received: from relay2-d.mail.gandi.net (relay2-d.mail.gandi.net [217.70.183.194]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6DC8D101C1; Mon, 12 Feb 2024 07:57:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.194 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707724636; cv=none; b=GStMY+cLb85ywmk1Kt9RJHuYxv4rS6T2o/hYaw8IMTsdGk1v+9Y0Rn0LRtWHM0CbCcrBn8CaQ8AAyLwlH0Rt6krOfd1OzJumcgJFJ4jCV4jk6GBBBYxEqHYPm5eF7Id74WLcWUI5zWujlw88wT1RWPq+JaszAWZGmJidJiCCxnQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707724636; c=relaxed/simple; bh=Y4mTOkugzPKhkBlTmeRYr77COSSEZXPzeIqX8b/CK74=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ZZO8u7D4GFYL7aNBrxbmASSFqpVg31plaBaYWJ7XVTzeez6fiRLo+ymdP/NYha8I3TKPS3qT+/R5FPCHsOw+ZW3zxk0WCmsYV8iOLpydo52j23mKFHbbJb6Bt7+V2cmwt3NHWJknc/k95WTUPtBQgIZNKiwmzpz0nV1fcCWDrW4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=d+EVX4fX; arc=none smtp.client-ip=217.70.183.194 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Received: by mail.gandi.net (Postfix) with ESMTPA id 99A0040015; Mon, 12 Feb 2024 07:57:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1707724630; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=9ic1ckcjchbcoVTjdKWShBulE5zgYlgBqlicFqMJYpM=; b=d+EVX4fXrBpPi5OnvfiAxOR/AVAaZXiiWFWazenSFUiOY7aLN1+aPeicFZxLPbalVnLfqE +74n8hb2gXcVk9Jgzgu546dfIMUa/Ay4kFwhx9R8miohZQs5/T/PwK+fP3OlfacqP4imOV r6Iw+f9T6LPKWafnO+tzQ5YUbV0FoROupPZEE6ELxRsKotp3J0nf9HkoUeXTBzF4hWhKV5 7ZlxXuaamjoKiFtV3lSvUsqI9MiTp3jpGNuEM6a3lQ8RpmVNVP+kdbj++EnIWnmPSfC/QO OfYf3pd+xBKrznWisCqtQ0y9Sd3pwlM4CJuvaHv0pAlrKg7QGrOYelPJka1/3Q== From: Herve Codina To: Vadim Fedorenko , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Herve Codina , Yury Norov , Andy Shevchenko , Rasmus Villemoes Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, Andrew Lunn , Mark Brown , Christophe Leroy , Thomas Petazzoni Subject: [RESEND PATCH v3 3/6] bitmap: Make bitmap_onto() available to users Date: Mon, 12 Feb 2024 08:56:38 +0100 Message-ID: <20240212075646.19114-11-herve.codina@bootlin.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240212075646.19114-1-herve.codina@bootlin.com> References: <20240212075646.19114-1-herve.codina@bootlin.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-GND-Sasl: herve.codina@bootlin.com X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790679276796879406 X-GMAIL-MSGID: 1790679304152368968 Currently the bitmap_onto() is available only for CONFIG_NUMA=y case, while some users may benefit out of it and being independent to NUMA code. Make it available to users by moving out of ifdeffery and exporting for modules. Signed-off-by: Herve Codina --- lib/bitmap.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/bitmap.c b/lib/bitmap.c index 09522af227f1..2feccb5047dc 100644 --- a/lib/bitmap.c +++ b/lib/bitmap.c @@ -547,7 +547,6 @@ int bitmap_bitremap(int oldbit, const unsigned long *old, } EXPORT_SYMBOL(bitmap_bitremap); -#ifdef CONFIG_NUMA /** * bitmap_onto - translate one bitmap relative to another * @dst: resulting translated bitmap @@ -681,7 +680,9 @@ void bitmap_onto(unsigned long *dst, const unsigned long *orig, m++; } } +EXPORT_SYMBOL(bitmap_onto); +#ifdef CONFIG_NUMA /** * bitmap_fold - fold larger bitmap into smaller, modulo specified size * @dst: resulting smaller bitmap