Received: by 2002:a05:7412:1703:b0:e2:908c:2ebd with SMTP id dm3csp1908782rdb; Sun, 27 Aug 2023 02:30:47 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFxdRvccH3D2trRraheG7M55slj+DriTEu2UZXmhOFJ3KggnMNqO6B0vjP/bS3+uK97MPCR X-Received: by 2002:a17:903:1111:b0:1b9:de75:d5bb with SMTP id n17-20020a170903111100b001b9de75d5bbmr32442165plh.7.1693128647174; Sun, 27 Aug 2023 02:30:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1693128647; cv=none; d=google.com; s=arc-20160816; b=PESU+cR3uhEX7CPDLJjwMjjsm/0DcYNlJEQw9GmSZ/4kRYMYjq6rI5mSfw5a3M3Jtr B5Etw5c9FG3FqzCtr1DyiOj2sE1lHM4Z7QX8L0MkqRtVHT6nT/wPvdU4ou8IJgZFMpgH HOYVPFyYIunZph+WQrExLeubyCkZQ/USlm1RB4zWv4DTYQGa9UgDNkc1xF9lpd7cvB5W 22LAzHvdEVW6lHr0J8osym/ntuYe8Ntego9bZEZ6/gm8xs+Uh6CBtPzvia9oI8hF85eJ UZWv0b6OvllTRQmLr0ykBNV3K0OhgUy71t+QiHUxjpSjE2Oq8qOK7SmgZ/S1hovAzcoT qpnA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=QwjAZSXX2cKitmgJdEGVIrEZhezbWIG5s+64Q9fXgh0=; fh=vKw113UNC0xr8RrcKtmeWj9ozsZHz0YK2hoMuPC84dM=; b=aLphn4fXP531xUxSRnl+IJZc+E/MF1vbS/2y9bz7W4huCMk5bt027abpjWhyclXluX OL7bgz1h//wC/laR4KYjq26d3ufo7vAv7OAmjkGFHA3o3e7JpPd+Hj3446yvFyWbC7Am +57a7bDfT1nDnYhu22gLazIjBlrxgg3y6DFrEvYrszeIjrMnYJsR4Ax6NmmLnU/BP2pH qb3rsfnqrkSrM/GsqUir1pSou6XbPc02e9iKoSy+4N45i5JFra79grHf+LMKkg4mbB+m foPs7Ft+rEa/I9N8HVV7JiMowoWzXs5TnjigL4pSJPevmKAcCQw/rPPBrafTpzfExylv dddA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=usLvamgE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x2-20020a170902ea8200b001bdd35033ffsi4893753plb.386.2023.08.27.02.30.10; Sun, 27 Aug 2023 02:30:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=usLvamgE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S230449AbjH0JUw (ORCPT + 99 others); Sun, 27 Aug 2023 05:20:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32968 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230456AbjH0JUS (ORCPT ); Sun, 27 Aug 2023 05:20:18 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DFDC3109 for ; Sun, 27 Aug 2023 02:20:15 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 75FCA60F16 for ; Sun, 27 Aug 2023 09:20:15 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D6044C433C8; Sun, 27 Aug 2023 09:20:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1693128014; bh=wVJEp+DWxjAP9hqubYfmJYRid/a/jKOOXMXkMs86vv4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=usLvamgE7qx33BKjeqfkpc4BxoEL/KXx5jq76XtCseuMSLbZmPX2d/m1jxn/t2SDE eSqzYV0Lv7kQYuB4o7blMl4YnZH+q6ZlSjOFwBqHLC1l79YIToF2CKAlt70qQEraG9 crQZzSLltAjbiTxmVXZ6KSqLOSDoBQz4k7jBoLydhEj9oKPen6mgqggmTvCS/6c1y3 yXWoj+jSrtZRh6HB+IvSE6jbaCA2aBxqL518aT5zRkB9U9GBD3Wh4PKHSFZtIZHskZ q8QRtI7g/Bx0m3tr0Nhe10L5O630jEXbxR1wp8+M3EoBARB/+Wrgu6uZEmDUmsxlPQ tbQ0wJERV9RXg== From: Jisheng Zhang To: Paul Walmsley , Palmer Dabbelt , Albert Ou , Guo Ren Cc: linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, Icenowy Zheng , Sergey Matyukevich , Heiko Stuebner Subject: [PATCH v2 1/2] riscv: errata: fix T-Head dcache.cva encoding Date: Sun, 27 Aug 2023 17:08:12 +0800 Message-Id: <20230827090813.1353-2-jszhang@kernel.org> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230827090813.1353-1-jszhang@kernel.org> References: <20230827090813.1353-1-jszhang@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS autolearn=ham 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 From: Icenowy Zheng The dcache.cva encoding shown in the comments are wrong, it's for dcache.cval1 (which is restricted to L1) instead. Fix this in the comment and in the hardcoded instruction. Signed-off-by: Icenowy Zheng Tested-by: Sergey Matyukevich Reviewed-by: Heiko Stuebner Reviewed-by: Guo Ren --- arch/riscv/include/asm/errata_list.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/riscv/include/asm/errata_list.h b/arch/riscv/include/asm/errata_list.h index fb1a810f3d8c..feab334dd832 100644 --- a/arch/riscv/include/asm/errata_list.h +++ b/arch/riscv/include/asm/errata_list.h @@ -100,7 +100,7 @@ asm volatile(ALTERNATIVE( \ * | 31 - 25 | 24 - 20 | 19 - 15 | 14 - 12 | 11 - 7 | 6 - 0 | * 0000001 01001 rs1 000 00000 0001011 * dcache.cva rs1 (clean, virtual address) - * 0000001 00100 rs1 000 00000 0001011 + * 0000001 00101 rs1 000 00000 0001011 * * dcache.cipa rs1 (clean then invalidate, physical address) * | 31 - 25 | 24 - 20 | 19 - 15 | 14 - 12 | 11 - 7 | 6 - 0 | @@ -113,7 +113,7 @@ asm volatile(ALTERNATIVE( \ * 0000000 11001 00000 000 00000 0001011 */ #define THEAD_inval_A0 ".long 0x0265000b" -#define THEAD_clean_A0 ".long 0x0245000b" +#define THEAD_clean_A0 ".long 0x0255000b" #define THEAD_flush_A0 ".long 0x0275000b" #define THEAD_SYNC_S ".long 0x0190000b" -- 2.40.1