Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1913036pxj; Sun, 13 Jun 2021 02:36:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwDPX8QHlq6D7fKGny56Eor9rORJV8/PlYnFn54wzZBAxV+kfURtPoW2ja76LXMOv91/7Og X-Received: by 2002:a17:906:1792:: with SMTP id t18mr10570593eje.38.1623576979436; Sun, 13 Jun 2021 02:36:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623576979; cv=none; d=google.com; s=arc-20160816; b=y9zlQG5THX3ylFb+OEopOTzVr/a3QvaIcKquDLgNUQI7Zd1e97j8aWT+YznYH+aFhM iopDm7i2QhrfRr0wrEsTEbsBj/xEWrdgVoR0N4xhsDzv8GnpWyTJ7FxKGXpNOyJv6zYx 1yK0N0POlAdUo/v+FXSZAvZIS2Eh2Et593Vg9U+mCDc6fUFzc+w28Dtc/a+YvgZnU9E6 J1N+dEHNsTRa8zE/cGVVCEpxh8NqfA1i5mq0P2oPzQEFdXpnEx1KrVFnWj23YMnfcU3L LHvE5xxpTHS+cL52UUyYQw+d3Qe6VnA3JXxSWab5XS/CDb4sZefBTUJYQknJ7c8RNfnc 9R5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:in-reply-to :subject:cc:to:from:message-id:date; bh=mFbnxoY/ZhG3JqvOL1c54Y7W6MoKZUf4F0eADdyElkw=; b=lilxNNNAo0raW83Txnm0leyDzcrG8q3/+vHVQEa1B4PNRJMwyRAxISxnERr0gt+SOu JzFPIUZq5BWDrzxneQq1OvgX0xtUyDuW5FKgl4XQsiJZbu/+2czM+nvQjE3o3zJsiodx KFRcD+X4wEjGu6CI7A1kwSIH4oDl6ICWqpY2+w5LjubjAT7a63m5obuf5t3ogs/Hv8GA uHh+9VeWFOVvsQzZnOx8odL48ztZgUnJ5F9BYQQlbLmQtJy1xTl7GZVYZkZf3uQVKOUJ Jz+Y5jUkYu9jj3Ys8CfRAup3YAnMDs/MxI/hS7D6kE4XX2EaeZiBacrzZYbRYi9WDHeB XD0w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c30si9041778ejj.702.2021.06.13.02.35.45; Sun, 13 Jun 2021 02:36:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S231174AbhFMJfI (ORCPT + 99 others); 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.