From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-dl1-f47.google.com (mail-dl1-f47.google.com [74.125.82.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 25A7F2BFC9B for ; Wed, 10 Dec 2025 16:13:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.125.82.47 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765383234; cv=none; b=rYks28jNj7/vGYy55BJOW5LIwUDpM7d0pTizvFoGPl9OP0IWcYNTbTDGzM3SHQQ00Bn/7IxOHGSHJvXvvTVfzzbzhgptUJMVxz/cRpkLNzlxcXTL56J6JGEq3Vd42q7NPwEsC/jJi+WqyIwy1MZm3Hap9HsJf9JfiMgZvEfE5UM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765383234; c=relaxed/simple; bh=oDpw19AYDhsKPqwE33ZOXFntcgHiTkEc0I/reT1h7bY=; h=From:Subject:Date:Message-Id:MIME-Version:Content-Type:To:Cc; b=P7BJIfgBm1dC4ZSfOptF3BeYHRDTOGvCaZThCT88QtqhS7gyXTiWAwqwJe7Do6Enf13ZjuTy0G5/7njaITB1GzuHihGX9yPf89eS0WNQrq5xWeqk5t1tJSJN5P5npmEjYZjRoU/2KUOysmFL5b64aNNfxs7XQAY2b99fi0tc+q8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=rivosinc.com; spf=pass smtp.mailfrom=rivosinc.com; dkim=pass (2048-bit key) header.d=rivosinc.com header.i=@rivosinc.com header.b=FDZb+heA; arc=none smtp.client-ip=74.125.82.47 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=rivosinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=rivosinc.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=rivosinc.com header.i=@rivosinc.com header.b="FDZb+heA" Received: by mail-dl1-f47.google.com with SMTP id a92af1059eb24-11b6bc976d6so1441063c88.0 for ; Wed, 10 Dec 2025 08:13:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc.com; s=google; t=1765383229; x=1765988029; darn=vger.kernel.org; h=cc:to:content-transfer-encoding:mime-version:message-id:date :subject:from:from:to:cc:subject:date:message-id:reply-to; bh=c+4BuqMxZsml/T3w00f03pRuV/LUORx/SyQCTY0UnL0=; b=FDZb+heAozBxqKsGLaUR1anSqRLQzYnr+GXtkWGDL6hUqeyLd6MNw8kTW3Un70/cYC GwElSG0ZucOmUBIdy5WjBPCuao2MQdkhIeqIrpxqcoJarJ/33HQrf1YRGWI8G76/1igd rb6QOQeflmvaJVkJ7sz8XhwDWGmKRxR61LU4nS/z5QABfS9SU8JhNNAgPmtAn8x6GWvE SmLH5FAQ47dfBfWtMqZqazVyCYWzeMUuxl1MsmrISBQNvfIkEFd+a5AmZg2s0UOX5S0G NEKZb6YvNMOIcch0Nt3B/mI5u025qEt9pQm0VR9MkvRA147/6V6I1HdIbA94om0n2t0+ i0ww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1765383229; x=1765988029; h=cc:to:content-transfer-encoding:mime-version:message-id:date :subject:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=c+4BuqMxZsml/T3w00f03pRuV/LUORx/SyQCTY0UnL0=; b=ThjrS/9GtC5b+65VZQKrI/YRRzR4OqDt1RcoYlKE69a+y+T3VRLgjakXHPdAH971Dv e8xdc1FJ11QHGYAO7UIsbH4tS6+N42T+QcoyOJnlEyX6qvRHhB3Q9J+cghoRrmMm6Yun R7Mf0ClG6CvKiNp45dTFwsi+QZDh2CDN5kzigIM2Zs5+w5Rnv9cnUyL7LIFnvfsUMN2s 6mPkFO/HdCtV9V+O7hwHCi4AFXMvh5hJNe2RV0DcPN8+OrXoSJz5Heye2Cp2FKcnnKEr VWyrNC4EwNj4PqY9sDBRVymsksKl+MNWXFRGK5u4ZqMv65nWJz4BFKY6wwJGGArv2Etv 413g== X-Forwarded-Encrypted: i=1; AJvYcCVxqf28cyYwOCAbRdNL0vjW2QajgTChpgabpdIe+CbChe8tyb3GTG8+bapsM1ieNtOtsiiX95YsidQjj88=@vger.kernel.org X-Gm-Message-State: AOJu0Yx8ELoxG+gL91SSsDRUk5BTb8hi2A69dU7VQ+QVqE3A/rTZOJQG uTGZwkgSJobQmQzwVPJGrgSAPrGZ+h0ec3z/hdYtr34dhDw9/ykraCcy/LlTo6PxtIYuQyP9NyU L7F0U X-Gm-Gg: ASbGncuVk6crDQ+9JEof00w+s1HDagXWqLrTGw695RqPD9ChYazXG+6PiVI9xTe/zrD DmfD/eO/6QEa0obar/1kTAGK3NIHM1DuwGJaYfPdAhO6VzEB7Ak5cBjGL+AtyGrsxraQk1Qs8XU ySWNQJ/GpV0Iy0evgN+NWT7rqBpq8Pqh/A36Fqy25Qt8Ro1rHF9rtn8FA+WcpTp44xM8oaC5g4H oaeVPmuzAOkWK43B3JS0KTDhuhjqsflXIclNDGiKWY+iasg6wc/dP+L09Ui1641GOHqe7vc4wzP oehRepT9n5wxaiccg0O0mG+6gB94HjrKAB3u5JywYNfe05l9MVi0GKDsU+0/HN7/jzekLZ2bJQ0 jX8f1s+pHXi3bF8ovr3r88Bkd2gkWvLrQF1y3rQm1ZzvIqewEaeu3vO4thjn9HmAvxmeHX8k99W OH2hMRu8L8HMgQ1EG70GX1TX34wko2G4UM5zuBI2Zcotxo4sIP6BQOwBvfKbXe+QgotCODnLU60 xDFD4F5anjv X-Google-Smtp-Source: AGHT+IFdYa9h0jkY9yGKX56u4TyHn7iUic2XinmYLur7oHcnTo1ydlnzMulcXWIhsW1apYu4kgDp8w== X-Received: by 2002:a05:7022:3845:b0:11b:ade6:45c7 with SMTP id a92af1059eb24-11f293b6807mr2519650c88.3.1765383228597; Wed, 10 Dec 2025 08:13:48 -0800 (PST) Received: from [127.0.1.1] (p7838222-ipoefx.ipoe.ocn.ne.jp. [123.225.39.221]) by smtp.gmail.com with ESMTPSA id a92af1059eb24-11f283d4733sm10364600c88.17.2025.12.10.08.13.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Dec 2025 08:13:48 -0800 (PST) From: Charlie Jenkins X-Google-Original-From: Charlie Jenkins Subject: [PATCH RFC 00/10] riscv: Add support for rva23 Date: Wed, 10 Dec 2025 08:13:37 -0800 Message-Id: <20251210-profiles-v1-0-315a6ff2ca5a@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-B4-Tracking: v=1; b=H4sIADKcOWkC/6tWKk4tykwtVrJSqFYqSi3LLM7MzwNyDHUUlJIzE vPSU3UzU4B8JSMDI1MDM0Mz3YKi/LTMnNRiXcvkZDPjVCPLRMsUSyWg8oKi1LTMCrBR0UpBbs5 KsbW1AAQ7ZHNfAAAA X-Change-ID: 20250616-profiles-9cc63e29a9d9 To: Paul Walmsley , Palmer Dabbelt , Alexandre Ghiti , Anup Patel , Atish Patra , Samuel Holland , =?utf-8?q?Bj=C3=B6rn_T=C3=B6pel?= , Luke Nelson , Xi Wang , Eric Biggers , Conor Dooley Cc: linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, Charlie Jenkins X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1765383226; l=5445; i=thecharlesjenkins@gmail.com; s=20240124; h=from:subject:message-id; bh=oDpw19AYDhsKPqwE33ZOXFntcgHiTkEc0I/reT1h7bY=; b=9G4zeg8W+7TphoTpqoxfI/PgUdvZNYbekQnflf1mLkM4AKNenR5ilmOFJ6ItRvna9a0yuzgdZ EYeDyKYuM8vAv8LEIyhjdto0y2zVQXfMH3AA3dyJCmGedWKZu+X8M+p X-Developer-Key: i=thecharlesjenkins@gmail.com; a=ed25519; pk=eVndo3OHViAjwuqHqbJB4ZtzJzzvk/r6fUf84tZ3rw4= I will be talking about rva23 at Plumbers this year and have this series as a draft of my ideas. rva23 is a RVI profile to group together extensions that are expected to be found on high-performance systems. This series: 1. Introduces a framework to add extensions to the kernel cflags 2. Adds a rva23 config option 3. Optimizes riscv_has_extension_* This is based on 6.18 plus https://lore.kernel.org/linux-riscv/20251020-riscv-altn-helper-wip-v4-0-ef941c87669a@iscas.ac.cn/. Signed-off-by: Charlie Jenkins --- Charlie Jenkins (10): riscv: Standardize extension capitilization riscv: kconfig: Reorganize extensions riscv: kconfig: Simply arch selection riscv: kconfig: Make extensions tristate riscv: kconfig: Add zve32x riscv: Makefile: Add enabled extensions to compiler flags riscv: kconfig: Make vendor extensions tristate riscv: Optimize cpufeature macros for extension assumptions riscv: kconfig: Add rva23 config riscv: csum: Remove inline assembly arch/riscv/Kconfig | 340 +-------------- arch/riscv/Kconfig.extensions | 485 +++++++++++++++++++++ arch/riscv/Kconfig.vendor | 25 +- arch/riscv/Makefile | 136 +++++- arch/riscv/include/asm/arch_hweight.h | 4 +- arch/riscv/include/asm/archrandom.h | 2 +- arch/riscv/include/asm/asm-prototypes.h | 2 +- arch/riscv/include/asm/barrier.h | 2 +- arch/riscv/include/asm/bitops.h | 8 +- arch/riscv/include/asm/checksum.h | 32 -- arch/riscv/include/asm/cmpxchg.h | 14 +- arch/riscv/include/asm/cpufeature-macros.h | 136 ++++-- arch/riscv/include/asm/cpufeature.h | 42 +- arch/riscv/include/asm/hugetlb.h | 2 +- arch/riscv/include/asm/hwcap.h | 18 +- arch/riscv/include/asm/kgdb.h | 2 +- arch/riscv/include/asm/kvm_vcpu_vector.h | 2 +- arch/riscv/include/asm/mmu.h | 2 +- arch/riscv/include/asm/mmu_context.h | 4 +- arch/riscv/include/asm/page.h | 2 +- arch/riscv/include/asm/pgtable-64.h | 2 +- arch/riscv/include/asm/pgtable.h | 6 +- arch/riscv/include/asm/processor.h | 2 +- arch/riscv/include/asm/simd.h | 2 +- arch/riscv/include/asm/swab.h | 2 +- arch/riscv/include/asm/switch_to.h | 4 +- arch/riscv/include/asm/uaccess.h | 2 +- arch/riscv/include/asm/uprobes.h | 2 +- arch/riscv/include/asm/vector.h | 7 +- arch/riscv/include/asm/vendor_extensions.h | 113 ++--- arch/riscv/include/asm/xor.h | 2 +- arch/riscv/kernel/Makefile | 6 +- arch/riscv/kernel/cpufeature.c | 38 +- arch/riscv/kernel/head.S | 2 +- arch/riscv/kernel/kgdb.c | 2 +- arch/riscv/kernel/pi/archrandom_early.c | 1 + arch/riscv/kernel/probes/decode-insn.c | 2 +- arch/riscv/kernel/probes/uprobes.c | 2 +- arch/riscv/kernel/process.c | 10 +- arch/riscv/kernel/ptrace.c | 12 +- arch/riscv/kernel/signal.c | 2 +- arch/riscv/kernel/suspend.c | 8 +- arch/riscv/kernel/sys_hwprobe.c | 4 +- arch/riscv/kernel/tests/kprobes/test-kprobes-asm.S | 6 +- arch/riscv/kernel/vendor_extensions/Makefile | 22 +- arch/riscv/kvm/tlb.c | 2 +- arch/riscv/kvm/vcpu.c | 10 +- arch/riscv/kvm/vcpu_onereg.c | 22 +- arch/riscv/kvm/vcpu_vector.c | 2 +- arch/riscv/lib/Makefile | 14 +- arch/riscv/lib/csum.c | 94 ---- arch/riscv/lib/strcmp.S | 2 +- arch/riscv/lib/strlen.S | 2 +- arch/riscv/lib/strncmp.S | 2 +- arch/riscv/lib/uaccess.S | 4 +- arch/riscv/mm/hugetlbpage.c | 2 +- arch/riscv/mm/pgtable.c | 2 +- arch/riscv/mm/tlbflush.c | 2 +- arch/riscv/net/bpf_jit.h | 2 +- drivers/perf/Kconfig | 2 +- drivers/perf/riscv_pmu_sbi.c | 3 +- lib/crc/riscv/crc-t10dif.h | 2 +- lib/crc/riscv/crc32.h | 8 +- lib/crc/riscv/crc64.h | 4 +- lib/raid6/Makefile | 4 +- lib/raid6/algos.c | 4 +- 66 files changed, 961 insertions(+), 749 deletions(-) --- base-commit: 537904d2226574c759e51bdf301ca8a90d0fdce1 change-id: 20250616-profiles-9cc63e29a9d9 Best regards, -- Charlie Jenkins