From nobody Thu Mar 21 10:13:50 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 4V0hBV0mpfz5FkNv; Thu, 21 Mar 2024 10:13:54 +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 4V0hBQ5TY2z4505; Thu, 21 Mar 2024 10:13:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711016030; 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=SL0EWkbHlKh5YV0ZJHGRmAqz0yALlxPg2tQGfsgGeW8=; b=rZ6ueoq+usrfxDLeDTD7mt2ElGXkskLaKz62N+a/ZGDUVMDIEYwHSmg1PU6e93p0eKo9TO UoRASfqAc+NvRZGRmm2+NPed8JrCb+hmqYM3TMD6RSlHuTcRaku/mAecMDzn3JfYSxfIJ1 UxFL7y4KIVTYol3DzKtnTIWBmLoKTE2i+nZxtgO/9qDffgK4bh+hBBxYhY6iy3wwo6zbhV Ic3hT50swNJ9PJRUOmamk2zrhUoL1LHYr/lwIxJjDGp6IyTTJ0CTwW9Fd+ZJLw1HmywNNg vWdbnyYO6/iXlsrI9CBx5obvSBN4bZN6CS1fb4/Wn+4MPdK5ed6UpLgxPa2VMA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1711016030; a=rsa-sha256; cv=none; b=ZXrXUYypqOmCXiLs3G6tNq4f/pRtRKS38+MGvleqjQJRNAkRiFtswNfUKMU9oqVCoqPJxz iUlGhmijhv9UnkMEOV5Il6cJthxzHzeQGRxHFjdWl0RUZHnK++AHzT6cnDYrQBmloavhIh zY3Q6RTnIuR85HetsWJq5IVxDGl7FUeN3n2DIiljcwwDAnS1RV5GrSwVbbp2BnQ6PEsKOv wDxHGMgOdY1ujhCbrdqaJPnl0M9H0ZOBoqvAuUnuN59Wrxdk7trT7gUpHuJMRle9rFVSqr dlZ/Nk1g+ZzchylSQqp+1DAhf9tbOGNd8mrmc07cMrECxo/KHsVFyF3oWSaTgQ== 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=1711016030; 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=SL0EWkbHlKh5YV0ZJHGRmAqz0yALlxPg2tQGfsgGeW8=; b=cxU+zK58umQ843g5CsXDEN5w3Y8IQimQ3fs4J2eyPFbAMTNY8R1KNsAj4PyeCll0NSpSl7 1fvL70hCkoLG+qzPXZscaFtojZCFutIkiZ2dUbMoclimVq5HVj9ZGO6NtnacOba9pOCMTc 3hWzdz+Iy1kwE8l7HELUgSYQiqvnubQvGa+Bul+sQIwbZLdixwUnhZ/n0rHdORmDfmWoMB BZuiHqWEeHcs6jdQB6LpTE37R9DJOFYvL38sWu2+txXf70a653kClMWgKl2qpl4SMNQP7u Sq8xeKDw2ge13Kro6KGG2wC/XrDvunDA0KwO/QQbR9/wytAP2/6FtLoN8AAMaQ== 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 4V0hBQ1Z4VzWmj; Thu, 21 Mar 2024 10:13:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42LADo8n032521; Thu, 21 Mar 2024 10:13:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42LADoY6032518; Thu, 21 Mar 2024 10:13:50 GMT (envelope-from git) Date: Thu, 21 Mar 2024 10:13:50 GMT Message-Id: <202403211013.42LADoY6032518@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner Subject: git: d93b3a65f769 - main - 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: 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: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d93b3a65f7697630ca1dd2635fc976f3ef36b602 Auto-Submitted: auto-generated The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=d93b3a65f7697630ca1dd2635fc976f3ef36b602 commit d93b3a65f7697630ca1dd2635fc976f3ef36b602 Author: Andrew Turner AuthorDate: 2024-03-12 16:47:38 +0000 Commit: Andrew Turner CommitDate: 2024-03-21 10:13:24 +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 --- 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 c0066ae7dcad..ec4598c5356f 100644 --- a/sys/arm64/arm64/trap.c +++ b/sys/arm64/arm64/trap.c @@ -498,9 +498,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: