From nobody Wed Oct 12 20:07:20 2022 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 4MnkG05M7wz4dwcy; Wed, 12 Oct 2022 20:07:20 +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 4MnkG04shZz3pLH; Wed, 12 Oct 2022 20:07:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1665605240; 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=hdOCUA4/9tvSzumjHasP2BTGUIPmnA3jTTYroy6o46U=; b=q5iJh2gc/DUbLhM0c2+JIxU2mb9pD91qBENj75pLG3CWM6DfEUwSIp38lpEeEn/yA09hx4 9+lYpPwV7E8XJ3ODr6EcpUE5SOV0ljerQM4a75p/YZolRD1SCtCyBFAENwg+sNysIRdD6L GxLG7Qwi2ei2KhB2HDlIrZQSHDuTHNV4UwHJKW39CAM5mPCGiJpQAqCTYfoilETl10DmG7 FPKrvH754v5S87+lZIAcmmk5THG8ndQ725BdJG8g9rWAZySGkDWtU/uRJaOPz8chRCrVe8 D5rNp9kv/WJxnpMZct4ZSpOYPnZG5iY9ivvf3Lg0v7C47V1cN0dPQ51sL7nhQg== 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 4MnkG03xBmz1QFH; Wed, 12 Oct 2022 20:07:20 +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 29CK7Kwe057790; Wed, 12 Oct 2022 20:07:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 29CK7KSS057789; Wed, 12 Oct 2022 20:07:20 GMT (envelope-from git) Date: Wed, 12 Oct 2022 20:07:20 GMT Message-Id: <202210122007.29CK7KSS057789@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: b34a6e0fed4a - main - dtrace: Drop illumos ifdefs for CPU register definitions 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/main X-Git-Reftype: branch X-Git-Commit: b34a6e0fed4af33671c79347deb77e3e93930df3 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1665605240; 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=hdOCUA4/9tvSzumjHasP2BTGUIPmnA3jTTYroy6o46U=; b=bUkQkyU/74zWnG+nrNfkfJAeFPbyzA+XUAraR9jJ/Z8UjKeng0i5IudEc2vwFJ2nw4gYNV 0SYvcl3sJ5SLKm1pGq7BD7j4VFEG//30LtOkw8vME9hSoZITfp/CGqX6sju9K8pknd8SZw Zn4KyAUXiHEXL5lCEQT2iBx2pWV/sGuu1xPFOuAJwYFIqcp03r/EbfmCMPD/H6LDtSkGpa X8SuR1mS+v3o7ajPZoMUdpRV8TySTmNsnBWowGsXTvROyiVjTGg3W1Niu3tSqnCTu8IWw3 eHeXTF5YhUTiPzXtpHWuOrPM48nnjuRS7kpn1sacBo/SFuDjRxoXcNmD3NGN0g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1665605240; a=rsa-sha256; cv=none; b=ldW8XIZjl0vKMmkZb5tA+1uF+dyrHuCivLWxZQYzPPb9A/A1EUDFhA437jBGQitMjjkoKx JlhtjO8SpwcLknQyEPbslGzfKFSBTXdkzPf1yYt4v7yZ6KeG4K0x5gEdUNZ0M+KoqeEki5 bZyHwFnXwPL2XaFjEdRDuanJenQlv8FUlJZzGXDyso1bC9NQc4gvCjczoziuaarJTRC8n/ 3uLVYePufXO6muWvTDq6gkOXsOvrOIzG16cxt/b+GY6GTYDZbq1sW7SFOXa6myjaK3Xbwq sxP0gwpOMeflzYrEJkM1yICbkvMxwMIP5kDiY4b6NlHMVEQ7MZqIZ9v4N3G4RQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=b34a6e0fed4af33671c79347deb77e3e93930df3 commit b34a6e0fed4af33671c79347deb77e3e93930df3 Author: Mark Johnston AuthorDate: 2022-10-12 19:59:00 +0000 Commit: Mark Johnston CommitDate: 2022-10-12 20:06:33 +0000 dtrace: Drop illumos ifdefs for CPU register definitions These are fixed, so having upstream's version is not especially useful, and the duplicated definitions make for confusing reading. No functional change intended. MFC after: 1 week --- sys/cddl/dev/dtrace/amd64/dtrace_isa.c | 8 ------ sys/cddl/dev/dtrace/x86/regset.h | 52 ---------------------------------- 2 files changed, 60 deletions(-) diff --git a/sys/cddl/dev/dtrace/amd64/dtrace_isa.c b/sys/cddl/dev/dtrace/amd64/dtrace_isa.c index 71b448a99c1c..55e51cee14d8 100644 --- a/sys/cddl/dev/dtrace/amd64/dtrace_isa.c +++ b/sys/cddl/dev/dtrace/amd64/dtrace_isa.c @@ -501,11 +501,7 @@ dtrace_getreg(struct trapframe *rp, uint_t reg) REG_SS /* 18 SS */ }; -#ifdef illumos - if (reg <= SS) { -#else /* !illumos */ if (reg <= GS) { -#endif if (reg >= sizeof (regmap) / sizeof (int)) { DTRACE_CPUFLAG_SET(CPU_DTRACE_ILLOP); return (0); @@ -514,11 +510,7 @@ dtrace_getreg(struct trapframe *rp, uint_t reg) reg = regmap[reg]; } else { /* This is dependent on reg.d. */ -#ifdef illumos - reg -= SS + 1; -#else /* !illumos */ reg -= GS + 1; -#endif } switch (reg) { diff --git a/sys/cddl/dev/dtrace/x86/regset.h b/sys/cddl/dev/dtrace/x86/regset.h index ad12e26a5aec..b480e411e6c2 100644 --- a/sys/cddl/dev/dtrace/x86/regset.h +++ b/sys/cddl/dev/dtrace/x86/regset.h @@ -61,35 +61,6 @@ extern "C" { #define REG_GSBASE 27 #define REG_FSBASE 26 -#ifdef illumos -#define REG_DS 25 -#define REG_ES 24 - -#define REG_GS 23 -#define REG_FS 22 -#define REG_SS 21 -#define REG_RSP 20 -#define REG_RFL 19 -#define REG_CS 18 -#define REG_RIP 17 -#define REG_ERR 16 -#define REG_TRAPNO 15 -#define REG_RAX 14 -#define REG_RCX 13 -#define REG_RDX 12 -#define REG_RBX 11 -#define REG_RBP 10 -#define REG_RSI 9 -#define REG_RDI 8 -#define REG_R8 7 -#define REG_R9 6 -#define REG_R10 5 -#define REG_R11 4 -#define REG_R12 3 -#define REG_R13 2 -#define REG_R14 1 -#define REG_R15 0 -#else /* !illumos */ #define REG_SS 25 #define REG_RSP 24 #define REG_RFL 23 @@ -116,33 +87,11 @@ extern "C" { #define REG_R13 2 #define REG_R14 1 #define REG_R15 0 -#endif /* illumos */ /* * The names and offsets defined here are specified by i386 ABI suppl. */ -#ifdef illumos -#define SS 18 /* only stored on a privilege transition */ -#define UESP 17 /* only stored on a privilege transition */ -#define EFL 16 -#define CS 15 -#define EIP 14 -#define ERR 13 -#define TRAPNO 12 -#define EAX 11 -#define ECX 10 -#define EDX 9 -#define EBX 8 -#define ESP 7 -#define EBP 6 -#define ESI 5 -#define EDI 4 -#define DS 3 -#define ES 2 -#define FS 1 -#define GS 0 -#else /* !illumos */ #define GS 18 #define SS 17 /* only stored on a privilege transition */ #define UESP 16 /* only stored on a privilege transition */ @@ -162,7 +111,6 @@ extern "C" { #define DS 2 #define ES 1 #define FS 0 -#endif /* illumos */ #define REG_PC EIP #define REG_FP EBP