From mboxrd@z Thu Jan 1 00:00:00 1970 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=-14.0 required=3.0 tests=BAYES_00,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS 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 579CFC48BDF for ; Sun, 13 Jun 2021 09:33:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2B31F61107 for ; Sun, 13 Jun 2021 09:33:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231190AbhFMJfI (ORCPT ); Sun, 13 Jun 2021 05:35:08 -0400 Received: from mail.kernel.org ([198.145.29.99]:52922 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230255AbhFMJfH (ORCPT ); Sun, 13 Jun 2021 05:35:07 -0400 Received: from disco-boy.misterjones.org (disco-boy.misterjones.org [51.254.78.96]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id D9FC86109E; Sun, 13 Jun 2021 09:33:06 +0000 (UTC) Received: from [185.219.108.64] (helo=wait-a-minute.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1lsMUK-007FuW-Se; Sun, 13 Jun 2021 10:33:05 +0100 Date: Sun, 13 Jun 2021 10:33:06 +0100 Message-ID: <87a6nut8h9.wl-maz@kernel.org> From: Marc Zyngier To: Anup Patel Cc: Palmer Dabbelt , Palmer Dabbelt , Paul Walmsley , Thomas Gleixner , Daniel Lezcano , Rob Herring , Atish Patra , Alistair Francis , Anup Patel , linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Subject: Re: [RFC PATCH v1 04/10] RISC-V: Use IPIs for remote TLB flush when possible In-Reply-To: <20210612160422.330705-5-anup.patel@wdc.com> References: <20210612160422.330705-1-anup.patel@wdc.com> <20210612160422.330705-5-anup.patel@wdc.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/27.1 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: anup.patel@wdc.com, palmer@dabbelt.com, palmerdabbelt@google.com, paul.walmsley@sifive.com, tglx@linutronix.de, daniel.lezcano@linaro.org, robh+dt@kernel.org, atish.patra@wdc.com, Alistair.Francis@wdc.com, anup@brainfault.org, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org On Sat, 12 Jun 2021 17:04:16 +0100, Anup Patel wrote: > > If IPI calls are injected using SBI IPI calls then remote TLB flush > using SBI RFENCE calls is much faster because using IPIs for remote > TLB flush would still endup as SBI IPI calls with extra processing > on kernel side. > > It is now possible to have specialized hardware (such as RISC-V AIA) > which allows S-mode software to directly inject IPIs without any > assistance from M-mode runtime firmware. > > This patch extends remote TLB flush functions to use IPIs whenever > underlying IPI operations are suitable for remote FENCEs. > > Signed-off-by: Anup Patel > --- > arch/riscv/mm/tlbflush.c | 62 +++++++++++++++++++++++++++++++--------- > 1 file changed, 48 insertions(+), 14 deletions(-) > > diff --git a/arch/riscv/mm/tlbflush.c b/arch/riscv/mm/tlbflush.c > index 720b443c4528..009c56fa102d 100644 > --- a/arch/riscv/mm/tlbflush.c > +++ b/arch/riscv/mm/tlbflush.c > @@ -1,39 +1,73 @@ > // SPDX-License-Identifier: GPL-2.0 > +/* > + * TLB flush implementation. > + * > + * Copyright (c) 2021 Western Digital Corporation or its affiliates. > + */ I find this a bit odd. You don't mention this addition in the commit message, and a quick look at the commits touching tlbflush.[ch] doesn't make the copyright assignment obvious (most commits originate from either SiFive or Christoph). In any way, please keep this kind of changes out of this series if possible, and have a separate discussion on who gets to brag about this code. Thanks, M. -- Without deviation from the norm, progress is not possible.