Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp5433534rdb; Sun, 31 Dec 2023 00:30:13 -0800 (PST) X-Google-Smtp-Source: AGHT+IEbhYkq2gpBcThUlqUTqRXhuPlvJmWnYApgzRcoQzqrawDrnm+zrE6wRBKctSzAjH62M3w1 X-Received: by 2002:a17:902:e293:b0:1d4:381c:a3e5 with SMTP id o19-20020a170902e29300b001d4381ca3e5mr12159006plc.66.1704011412997; Sun, 31 Dec 2023 00:30:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704011412; cv=none; d=google.com; s=arc-20160816; b=d68POu1k/KsDROJmmTxP06VCeMvSTmxq0IoxL6TOM3C6Lyjda+B9Fv/QPuq+AAaOO0 iN7vC5yT/cSiEDLDIkfmk4GaSMXAYff9pbHD27yGVlJJo9wEmyfT84+GZ+afINqWs/cd GZSlLA3gqHsgGV2ABBc0Hjx8LtpuoqewKYpLZDBWfchwnri1hEw8RHAzPMT0RxmMAW99 3FDbvUuD8fy6f4IUJjxOLA/4IK2KXhp4mr3e6gLOKyOCTSH/CCVWZ8iLLwAz9XUQMuwC Un+Fphm0zW0Z7AWsn/YDCmfi7pYSlpVb/zRZc/9lxbAQok1KPw/UBpB0GHxLfAxuzAYy CUDw== 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:message-id:date:subject:cc:to :from:dkim-signature; bh=dEVzNxcv+LO3XOOYPURO4lOs8CqI3IOCEB2IhiC/EgA=; fh=8az2WX9seVnlqIwzdvRsfDVjT91R5QAYA+cOijWi0GY=; b=MWIrxxYzX/m2mLvNqjt2WiqtzTwAh37cZ89FUN+VIl3hy1PMj8bi/IXosf7A0KfeHg Et+dTCvdE2HwUHB/WCNN6wR7wG+baMDFe3yBEQSgb7VC5qwqSmXu9kPIgfI7CDYKP5CY tuLGZrm/QAjqEPOimW/hZCfmYzd+vWAXZ1rvRToST4qbv2kx+27V3ljKK2vSoxoiDfd5 TCL6RM9yo5bJDL08Al3rfjTMqEUrPvXfzdzI7+9FAhOFlxT6qW+T90WOt2eWgbb57MsW 3LZ7gVRfx5gyT4v0MqGfPLDkJS1e7wocyvD4Lm0A+jCErmfmnVtcRCNfS8fnweqnFpJC Z7XQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=D3VrHiZc; spf=pass (google.com: domain of linux-kernel+bounces-13651-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-13651-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id l5-20020a170902d34500b001c3411c9b83si17055175plk.454.2023.12.31.00.30.12 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 31 Dec 2023 00:30:12 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-13651-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=D3VrHiZc; spf=pass (google.com: domain of linux-kernel+bounces-13651-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-13651-linux.lists.archive=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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 9F5F7282A6D for ; Sun, 31 Dec 2023 08:30:12 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B1616322A; Sun, 31 Dec 2023 08:30:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="D3VrHiZc" 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 CE27323D9 for ; Sun, 31 Dec 2023 08:30:06 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B49B3C433C7; Sun, 31 Dec 2023 08:30:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1704011406; bh=aZhtYj/T/UdJIfbSV07e0EOQZDtYDIT0xAMU5nB5hU0=; h=From:To:Cc:Subject:Date:From; b=D3VrHiZcMw2M0LJxuM7GYDRB+1Fb/LQKhlkIV7VDradB7BcD7/1uLIRcy8sy2gzjO Oui9ZAwWD87lisYtxCBg3NgC1Ekuw+knyUqyBH2HCrLcNDtZI8xUrojoyoE2Lc9Lwz WDJKnyNIjh23gm1qbRyq3XeW+itsHf72Mwo47ZRkr89HiSFnQeUq22qpaapK9j1MZr bj6JfNvAIiXqCLG9B7xKi58so+NL+B3olYel9NIsApj8iljT24Ldi6iZMd7WOebAqL A/iDLywTaiIMiBfgcRu6QATP7wRJx9qozUH/iel95RD5bp3NKY/5VPEiKkS6mIkRbL MBOlezQSLb8QA== 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, 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, ajones@ventanamicro.com Cc: linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, Guo Ren Subject: [PATCH V2 0/3] riscv: Add Zicbop & prefetchw support Date: Sun, 31 Dec 2023 03:29:50 -0500 Message-Id: <20231231082955.16516-1-guoren@kernel.org> X-Mailer: git-send-email 2.40.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Guo Ren This patch series adds Zicbop support and then enables the Linux prefetchw feature. It's based on v6.7-rc7. PATCH[1] - Add Zicbop support PATCH[2] - Add prefetchw support PATCH[3] - Enhance xchg_small Changelog: V2: - Separate from the qspinlock series - Optimize coding convention with last review advice - Add DEFINE_INSN_S type in insn-def.h - Add CBO_PREFETCH_I/R/W V1: https://lore.kernel.org/linux-riscv/20230910082911.3378782-4-guoren@kernel.org/ Guo Ren (3): riscv: Add Zicbop instruction definitions & cpufeature riscv: Add ARCH_HAS_PRETCHW support with Zibop riscv: xchg: Prefetch the destination word for sc.w arch/riscv/Kconfig | 15 ++++++++ arch/riscv/include/asm/cmpxchg.h | 4 +- arch/riscv/include/asm/hwcap.h | 1 + arch/riscv/include/asm/insn-def.h | 60 ++++++++++++++++++++++++++++++ arch/riscv/include/asm/processor.h | 16 ++++++++ arch/riscv/kernel/cpufeature.c | 1 + 6 files changed, 96 insertions(+), 1 deletion(-) -- 2.40.1