From nobody Sun May 07 17:59:54 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QDsdR18f0z49J0g; Sun, 7 May 2023 17:59:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QDsdR0RXkz48tP; Sun, 7 May 2023 17:59:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683482395; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bHluKRCNIuVKxqxaecsq5mxIUD64zLn2BzL4c3nS0W8=; b=u6C6J/SiA1xmfg5GvnkQwFDuxLbrONIy9SBKsgdkWM87RFwJD6yghAQuxvnDreoOTr8ML6 M/ZEmgwPwPOn7NowwfCavyFAiKzg3xhQvDHPMEKxyAU/ruIXJHPmGl4bvPeMg//mXax5NM X3kcI/Bqx94VmsY4Y3jAIybsk4LPkTHeS+H7giBQqtgbwXEVbQtcw40SSz/yfIjiEq/ZXq BMdjptbs73Uqh6cXW60jcDCqqFeV1UHrGiUxk85Om4O/6wzogViQc2GpUlXxo3QHVEItfK /JhVzwmySghV9+C9JOglqcwxwjDL1fzdOIqPComLYmtcq07K6JJw4zTIzFgwzQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683482395; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bHluKRCNIuVKxqxaecsq5mxIUD64zLn2BzL4c3nS0W8=; b=uV7+uWZgktBxvf2ffS8936zfRFjIHh8837f9kjGM9KNw942Ky9I5+RFL25E27xNzquEOJR M7X8fARQ8ARko0vzVa3EGiF/PxySgVA/Z6WDBsFtvqIi8vengK8BRjPpWIseaBQBLWQP5z FnEmHKAN+BkLomXty2FrPxTrewuiJmtTU24/DWqGIUIDrDtJGhk010pKV4xMvFwzG/BwSK 6Cgh1A84Ch39NpMZ6Pw5f4D2mleDtAmAU4zMHhVdOT4X6bs9eQBQUFCJh/sffK6EErVOii kCJCF+XTE8Tk+7ahlEGkuNCak9eEVtPRGRnJwu6gs5QYHZ4YaDNpquZQIAcaTg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683482395; a=rsa-sha256; cv=none; b=hTuBP/5eoImAEJPQGjMlHKDrcBxYAX/XRKlQlbhZRjmGMqGFaFZTyMsiSDh1PWWu5lnsOD bQODXKL35cZy/GquFH8+kh9rtN/JQlcNxxKF7l0dGBNgY5ScKODHnkvDsVp0LPs1hfCHAi ra8r4dNLBLUz5rEkeyfO8+I6FcQOqU1baUpc9lhSWCvGMG4CpDD4F5YnCoxWlyiu1F7w64 6q5POYImS7KwZX14ibeKWVdrA8WUuSSuNxF7YaVjJDKnBOINY+yVc/GJ2CuHez3hREdXxl MByra3Ui15l+BBpWPsQR53D9/NFqjOWyp3JU2Q2I0L83JpTMvjVlXI0/POPxkA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QDsdQ6P8qzSGc; Sun, 7 May 2023 17:59:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 347HxsXV007785; Sun, 7 May 2023 17:59:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 347HxsYY007784; Sun, 7 May 2023 17:59:54 GMT (envelope-from git) Date: Sun, 7 May 2023 17:59:54 GMT Message-Id: <202305071759.347HxsYY007784@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: facd3a41d9d1 - stable/13 - dtrace: use dtrace_instr_size() in the riscv dtrace_subr.c List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: facd3a41d9d1d27a2cd96ba855fc73b702caa3db Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=facd3a41d9d1d27a2cd96ba855fc73b702caa3db commit facd3a41d9d1d27a2cd96ba855fc73b702caa3db Author: Christos Margiolis AuthorDate: 2023-04-20 16:24:03 +0000 Commit: Mark Johnston CommitDate: 2023-05-07 17:54:08 +0000 dtrace: use dtrace_instr_size() in the riscv dtrace_subr.c No functional change intended. Reviewed by: mhorne, markj MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D39652 (cherry picked from commit 75081b9ed8e67c8443551828f1b5ccf3d449b41b) --- sys/cddl/dev/dtrace/riscv/dtrace_subr.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/sys/cddl/dev/dtrace/riscv/dtrace_subr.c b/sys/cddl/dev/dtrace/riscv/dtrace_subr.c index f32bb3a2343e..3d43adb8a92f 100644 --- a/sys/cddl/dev/dtrace/riscv/dtrace_subr.c +++ b/sys/cddl/dev/dtrace/riscv/dtrace_subr.c @@ -190,8 +190,6 @@ dtrace_gethrestime(void) int dtrace_trap(struct trapframe *frame, u_int type) { - uint16_t insn; - /* * A trap can occur while DTrace executes a probe. Before * executing the probe, DTrace blocks re-scheduling and sets @@ -219,15 +217,10 @@ dtrace_trap(struct trapframe *frame, u_int type) /* * Offset the instruction pointer to the instruction - * following the one causing the fault. Check if the - * instruction is compressed or not. Standard - * instructions always have bits [1:0] == 11. + * following the one causing the fault. */ - insn = *(uint16_t *)frame->tf_sepc; - if (match_opcode(insn, 0x3, 0x3)) - frame->tf_sepc += INSN_SIZE; - else - frame->tf_sepc += INSN_C_SIZE; + frame->tf_sepc += + dtrace_instr_size((uint8_t *)frame->tf_sepc); return (1); default: