Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp697709rwd; Tue, 16 May 2023 06:45:34 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5iiCAkd6Zdu4CmWoOB62Xh28VTDe1iB6ML15UegvxHnrRShPYdOj+oaTR2wUVN7j79SOvT X-Received: by 2002:a05:6a20:3d27:b0:100:99a:7f71 with SMTP id y39-20020a056a203d2700b00100099a7f71mr43806958pzi.2.1684244734379; Tue, 16 May 2023 06:45:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684244734; cv=none; d=google.com; s=arc-20160816; b=vjtwu4fTrrARhl2thUom+DyaS3+veKxnb5eHdUUZ8hXSIN2j3FaaIR62B8i603Gc+q esWepq/UiKEdXbxMokpeb3bLKZf5dBlJVBantYrJYMXCGrPfKGWhNLkyImSUVTy42DHy sA4osRRCP5dBs5727PshzLFQALXhn9exlHj2Ok3Y57x72Op/XXc5ppDXWrZMV3bJJWcj PJVdKMIVivOad950mqly6T4F0FUtx9eOeU8JeCCNuMb0iC+YTHTZklyen+O9JLXVxnQV 88KsNmeptEStiwE52VqFLzTFoMrfcTRNbP5KnzZ17hx7/V3lpVuB+GYNnM6esaRBr1BL gR3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=0punkod+LsNj+S2rKq94XeMCA3FedLb3n1MABA551ck=; b=MtoZzkWc45S6oGwUSB76tHsDL8RQ3FCVhEmMs4FUWJh8MphSy8HTprcgrm1H98UIFt qDjQAkAlKJLHwDOFjZxkkp5IEs/iTwQcuZTVaF3uBhVQhk6ql2bjygWllu3LetU2cZmA kSuQj/SOJ1/t2kIzXD6RhoN3g1XS1ChLEICgTowudDjbauKdkoGwbYMmxFh7luuZblZW vGBmDYtjGummIqIydO34JoyR8fZkN2gFwtcYLS+tcr7sfeimcKsxcTySdJNBIgD9BkL7 eXKDSCv/FOfQYjc97XmyD4dD2sRWMboKo9CD5rsg1jDM+hDocFd69BGX/glbd5UvAKT7 ARxw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=sbF4guWq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e1-20020a636901000000b0051b4f835d4dsi17373184pgc.515.2023.05.16.06.45.19; Tue, 16 May 2023 06:45:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=sbF4guWq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233634AbjEPNYr (ORCPT + 99 others); Tue, 16 May 2023 09:24:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38164 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233622AbjEPNYk (ORCPT ); Tue, 16 May 2023 09:24:40 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6F1C761AA for ; Tue, 16 May 2023 06:24:34 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id F2DC163589 for ; Tue, 16 May 2023 13:24:33 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 27432C433EF; Tue, 16 May 2023 13:24:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1684243473; bh=v955wWx7frM5aua9JiGRpiLnkxI6iEN+b14qBeS8htg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=sbF4guWqOD8mHIzygGiLKs1TaU7izCz1lEHjLaWE7V/evztEOB+OjWPcE3BiAOuTT pJCyHAjzuS1gb73gXYtHeUl8eoJ3AfrvaAOM4FHtXEnB4pJX6JK1V4FH+1rfhdhe7K Iv/sVogMqvtuawf1PYPzqlN45tWiuAAIT2POP5pZjjDneBU/vs5IbadWrBjA6ZkH+R bfegHHga3ojh71j2gPFjSRsVzDpM0f6kh2Y/O5vJo6nyby3VQtXVOGsDs9rXKaMlQ1 YtTag8zfqawlBMWSK4N2q8zauDXiCdiyr/mzBOPquy864Y13ctqoqvvOaJZ1NPIHEB 1UQdYyhc4OnWg== Date: Tue, 16 May 2023 14:24:28 +0100 From: Will Deacon To: ye.xingchen@zte.com.cn Cc: broonie@kernel.org, catalin.marinas@arm.com, kristina.martsenko@arm.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] arm64: mm: use bitmap_zero() API Message-ID: <20230516132427.GA30894@willie-the-truck> References: <202305061636313011243@zte.com.cn> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202305061636313011243@zte.com.cn> User-Agent: Mutt/1.10.1 (2018-07-13) X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, May 06, 2023 at 04:36:31PM +0800, ye.xingchen@zte.com.cn wrote: > From: Ye Xingchen > > bitmap_zero() is faster than bitmap_clear(), so use bitmap_zero() > instead of bitmap_clear(). Is it? Don't these both boil down to: memset(asid_map, 0, NUM_USER_ASIDS / 8) ? Will > --- > arch/arm64/mm/context.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/arch/arm64/mm/context.c b/arch/arm64/mm/context.c > index e1e0dca01839..ed0bf7f8e8ce 100644 > --- a/arch/arm64/mm/context.c > +++ b/arch/arm64/mm/context.c > @@ -95,7 +95,7 @@ static void set_reserved_asid_bits(void) > else if (arm64_kernel_unmapped_at_el0()) > set_kpti_asid_bits(asid_map); > else > - bitmap_clear(asid_map, 0, NUM_USER_ASIDS); > + bitmap_zero(asid_map, NUM_USER_ASIDS); > } > > #define asid_gen_match(asid) \ > -- > 2.25.1