From patchwork Mon Dec 25 12:58:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guo Ren X-Patchwork-Id: 183189 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:6f82:b0:100:9c79:88ff with SMTP id tb2csp375710dyb; Mon, 25 Dec 2023 05:00:25 -0800 (PST) X-Google-Smtp-Source: AGHT+IF8zFAafBfmVWuIlFuY7sWC9YsVhcQWpR7YOKzX6BtIMUo428iQBLsMNbxkWu0hYjGbmu2U X-Received: by 2002:a05:6a00:1486:b0:6d8:b31e:ac7d with SMTP id v6-20020a056a00148600b006d8b31eac7dmr5874406pfu.7.1703509225466; Mon, 25 Dec 2023 05:00:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703509225; cv=none; d=google.com; s=arc-20160816; b=NAkCwGZeNg2seIdPp6c+Gwn5nrCSNLwiOeM0w8m3yiH1pYlv/2zZXB4nygb8VTqQ+q jWP3urUtcRnh454XmRsYiwCFfWL+PdccurBodzJ2fOcaql/9jGPvInjw34DtbPAonMNc kRbAvi8PPEhXC641nsbgr3iBm4xXgM22iMBfKm+lZQ3JX4MLGHRc8cAadjswh5ANyXJY zhagYzu6NSsNwpRTeCktGMOjHdVvTx0aPA3ebqDivI/qb3TFFNL7rvJze7rqv3DNaDtz PmCofqvK5Jw+ZrwF/TD0gGVW4syc9yZXmbaAL/AsgU1PlInVmoUhFqmB9R/jZR5QgQlT kKDA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=r5e9l8Qv8BuK558P8wywgDQmX1VBdVlCx+L/mNRqk6M=; fh=aos4oD+Llfsos2DBOalqQJ69U2YLuKYcVP3FbCBwZDg=; b=X+JsC4Mr+YKLwbMCAHtInrLtQq/Ep3kMZM77ACy1H5RqPgKnLfoDUcQNtbnR/O/2fh IeTNl5nJ59vUqCvTp+yc001mMcwpwJA39XrCiO19lNwLmBjumZwX0sm8j1Nhiq3HkDZZ 7iIkwblIyDAHoDkOLdmqW+Ho9RUzHShtgIl+LL5vj1DqYxG4QUNMN5qGpUmv7Fdbm0Jo bJj5t8TGJLeiYcp1+0l5yK09PrqQptQU2tY0vnLzMdMyvyHGbXV2437DupRwZ7BTtIPI EP4qzr2dY/3ZzEoLwpvBlSxKyPqhmZmlIZCUSrvUv19sZN4F7XxICNGPl8KPC3XL2lIX HArg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=exz7WcxH; spf=pass (google.com: domain of linux-kernel+bounces-11044-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-11044-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id o4-20020a056a001bc400b006d9bde32376si1152972pfw.260.2023.12.25.05.00.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Dec 2023 05:00:25 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-11044-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=exz7WcxH; spf=pass (google.com: domain of linux-kernel+bounces-11044-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-11044-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 850F7B20DE7 for ; Mon, 25 Dec 2023 13:00:24 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1E41A524A0; Mon, 25 Dec 2023 12:59:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="exz7WcxH" X-Original-To: linux-kernel@vger.kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 88D7E537EE; Mon, 25 Dec 2023 12:59:18 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C88CDC433CA; Mon, 25 Dec 2023 12:59:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1703509158; bh=3EFSZ9V3K5SZT469njNqLUEIh+v/uQJT8cZLmH7rXc4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=exz7WcxHSFJYnV0zYjZwtNq4f0lLoSqmVc7aPMOkBI7D3SflUAJ+y1zbjwumSVf0e NgsXqStjRs3ywmZfyIlZxtyRQONyU88LjNuMJDA2C1VUNoOo8diKKs0mHtJxhcgG3J KUjiuhXwlLSxAn3BHVB7Ft6B9V8kBpoxJOtElXbXyOdClU85R84Jd8tJRwrZoFfzQh LsfSFFGjGX0xvqYm2QIp1L5eqRKcHMi1JVeZSPmTU1BarJ80nAAgNGd0bQPBVKy7iA HI2HR1MPmJQoFnxOoU5SEV8iIO4ctoOpC8X/J9f/X/q+H7AFJwLTlqjWLE2vtSwYau sf5b6rKBzpvPA== From: guoren@kernel.org To: paul.walmsley@sifive.com, palmer@dabbelt.com, guoren@kernel.org, panqinglin2020@iscas.ac.cn, bjorn@rivosinc.com, conor.dooley@microchip.com, leobras@redhat.com, peterz@infradead.org, anup@brainfault.org, keescook@chromium.org, wuwei2016@iscas.ac.cn, xiaoguang.xing@sophgo.com, chao.wei@sophgo.com, unicorn_wang@outlook.com, uwu@icenowy.me, jszhang@kernel.org, wefu@redhat.com, atishp@atishpatra.org Cc: linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, kvm@vger.kernel.org, virtualization@lists.linux-foundation.org, Guo Ren Subject: [PATCH V12 03/14] riscv: errata: Move errata vendor func-id into vendorid_list.h Date: Mon, 25 Dec 2023 07:58:36 -0500 Message-Id: <20231225125847.2778638-4-guoren@kernel.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20231225125847.2778638-1-guoren@kernel.org> References: <20231225125847.2778638-1-guoren@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1786258889540547957 X-GMAIL-MSGID: 1786258889540547957 From: Guo Ren Move errata vendor func-id definitions from errata_list into vendorid_list.h. Unifying these definitions is also for following rwonce errata implementation. Suggested-by: Leonardo Bras Link: https://lore.kernel.org/linux-riscv/ZQLFJ1cmQ8PAoMHm@redhat.com/ Signed-off-by: Guo Ren Signed-off-by: Guo Ren Reviewed-by: Leonardo Bras --- arch/riscv/include/asm/errata_list.h | 18 ------------------ arch/riscv/include/asm/vendorid_list.h | 18 ++++++++++++++++++ 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/arch/riscv/include/asm/errata_list.h b/arch/riscv/include/asm/errata_list.h index 83ed25e43553..31bbd9840e97 100644 --- a/arch/riscv/include/asm/errata_list.h +++ b/arch/riscv/include/asm/errata_list.h @@ -11,24 +11,6 @@ #include #include -#ifdef CONFIG_ERRATA_ANDES -#define ERRATA_ANDESTECH_NO_IOCP 0 -#define ERRATA_ANDESTECH_NUMBER 1 -#endif - -#ifdef CONFIG_ERRATA_SIFIVE -#define ERRATA_SIFIVE_CIP_453 0 -#define ERRATA_SIFIVE_CIP_1200 1 -#define ERRATA_SIFIVE_NUMBER 2 -#endif - -#ifdef CONFIG_ERRATA_THEAD -#define ERRATA_THEAD_PBMT 0 -#define ERRATA_THEAD_CMO 1 -#define ERRATA_THEAD_PMU 2 -#define ERRATA_THEAD_NUMBER 3 -#endif - #ifdef __ASSEMBLY__ #define ALT_INSN_FAULT(x) \ diff --git a/arch/riscv/include/asm/vendorid_list.h b/arch/riscv/include/asm/vendorid_list.h index e55407ace0c3..c503373193d2 100644 --- a/arch/riscv/include/asm/vendorid_list.h +++ b/arch/riscv/include/asm/vendorid_list.h @@ -9,4 +9,22 @@ #define SIFIVE_VENDOR_ID 0x489 #define THEAD_VENDOR_ID 0x5b7 +#ifdef CONFIG_ERRATA_ANDES +#define ERRATA_ANDESTECH_NO_IOCP 0 +#define ERRATA_ANDESTECH_NUMBER 1 +#endif + +#ifdef CONFIG_ERRATA_SIFIVE +#define ERRATA_SIFIVE_CIP_453 0 +#define ERRATA_SIFIVE_CIP_1200 1 +#define ERRATA_SIFIVE_NUMBER 2 +#endif + +#ifdef CONFIG_ERRATA_THEAD +#define ERRATA_THEAD_PBMT 0 +#define ERRATA_THEAD_CMO 1 +#define ERRATA_THEAD_PMU 2 +#define ERRATA_THEAD_NUMBER 3 +#endif + #endif