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=unavailable 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 67F00C48BCF for ; Sun, 13 Jun 2021 09:33:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3C7DB61107 for ; Sun, 13 Jun 2021 09:33:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231533AbhFMJfI (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: linux-kernel@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. 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.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,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 A51CBC48BDF for ; Sun, 13 Jun 2021 09:33:17 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 5F52561107 for ; Sun, 13 Jun 2021 09:33:17 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5F52561107 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org 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:MIME-Version:References:In-Reply-To: Subject:Cc:To:From:Message-ID:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=zqcScWSo63ZzxpwWmGt9WYYZWpyDTnE77WcgtHGFYh8=; b=oWYbLFzbEZQL+G DnHAOskDCTyr+ozOyYkGS1K2vE20FV+elBjcHKo2HrH2Tj0vNWjg9BFaO14ntsdEAazRQiaLn0w5n j1uwl+Wm5hiUg4ae7rv5LPyqqKihtL1l8k5TR00CxLSa1Q/eiMdApv3mdZIYQ/0XWxwffhas4cIgC T596QFR4PSaaVs7csjzsJnaAnm6TdqfGAHiJeb4gTuoTvg56tNLmvUdL+VQAA6GC9plhDkLRpSYW8 bPwjKrNWtg8qFvFbboJr5O0Oh1bVc5eVGh9aafzitk+41QjkDBfMQtr58IPE3tPgoItjSo7aBeHtu /cXRKCvOstO6l+QMz+0Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lsMUQ-00A5Ps-EA; Sun, 13 Jun 2021 09:33:10 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1lsMUN-00A5ON-4q for linux-riscv@lists.infradead.org; Sun, 13 Jun 2021 09:33:08 +0000 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") 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210613_023307_232938_A6C0B2FD X-CRM114-Status: GOOD ( 24.70 ) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.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. _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv