From nobody Mon Jul 15 12:38:04 2024 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 4WN1vJ5VT4z5QrX8; Mon, 15 Jul 2024 12:38:04 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WN1vJ3jMXz4Gk1; Mon, 15 Jul 2024 12:38:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721047084; 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=2e1gVUf5v9b9YYAohfuRfbcP0wQViAc03KqFFhzNoWM=; b=xRVbb3Xg3duvI9KMZ5pahJ9XMcrB6sEx4Jj0MBg8ToPMjmAT3RhZdnwEWm4aMfvEclOF2E 6cBaKbyoRuegj5FYpurvaqvqgEZL1IWCROoJLxB5Sr1JzH2B0vCP+j09rqIBSsCXoYr8qk eyLWXJQ7cDeVdTXRjvAVILG074ShikJbNryge3Hx33dq1Fe4nDq91uTb3b9iJdBR4JT6KV SqM90huBsHqaZ+Ma5a0F/sVdvXdQ5/7EejuysQm+P9Gkj6BGAddWWkU8P69NyvT61hCIAT 7uZEe+UDJsAVRl0emZuIu5oUPgUXhd850vMKSF6Ay+VeKUtitBB4U3ba5f+MBA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721047084; a=rsa-sha256; cv=none; b=qBdpdbw7f8DQLZRr2cE17MkdqBDtAlWk3RiLCJn23uh0myZbBMysbPg98Q4OOpL0Msx1ZF Ou+RPtGrZWWp97DaRpFd/jXVgG3bxUm8Y4mJ9Ly9mgr5+NWcJmoXKNgWi4Swy1Ady0Iklz ERndrRd8AulbuY394kHiV38LXxJ2UTvHfdtc+SjaQb9BiGgDxYwAyh4Jxo3pwFty/JSnSG i/tE0m4iJd+flzaOw/K9ybFne6YxZEhb74RJhEOdFPKVl5PSECPHRqEa2/RvB+Wlks/ZPB 0Gh+WVfH9j+DJvYjj7e1VGmaKawOhT0xsm3trQfiv5Gx6ric9SkKJfq4EHm9kg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721047084; 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=2e1gVUf5v9b9YYAohfuRfbcP0wQViAc03KqFFhzNoWM=; b=sartAQ3z39g+GfXF9PEsy+yAwLKi9rCfjL6cHulpxXDQ0SiWkvydeRR0jKavKOdkwnMVr4 gpoQWSqD+z2Ct7DZXElPRsgk0BZTW8S9Il/PoWghNV1yMtFs2cgWf706xg6jWoffVCM/r6 rpcHWcKHkmRew/GbKT5Tdy0drQ0v62IvJNYS+lFXRyHyl+wih7kgfEkEH+EWK5OtrBvllU W1IjkDQ4VHS9OHwO2EMd1eBhxKwmZsTjRA/gyYPARL6wMDEat2mcGDZ8qRHjnhLYyU8lQb KIjQIRelb5GF+EcRwhN3oJETS+rZXB00ZY4kl+NVKPRjeakQJ58gLuukTeq7gw== 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 4WN1vJ3KQVzsJH; Mon, 15 Jul 2024 12:38:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46FCc4sC059495; Mon, 15 Jul 2024 12:38:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46FCc4lS059492; Mon, 15 Jul 2024 12:38:04 GMT (envelope-from git) Date: Mon, 15 Jul 2024 12:38:04 GMT Message-Id: <202407151238.46FCc4lS059492@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Andrew Turner Subject: git: cf5be947352b - stable/14 - arm64: Use a switch to decide when to enable debug 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: cf5be947352bf5956ee98d4ef81050411bd05b08 Auto-Submitted: auto-generated The branch stable/14 has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=cf5be947352bf5956ee98d4ef81050411bd05b08 commit cf5be947352bf5956ee98d4ef81050411bd05b08 Author: Andrew Turner AuthorDate: 2024-03-12 16:47:38 +0000 Commit: Andrew Turner CommitDate: 2024-07-15 12:23:49 +0000 arm64: Use a switch to decide when to enable debug Use a switch statement to decide which exceptions we need to call dbg_enable for. This simplifies adding more esceptions to the list in the future. Reviewed by: jhb Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D44352 (cherry picked from commit d93b3a65f7697630ca1dd2635fc976f3ef36b602) --- sys/arm64/arm64/trap.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/sys/arm64/arm64/trap.c b/sys/arm64/arm64/trap.c index 6534fd2283a1..50f930b66664 100644 --- a/sys/arm64/arm64/trap.c +++ b/sys/arm64/arm64/trap.c @@ -496,9 +496,15 @@ do_el1h_sync(struct thread *td, struct trapframe *frame) * Enable debug exceptions if we aren't already handling one. They will * be masked again in the exception handler's epilogue. */ - if (exception != EXCP_BRK && exception != EXCP_WATCHPT_EL1 && - exception != EXCP_SOFTSTP_EL1) + switch (exception) { + case EXCP_BRK: + case EXCP_WATCHPT_EL1: + case EXCP_SOFTSTP_EL1: + break; + default: dbg_enable(); + break; + } switch (exception) { case EXCP_FP_SIMD: