From patchwork Tue Aug 8 23:13:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Raghavendra Rao Ananta X-Patchwork-Id: 13347225 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 08DF9C001DB for ; Tue, 8 Aug 2023 23:15:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:From:Subject:Message-ID: References:Mime-Version:In-Reply-To:Date:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=gnI23prnHYalsSANL4g+TIbkUS8Jvx9LIed3dvE3OSI=; b=AXO2naEwzW41D3D8VxYg7tptnE /2k86LyNmnHToFgI8jX8jEt978wte4wO7Q5gsiCUs+X6yLzlzHXIhawkMZwO8osjJPMLB+O4XxssE NECtFiznzogYN32FJJBlfSUgxL7c1vJGUJgUrgzacA3NT7Ng1iX0UZd3kVdmlDPa4na8m1tJa/kW2 CA/1/9+2bJO5caIr1m6tHdsuBfabHBKs8xj9pPY70/W24QH9+yg5biCmxjmbuwnwiIZ05bRifvqS2 4cncY1+avvlOZGl0tFFvwwt4b9BwcC9EzRLpu8lKkm6MIXfzjIAEu4FMiJHe7miHuma+jm6jn26Ic lDgFrRpg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qTVud-003eK6-3B; Tue, 08 Aug 2023 23:14:51 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qTVtn-003dPl-1i for linux-arm-kernel@bombadil.infradead.org; Tue, 08 Aug 2023 23:13:59 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Content-Type:Cc:To:From:Subject: Message-ID:References:Mime-Version:In-Reply-To:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=8aS9+bqGGIGJd4osXg0UNYpwpvIxhiWvvz+QMPQ0Ulo=; b=emCq6btndJleS4p28Tt27MUMp3 A7oIhIbbzFb7p2QnIRDmbaMGJeqSyXzfoPArt3hPvhy6jPgy3Jd4XCNCpWYFZmx/e31FApkooNVcx CoGQPcq/GN7gBOiHsm7CEegsJUZznUkQCkW3rrUBv7VBFakyfxqGgX5H4YiT59phhYstQpp+tlN9p Pgwhn1K4h4b2CrgVczFsCSIyfvHfwHL2Cifi3/sD1kq0WNBd5/7sJpzqfqWLhRRQvcCMiaFB1DHz0 ETsXQUWNu+JVDYpy7edx1Omwffw2hBC13u0lJPNaTY7L6sS/+Zz2opkjBALGmpW0chix+Pw1uylqt V0sMuejw==; Received: from mail-yb1-xb4a.google.com ([2607:f8b0:4864:20::b4a]) by desiato.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qTVth-0057m9-2P for linux-arm-kernel@lists.infradead.org; Tue, 08 Aug 2023 23:13:57 +0000 Received: by mail-yb1-xb4a.google.com with SMTP id 3f1490d57ef6-d10792c7582so5344524276.3 for ; Tue, 08 Aug 2023 16:13:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20221208; t=1691536423; x=1692141223; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=8aS9+bqGGIGJd4osXg0UNYpwpvIxhiWvvz+QMPQ0Ulo=; b=r5BfuQMefAg0Tnr2FQaEIivjC4JzNAMuw4qxGVtci6+U9djSIpA11Hdl+rJc6en91J y/h+YDs0QAA5xFNhoGQE0fza9XyovVTAf2+ZIQj9pZdiciK8WN7z5vHDkRS5bze2JrvX 1Pi0zGoodsu607T4DyfgYeotzEFP9OFg33WWk/J6RT4OzDi2b1Fi3JqRQ6HpyZZ+gywn +UZCzVUhZNvWuqdnzNxXM4bRsJeE1eSS8tnxOTUMx2/t6MN7k2idS2QWNmkVWa/w66NG yQ/AVA1aDJm/DL0O+01cjluCupsA1erg2PPaJFd5MY5BuRKvpf3vdiz+yo1bLlWRTbiY xCRQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691536423; x=1692141223; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=8aS9+bqGGIGJd4osXg0UNYpwpvIxhiWvvz+QMPQ0Ulo=; b=UM83J238ozxy8yxeypahiX4XlU6RxL8MK+dpehY/zNCPnzPkPlyj9zUw1oB5NuLtRO /FQZRmEO+IPPiGL0n4yapHJBednq19cnVk82aAEJmfKxd9ny7NwjRE0eL1zDrLC52/Hk zpaygpi6fh3ohF+Vg9BQlsKXqNUtZgc50MsaM/euthoR5c3ZR8pJONLGB7F/W5CztTgP XdxefHq7tX6IKXOMdyRJ1xSNTB67KDHFcvICD3EojHmE8RF6eoNcv3zY0gFwhVCEH545 iuzY16XZMiYhtvNU2A74i6x1sqRKASDE6ev3QXi75O1lFvPWg71SklIqXH9tS/dYbDve TT5w== X-Gm-Message-State: AOJu0YxMlx+l/ePin4ywHkVxBM0OKfM46cYoHqEXwyMgk4AzzeQP02DH /WwjnmggdIFSIDGw3zknST8EJApaRers X-Google-Smtp-Source: AGHT+IGN6Wyp+xgEmWlEdpiyTqEz05f+ph0g541H8xJPxC5yzYpq7Xwg2KskI5Za7Uo8sgiAN3njNrOwDHIy X-Received: from rananta-linux.c.googlers.com ([fda3:e722:ac3:cc00:2b:ff92:c0a8:22b5]) (user=rananta job=sendgmr) by 2002:a5b:890:0:b0:d10:dd00:385 with SMTP id e16-20020a5b0890000000b00d10dd000385mr25024ybq.0.1691536423557; Tue, 08 Aug 2023 16:13:43 -0700 (PDT) Date: Tue, 8 Aug 2023 23:13:24 +0000 In-Reply-To: <20230808231330.3855936-1-rananta@google.com> Mime-Version: 1.0 References: <20230808231330.3855936-1-rananta@google.com> X-Mailer: git-send-email 2.41.0.640.ga95def55d0-goog Message-ID: <20230808231330.3855936-9-rananta@google.com> Subject: [PATCH v8 08/14] arm64: tlb: Implement __flush_s2_tlb_range_op() From: Raghavendra Rao Ananta To: Oliver Upton , Marc Zyngier , James Morse , Suzuki K Poulose Cc: Paolo Bonzini , Sean Christopherson , Huacai Chen , Zenghui Yu , Anup Patel , Atish Patra , Jing Zhang , Reiji Watanabe , Colton Lewis , Raghavendra Rao Anata , David Matlack , Fuad Tabba , linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, linux-mips@vger.kernel.org, kvm-riscv@lists.infradead.org, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, kvm@vger.kernel.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230809_001355_018328_4D860C88 X-CRM114-Status: UNSURE ( 8.81 ) X-CRM114-Notice: Please train this message. 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 Define __flush_s2_tlb_range_op(), as a wrapper over __flush_tlb_range_op(), for stage-2 specific range-based TLBI operations that doesn't necessarily have to deal with 'asid' and 'tlbi_user' arguments. Signed-off-by: Raghavendra Rao Ananta Reviewed-by: Shaoqin Huang --- arch/arm64/include/asm/tlbflush.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/arm64/include/asm/tlbflush.h b/arch/arm64/include/asm/tlbflush.h index b9475a852d5be..93f4b397f9a12 100644 --- a/arch/arm64/include/asm/tlbflush.h +++ b/arch/arm64/include/asm/tlbflush.h @@ -340,6 +340,9 @@ do { \ } \ } while (0) +#define __flush_s2_tlb_range_op(op, start, pages, stride, tlb_level) \ + __flush_tlb_range_op(op, start, pages, stride, 0, tlb_level, false) + static inline void __flush_tlb_range(struct vm_area_struct *vma, unsigned long start, unsigned long end, unsigned long stride, bool last_level,