Received: by 2002:a05:6358:53a8:b0:117:f937:c515 with SMTP id z40csp5990538rwe; Tue, 18 Apr 2023 15:01:30 -0700 (PDT) X-Google-Smtp-Source: AKy350Zfte0/hxWXjKSmbedSeX8dDOKo2bjTPMAE2kl32tHjgFpXJIzj9ls6bE4xjGSXjZUyKEQu X-Received: by 2002:a17:90b:4c52:b0:246:fdad:28ca with SMTP id np18-20020a17090b4c5200b00246fdad28camr781966pjb.38.1681855290489; Tue, 18 Apr 2023 15:01:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681855290; cv=none; d=google.com; s=arc-20160816; b=QHge7SFwbSTu6fVf8yfDAkZVeN9VyDjQfTRBanmh1XPCSN7TYGRpBIjaMsvzIhC7MY ikMDXbexqkjmRTlDfrOJ+iNCfqlKWRreRdylzmfRRiJfebd3kAxK2NnQS9adUYfzBV7/ I8RxUlg/wJsMiwKjMIpIBiGBNVVw0sJur0C2dQm58jZWTcHXf06jli9XC1s6Q90oIAo7 MeD6cSMQDNwfxn/mbN8tdwVkTyaxXCOeUiD87DhtZz8XClf4fG+rVx/Cd8AFesC/47Zv /L1lxvds4ThU4M+ozi1BjwSZcC8eiSILJ3+xAL1MO/uTqBlxFrF4c4/F0+0XkZCkAE2U Zp+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=cZSjVGZIUlYLIpCjOhOc0/Sg4X8Jz8GjKGH9/AcwNB8=; b=scv7KlkZ7ShMEjD2P1osK+8hxg9scwgvaFx5dIQ3bAj78kwpEbFRvnkp+piPTw+tTz dZ7hdupoQ4T0IxHc0SgFoKbo/ASZvfrPf/nyRoox/C+Gv6MYZ1Nx9Z7Osp4AeRw36XZL ZuFUm46C8+596tobUcomBzSo4gEOlxdPRcix/jEwD3x+VT+O1FlM9rmurqyNFTMtcOYN 79jIigrBzijfqZXqSM9h+u1Z44/tSuYOc8JcRsxHO0Bo1fFPAnGdyFoRK5TZ5W7cjTQI tHraylFXa3LLsB0FGbWrCmDo2W7ZHKBCI1F6qaT2mxFyKbkIEZ4dAwlOTbczQpNnHuI4 4h4g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@orange.fr header.s=t20230301 header.b=Q6sEsKrh; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o9-20020a655209000000b005194ff488d9si14559156pgp.516.2023.04.18.15.01.13; Tue, 18 Apr 2023 15:01:30 -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=@orange.fr header.s=t20230301 header.b=Q6sEsKrh; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232977AbjDRVsL (ORCPT + 99 others); Tue, 18 Apr 2023 17:48:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35594 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231171AbjDRVsJ (ORCPT ); Tue, 18 Apr 2023 17:48:09 -0400 Received: from smtp.smtpout.orange.fr (smtp-16.smtpout.orange.fr [80.12.242.16]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B257CAD13 for ; Tue, 18 Apr 2023 14:47:50 -0700 (PDT) Received: from pop-os.home ([86.243.2.178]) by smtp.orange.fr with ESMTPA id otAtpDm3iuZFDotAtp5a56; Tue, 18 Apr 2023 23:47:48 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=orange.fr; s=t20230301; t=1681854468; bh=cZSjVGZIUlYLIpCjOhOc0/Sg4X8Jz8GjKGH9/AcwNB8=; h=From:To:Cc:Subject:Date; b=Q6sEsKrhFoWuQ2stk0aG1FI8wza6+Ha+g2auGJtsu7dzre1BbLJ1BwVUEsdiO3oy8 hkFnkBWD81hqEJSpcCf/Y3FELHW2dvuqNhnVLBXIJhGCPv1tNlPHMLFh/4Oq7n5oDE 9Qou5ArgKmLeqQEbtYU4G2HEZLKNBL2GWvX8TjEQeUkcpHgiHOzRVj5ldEWdQUMjM6 yBVUKNq/3KNbqsbG2n0sayi81o6SuZ+XjpaYKr4yiyrUgA5sFgS3ZogzycHVDT2TpO MSqgqgujgmvJ5yGgz9f4CS6HMJRxRg2z6gtQvBnEkLiOfyjiQdFItvFhgOs+U4O/18 iF95AxOOP6wgA== X-ME-Helo: pop-os.home X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Tue, 18 Apr 2023 23:47:48 +0200 X-ME-IP: 86.243.2.178 From: Christophe JAILLET To: Marc Zyngier , Oliver Upton , James Morse , Suzuki K Poulose , Zenghui Yu , Catalin Marinas , Will Deacon Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET , linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev Subject: [PATCH 1/2] KVM: arm64: Slightly optimize flush_context() Date: Tue, 18 Apr 2023 23:47:37 +0200 Message-Id: <97bf2743f3a302b3066aced02218b9da60690dd3.1681854412.git.christophe.jaillet@wanadoo.fr> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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 bitmap_zero() is faster than bitmap_clear(), so use it to save a few cycles. Signed-off-by: Christophe JAILLET --- arch/arm64/kvm/vmid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/kvm/vmid.c b/arch/arm64/kvm/vmid.c index 08978d0672e7..bbf0677cfefa 100644 --- a/arch/arm64/kvm/vmid.c +++ b/arch/arm64/kvm/vmid.c @@ -47,7 +47,7 @@ static void flush_context(void) int cpu; u64 vmid; - bitmap_clear(vmid_map, 0, NUM_USER_VMIDS); + bitmap_zero(vmid_map, NUM_USER_VMIDS); for_each_possible_cpu(cpu) { vmid = atomic64_xchg_relaxed(&per_cpu(active_vmids, cpu), 0); -- 2.34.1