Received: by 2002:a05:6a10:7420:0:0:0:0 with SMTP id hk32csp581561pxb; Tue, 15 Feb 2022 22:48:27 -0800 (PST) X-Google-Smtp-Source: ABdhPJzoImJ1futSZ3vDMMjDgtSu3eXwom0J/J1zmSf71OgmI/CRcgyaA8EiqMPzimuo9NMuFs8K X-Received: by 2002:a05:6a00:2cd:b0:4e1:1989:5b7f with SMTP id b13-20020a056a0002cd00b004e119895b7fmr1272054pft.3.1644994107347; Tue, 15 Feb 2022 22:48:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644994107; cv=none; d=google.com; s=arc-20160816; b=xsVTL1Bw7qd0/E8zK+cRKhli1SAKMliRsf2uDbN1OBhp/EcASYsteEBknREew+KzIn c4xhwB2FT+xr6dn5aI0UWOoZamwpT5ULqQpdBWLFxRTkI0m6H6yRLVhRthT9cglIy+I5 +3k0qo0MDdakhzq2IhPlWasnGe8i8jcE4VkAVD9tr1oRfpF2YN2zgrD0IXNgzNbUcIRh 02FMAYSOWF8x+9nHHf57GZCheIGWej6lGtaL3fF5JWLty9kBibvRwmPznsYN+1UUcdVt q/5KKNJkAlepMEu+uLRgd9Rf7SOFBsP80UfTOFBtYVNfNW2rHym3+V2YJTH9yH5PZlXc rAyg== 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=Z0J8uT/MlG3w0v7/uc2AXa/I1ciUjnfuTE3jIsdWuBE=; b=z4Z2deDpguo9jn5tJHhaganTIR4JsZUNaANAR1X0RLbD1vUuujDEwuU8uLa7yiBtdu pOSy3s13CzyfgWpWNwmm9SFtrZZNQSl0I9YZ1X8/BlsD1//5Lc4U3gDnVbK7DzaZ2D4D Bc1etUym7QnIn4n1yZ2bU10zZrwdjtOP2MTw0t/pD9IqHgXG2+v+J0RyBcajVBNm1CIv b0blpUnGugKvlDSoLpFAlWmqL57tXm8T2sA1HMZFtiWwzK/9/6gf/hExRwRd1hQWbqHb G38XUP6yhUpY+sJ45bwTTlwBIIS+7QByrKAqS0UR1eoOrHUysKhZd5G+nWdAGHTxjZCk q0jg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ventanamicro.com header.s=google header.b=JJpel9mF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id g124si4703738pgc.441.2022.02.15.22.48.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Feb 2022 22:48:27 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@ventanamicro.com header.s=google header.b=JJpel9mF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 48E9A209D01; Tue, 15 Feb 2022 22:34:44 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344580AbiBPFV4 (ORCPT + 99 others); Wed, 16 Feb 2022 00:21:56 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:48602 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233336AbiBPFVy (ORCPT ); Wed, 16 Feb 2022 00:21:54 -0500 Received: from mail-pj1-x102d.google.com (mail-pj1-x102d.google.com [IPv6:2607:f8b0:4864:20::102d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A4A5165808 for ; Tue, 15 Feb 2022 21:21:41 -0800 (PST) Received: by mail-pj1-x102d.google.com with SMTP id h14-20020a17090a130e00b001b88991a305so5434754pja.3 for ; Tue, 15 Feb 2022 21:21:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Z0J8uT/MlG3w0v7/uc2AXa/I1ciUjnfuTE3jIsdWuBE=; b=JJpel9mFC6bgnnn5zrLI5AMAFKC+fFMq/rDnPHY6Uk+sFVnXDwtCF4Afqxirozx+JP N6GFFvIyePOq6lbDh1rOUS/zRD1ghlUuus9GvKYNy7DQ5i47A1G2J0R+top/bmbvQrZv +uftVneozuqWDMWmoZS3iqCISZcUMVMrttiWyPeWehICh3GoumGKs6bfleotEd9bHR9f r85jIuOojUPYN2PVrQ93VwL+aC7/NkNhYnjsKiqY4wyWzqaVg/4JP4Lt8BFkaAbE7ruP 9OG9QHnEqX1wxFBGmD9odkCJBYJOcIRzPNrNP6NTGcAjZzLAQwFMyS5w8RdOE5a49K75 ueNA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Z0J8uT/MlG3w0v7/uc2AXa/I1ciUjnfuTE3jIsdWuBE=; b=cdM8u3Xk3KRpPLtibgX48gyf92W600PRjlYXR1L+3idxEEye91FL8fsZJrMF3PYMhF GEZGbbyADELrGq02LIfKHGAhTWpRjZ7MaGn0HJDCz/4JjsoDIyqMn9xN2HP9w4bEfCfN QWfLyxhqEQ6RMWQjfcmhJEebcX3FnHUoItYm23VowAE3ZMTO0F1qEN5rREI0wI1reyl9 qnVGqcEmH9nR7ce96fDaZYFam4vn2s+4P1DWUzpqhqqr1eQC0eOmREmKC/clr6A8ivhn 0yiBvzSGtjbbFnpIMWaumeWQ7a/LvznAfWGmpNw16qoUD5OdnDuRaslgEDEVUUcYhYFa tOLg== X-Gm-Message-State: AOAM533ptRSJRjTA9UJKrC9SLM54ahew9sMjvqYYBYDFomw3jak0Xn3f L4VO8eYMe7xTi4DNQLDHG0mLYQ== X-Received: by 2002:a17:90b:4a4f:b0:1b8:7240:1a47 with SMTP id lb15-20020a17090b4a4f00b001b872401a47mr8442350pjb.84.1644988901155; Tue, 15 Feb 2022 21:21:41 -0800 (PST) Received: from localhost.localdomain ([117.248.109.221]) by smtp.gmail.com with ESMTPSA id ot12sm10775259pjb.22.2022.02.15.21.21.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Feb 2022 21:21:40 -0800 (PST) From: Mayuresh Chitale To: palmer@dabbelt.com, aou@eecs.berkeley.edu, paul.walmsley@sifive.com Cc: anup@brainfault.org, atishp@rivosinc.com, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, Mayuresh Chitale Subject: [RFC PATCH 0/2] Risc-V Svinval support Date: Wed, 16 Feb 2022 10:51:08 +0530 Message-Id: <20220216052110.1053665-1-mchitale@ventanamicro.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 This patch adds support for the Svinval extension version 1.0 as defined in the Risc V Privileged specification. It depends on and needs to be applied on the following patchsets from Atish and Anup respectively: https://patchwork.kernel.org/project/linux-riscv/list/?series=613234 https://patchwork.kernel.org/project/linux-riscv/list/?series=609361 The feature was tested with qemu from latest staging branch with following additional patch: https://lists.nongnu.org/archive/html/qemu-riscv/2022-02/msg00100.html Mayuresh Chitale (2): riscv: enum for svinval extension riscv: mm: use svinval instructions instead of sfence.vma arch/riscv/include/asm/hwcap.h | 1 + arch/riscv/include/asm/tlbflush.h | 14 +++++++ arch/riscv/kernel/cpu.c | 1 + arch/riscv/kernel/setup.c | 1 + arch/riscv/mm/Makefile | 1 + arch/riscv/mm/tlb.S | 53 +++++++++++++++++++++++ arch/riscv/mm/tlbflush.c | 70 ++++++++++++++++++++++++++++--- 7 files changed, 135 insertions(+), 6 deletions(-) create mode 100644 arch/riscv/mm/tlb.S -- 2.25.1