Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/2194954/?format=api
{ "id": 2194954, "url": "http://patchwork.ozlabs.org/api/patches/2194954/?format=api", "web_url": "http://patchwork.ozlabs.org/project/opensbi/patch/20260210094044.72591-4-ganboing@gmail.com/", "project": { "id": 67, "url": "http://patchwork.ozlabs.org/api/projects/67/?format=api", "name": "OpenSBI development", "link_name": "opensbi", "list_id": "opensbi.lists.infradead.org", "list_email": "opensbi@lists.infradead.org", "web_url": "https://github.com/riscv/opensbi", "scm_url": "", "webscm_url": "", "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "https://github.com/riscv/opensbi/commit/{}" }, "msgid": "<20260210094044.72591-4-ganboing@gmail.com>", "list_archive_url": null, "date": "2026-02-10T09:40:40", "name": "[3/7] include: sbi: Add GET_RDS_NUM/SET(_FP32/_FP64)_RDS macros", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "0e65a03446957681b492e920b436a5074edc5a47", "submitter": { "id": 86401, "url": "http://patchwork.ozlabs.org/api/people/86401/?format=api", "name": "Bo Gan", "email": "ganboing@gmail.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/opensbi/patch/20260210094044.72591-4-ganboing@gmail.com/mbox/", "series": [ { "id": 491635, "url": "http://patchwork.ozlabs.org/api/series/491635/?format=api", "web_url": "http://patchwork.ozlabs.org/project/opensbi/list/?series=491635", "date": "2026-02-10T09:40:41", "name": "Fixes for load/store misaligned and access faults", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/491635/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2194954/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2194954/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "\n <opensbi-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org>", "X-Original-To": "incoming@patchwork.ozlabs.org", "Delivered-To": "patchwork-incoming@legolas.ozlabs.org", "Authentication-Results": [ "legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n secure) header.d=lists.infradead.org header.i=@lists.infradead.org\n header.a=rsa-sha256 header.s=bombadil.20210309 header.b=CxviUYpS;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256\n header.s=20230601 header.b=RNARcEE3;\n\tdkim-atps=neutral", "legolas.ozlabs.org;\n spf=none (no SPF record) smtp.mailfrom=lists.infradead.org\n (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org;\n envelope-from=opensbi-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org;\n receiver=patchwork.ozlabs.org)" ], "Received": [ "from bombadil.infradead.org (bombadil.infradead.org\n [IPv6:2607:7c80:54:3::133])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4f9Gp24HHhz1yBM\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 10 Feb 2026 20:43:03 +1100 (AEDT)", "from localhost ([::1] helo=bombadil.infradead.org)\n\tby bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux))\n\tid 1vpkGk-0000000GlYY-08yk;\n\tTue, 10 Feb 2026 09:42:54 +0000", "from mail-pl1-x62c.google.com ([2607:f8b0:4864:20::62c])\n\tby bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux))\n\tid 1vpkGh-0000000GlWo-2J2v\n\tfor opensbi@lists.infradead.org;\n\tTue, 10 Feb 2026 09:42:52 +0000", "by mail-pl1-x62c.google.com with SMTP id\n d9443c01a7336-2aaf43014d0so12744775ad.2\n for <opensbi@lists.infradead.org>;\n Tue, 10 Feb 2026 01:42:51 -0800 (PST)", "from m91p.airy.home ([172.92.174.155])\n by smtp.gmail.com with ESMTPSA id\n d9443c01a7336-2a9521b8d79sm133219215ad.61.2026.02.10.01.42.48\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Tue, 10 Feb 2026 01:42:49 -0800 (PST)" ], "DKIM-Signature": [ "v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=lists.infradead.org; s=bombadil.20210309; h=Sender:\n\tContent-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post:\n\tList-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:\n\tMessage-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description:\n\tResent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:\n\tList-Owner; bh=8H593/Z/aC6i+RiUxsH8bGzqZkFONzMmJyfSpgrgkug=; b=CxviUYpSwwJErD\n\tBP3nBGYNtyxFocDllqTzxsVlWjAfGLfiJ3YpCA51DY9EabjFsknA1k8u66wapRZdD75hi9Oyq6zbv\n\t/8klX4GZQm3D7mHWtbqJKoLCQtu65DteyTWVEvFExF9HHYagPb4vGRuwmgZfpzSkTPfWi6DhVgXjA\n\tkhNffFlniJyyYZ7BDTySeijDD3315tduFJhrTpbyD0UmgW2dxCq2T0YRAaWYOBlLo9J5JF9qsTUjE\n\tO0rYGbLekAqht7LZD2umKd05861xssYbX/llT3tTxfL3QHviZVRk2FvILVeAs5/n2nFKhWbg+cZnV\n\titO/fuimvqMs/fq2nRJQ==;", "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=gmail.com; s=20230601; t=1770716570; x=1771321370;\n darn=lists.infradead.org;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:from:to:cc:subject:date\n :message-id:reply-to;\n bh=/bkjdIum4lcMrA2StibKHdYOtNoDEOCiqfZj+LFF2Xs=;\n b=RNARcEE3hn0Iyh13y9szNLbM1kfC/zqOIJ6kXW+0AdJNHI22rbJw3JXzJjj3YP2i35\n INWnsbxCwviFvGX8/o9QQj7cUr9s5TjP8vhvDRPWrxeVOzIrBW2KGQpMio5TbKuDLSoi\n a9JFzyYYOaILOfMwY/CxVkgYkQnRG7koX9oWXFWFI1XuvvtQ/BpUheWOYP6NpwfoI8oK\n JB7FWrAeTPtA3bGE7VV7llUaPRavebhEcii00J8vSZyRxB+OBwubAKbSyWi6RXNGh+nd\n fzmS99k/bBDt9ujv7tcgiIvI1+CJR/vMXa9dwH5+ciUNZOfFO13ktJqnd+GZNUlCfRAi\n lVaw==" ], "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20230601; t=1770716570; x=1771321370;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from\n :to:cc:subject:date:message-id:reply-to;\n bh=/bkjdIum4lcMrA2StibKHdYOtNoDEOCiqfZj+LFF2Xs=;\n b=UzjwCdkNK/9xSAxtxc/G6x62O9Qwxw0mtv35w8ZIQByNAdw7bA9+EBX67xvnLzl3+K\n WBLeyfVSB/HJnnZly4o+iu7qZspuRYQ9AyQaA+7SqyBSb3lEvEfOylWbslM86S5jKeKT\n z7pr+xByh69CFtwW4yBOF5QT8TGrqS+QVNG7ptRz/szpbe+qEkfaT6FFthTpeBG8Prph\n nr2Sfc6+0tU7z4xqdZlMoOPlhYaBq3f780ILBRQFEv32UdHKRH4w4tDhBb2l2UCV7r5+\n /xo0+Dmvi8MDcmeIfCDCO5y+dTZVP2IYPQwTGS9kjH8QZTwbqWXVTqpZXVeDl6nvBiFm\n xnOg==", "X-Gm-Message-State": "AOJu0YySSkGW+7YgOvryl/lKw1OUQGnFnWCBXNtsH6cS2zugJsDKs079\n\tUM9Jl69ZAV8YdK7m2fnFjNEw0LLHvm+fplMPNwbd4wzh+uR26oDMKTxHxxAjAA==", "X-Gm-Gg": "AZuq6aL967gPAEfrDfsB9lqJ4+dIE5tsAHhiWuq/AyCoFN/j1Sw7/Nex2Kp2rx/l6Yb\n\tQ4xL4njIHcHTrucmXkQ0CWDmpBpq3hEwkXlNYDGQq3yPng+cREZh5+OOb9DBHdcYu/i7durl8BD\n\tTGr9pxLdKPGnfjb+1bVc7jhehOFjLujr2FThtmUYvUqbJHNN9W6v75Wre5E/ZbUdfFNh9Ne6mE+\n\teQF3gn3UIFXygKPLwKDaghA+tgA6M3cJjBhk/tFVP6yYnNtKsxH0Sde32ilSoatj7u5Q3cwSYPS\n\tY6ChZxrQQeGVwRGa3Uy0/s7Vq17yOASogc0RRc2oI0puYemzkQgBIcoKWUEiQS2P5XbqBv3HECb\n\ttujzSWB3utVGDfeCEsJHNZGVg4GVRBVQgalEDo7SL84EyWels9Tizk9ti2y2NpYOvEpLF7nLqjD\n\twSH5iqYyBgy2TdgLgovKDp3org", "X-Received": "by 2002:a17:903:41c7:b0:2a9:410:23fe with SMTP id\n d9443c01a7336-2ab10a1a54bmr16974875ad.36.1770716570006;\n Tue, 10 Feb 2026 01:42:50 -0800 (PST)", "From": "Bo Gan <ganboing@gmail.com>", "To": "opensbi@lists.infradead.org,\n\tdramforever@live.com,\n\tanup.patel@oss.qualcomm.com", "Cc": "anup@brainfault.org,\n\tcleger@rivosinc.com,\n\tsamuel.holland@sifive.com", "Subject": "[PATCH 3/7] include: sbi: Add GET_RDS_NUM/SET(_FP32/_FP64)_RDS macros", "Date": "Tue, 10 Feb 2026 01:40:40 -0800", "Message-Id": "<20260210094044.72591-4-ganboing@gmail.com>", "X-Mailer": "git-send-email 2.34.1", "In-Reply-To": "<20260210094044.72591-1-ganboing@gmail.com>", "References": "<20260210094044.72591-1-ganboing@gmail.com>", "MIME-Version": "1.0", "X-CRM114-Version": "20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 ", "X-CRM114-CacheID": "sfid-20260210_014251_587491_C44D3C75 ", "X-CRM114-Status": "GOOD ( 10.25 )", "X-Spam-Score": "-2.1 (--)", "X-Spam-Report": "Spam detection software,\n running on the system \"bombadil.infradead.org\",\n has NOT identified this incoming email as spam. The original\n message has been attached to this so you can view it or label\n similar future email. If you have any questions, see\n the administrator of that system for details.\n Content preview: These macros can be used to decode rd' and set rd' in RVC\n instructions Signed-off-by: Bo Gan --- include/sbi/riscv_encoding.h | 1 +\n include/sbi/riscv_fp.h | 24 ++++++++++++++++++------ include/sbi/sbi_trap.h\n | 1 + 3 files changed, 20 insertions(+), 6 deletions(-)\n Content analysis details: (-2.1 points, 5.0 required)\n pts rule name description\n ---- ----------------------\n --------------------------------------------------\n -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no\n trust\n [2607:f8b0:4864:20:0:0:0:62c listed in]\n [list.dnswl.org]\n 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record\n -0.0 SPF_PASS SPF: sender matches SPF record\n -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from\n author's\n domain\n -0.1 DKIM_VALID Message has at least one valid DKIM or DK\n signature\n 0.1 DKIM_SIGNED Message has a DKIM or DK signature,\n not necessarily valid\n -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from\n envelope-from domain\n -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1%\n [score: 0.0000]\n 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail\n provider\n [ganboing(at)gmail.com]", "X-BeenThere": "opensbi@lists.infradead.org", "X-Mailman-Version": "2.1.34", "Precedence": "list", "List-Id": "<opensbi.lists.infradead.org>", "List-Unsubscribe": "<http://lists.infradead.org/mailman/options/opensbi>,\n <mailto:opensbi-request@lists.infradead.org?subject=unsubscribe>", "List-Archive": "<http://lists.infradead.org/pipermail/opensbi/>", "List-Post": "<mailto:opensbi@lists.infradead.org>", "List-Help": "<mailto:opensbi-request@lists.infradead.org?subject=help>", "List-Subscribe": "<http://lists.infradead.org/mailman/listinfo/opensbi>,\n <mailto:opensbi-request@lists.infradead.org?subject=subscribe>", "Content-Type": "text/plain; charset=\"us-ascii\"", "Content-Transfer-Encoding": "7bit", "Sender": "\"opensbi\" <opensbi-bounces@lists.infradead.org>", "Errors-To": "opensbi-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org" }, "content": "These macros can be used to decode rd' and set rd' in RVC instructions\n\nSigned-off-by: Bo Gan <ganboing@gmail.com>\n---\n include/sbi/riscv_encoding.h | 1 +\n include/sbi/riscv_fp.h | 24 ++++++++++++++++++------\n include/sbi/sbi_trap.h | 1 +\n 3 files changed, 20 insertions(+), 6 deletions(-)", "diff": "diff --git a/include/sbi/riscv_encoding.h b/include/sbi/riscv_encoding.h\nindex 8ab59abe..064ba9d1 100644\n--- a/include/sbi/riscv_encoding.h\n+++ b/include/sbi/riscv_encoding.h\n@@ -1414,6 +1414,7 @@\n #define GET_RS2S_NUM(insn)\t\tRVC_RS2S(insn)\n #define GET_RS2C_NUM(insn)\t\tRVC_RS2(insn)\n #define GET_RD_NUM(insn)\t\t((insn & MASK_RD) >> SH_RD)\n+#define GET_RDS_NUM(insn)\t\tRVC_RS2S(insn)\n #define GET_CSR_NUM(insn)\t\t((insn & MASK_CSR) >> SHIFT_CSR)\n #define GET_AQRL(insn)\t\t\t((insn & MASK_AQRL) >> SHIFT_AQRL)\n \ndiff --git a/include/sbi/riscv_fp.h b/include/sbi/riscv_fp.h\nindex f523c56e..03011af9 100644\n--- a/include/sbi/riscv_fp.h\n+++ b/include/sbi/riscv_fp.h\n@@ -91,15 +91,27 @@\n #define GET_F64_RS1(insn, regs) (GET_F64_REG(insn, 15, regs))\n #define GET_F64_RS2(insn, regs) (GET_F64_REG(insn, 20, regs))\n #define GET_F64_RS3(insn, regs) (GET_F64_REG(insn, 27, regs))\n-#define SET_F32_RD(insn, regs, val) \\\n-\t(SET_F32_REG(insn, 7, regs, val), SET_FS_DIRTY(regs))\n-#define SET_F64_RD(insn, regs, val) \\\n-\t(SET_F64_REG(insn, 7, regs, val), SET_FS_DIRTY(regs))\n+#define SET_F32_RD(insn, regs, val) do {\t\\\n+\tSET_F32_REG(insn, 7, regs, val);\t\\\n+\tSET_FS_DIRTY(regs);\t\t\t\\\n+} while(0)\n+#define SET_F64_RD(insn, regs, val) do {\t\\\n+\tSET_F64_REG(insn, 7, regs, val);\t\\\n+\tSET_FS_DIRTY(regs);\t\t\t\\\n+} while(0)\n \n #define GET_F32_RS2C(insn, regs) (GET_F32_REG(insn, 2, regs))\n-#define GET_F32_RS2S(insn, regs) (GET_F32_REG(RVC_RS2S(insn), 0, regs))\n+#define GET_F32_RS2S(insn, regs) (GET_F32_REG(GET_RS2S_NUM(insn), 0, regs))\n #define GET_F64_RS2C(insn, regs) (GET_F64_REG(insn, 2, regs))\n-#define GET_F64_RS2S(insn, regs) (GET_F64_REG(RVC_RS2S(insn), 0, regs))\n+#define GET_F64_RS2S(insn, regs) (GET_F64_REG(GET_RS2S_NUM(insn), 0, regs))\n+#define SET_F32_RDS(insn, regs, val) do {\t\t\\\n+\tSET_F32_REG(GET_RDS_NUM(insn), 0, regs, val);\t\\\n+\tSET_FS_DIRTY(regs);\t\t\t\t\\\n+} while(0)\n+#define SET_F64_RDS(insn, regs, val) do {\t\t\\\n+\tSET_F64_REG(GET_RDS_NUM(insn), 0, regs, val);\t\\\n+\tSET_FS_DIRTY(regs);\t\t\t\t\\\n+} while(0)\n \n #endif\n \ndiff --git a/include/sbi/sbi_trap.h b/include/sbi/sbi_trap.h\nindex 4ef672f4..816e93c8 100644\n--- a/include/sbi/sbi_trap.h\n+++ b/include/sbi/sbi_trap.h\n@@ -218,6 +218,7 @@ _Static_assert(\n #define GET_RS2S(insn, regs)\t\tREG_VAL(GET_RS2S_NUM(insn), regs)\n #define GET_RS2C(insn, regs)\t\tREG_VAL(GET_RS2C_NUM(insn), regs)\n #define SET_RD(insn, regs, val)\t\t(REG_VAL(GET_RD_NUM(insn), regs) = (val))\n+#define SET_RDS(insn, regs, val)\t(REG_VAL(GET_RDS_NUM(insn), regs) = (val))\n \n /** Representation of trap details */\n struct sbi_trap_info {\n", "prefixes": [ "3/7" ] }