From nobody Fri May 31 21:54:58 2024 X-Original-To: dev-commits-src-main@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 4VrcNg0Vwcz5LTpC; Fri, 31 May 2024 21:54:59 +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 4VrcNg03Gfz4fg0; Fri, 31 May 2024 21:54:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1717192499; 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=rcS0o5/MaJOQ9OyAJO3+ty/5hGqZMUxlTynNluaNrpw=; b=QRygYUTsNLnD/jb/k3DDGFSadyI+9Rq/iptMgvHVOj5ga1ZmfNubusBn4GJUG5DsdSTkpX jcUF9+gAD5v/b6rzNPSLNakqG1HkRPw81NgZCnyWCy55J2NYH/bVHgvNS0e7WEqFE+TWji 1n5cSABn21GJeGGHFtfNd0zGoFcgV8adr050FyqfheiHjWH6GOZWmuYsJb/3CxxV0f+oAT GL+jSyvRA5XUcEAvMWqdzqcpYxNEAktI5Jpj5uLnUr27Ehd62ard/wZy9NP9byyq50mUHn QAXnag3B+aNIXDE7pUFtNEImhEhq298DEcsCtE6VoysgVGQaqP5VkjQg7JR7JQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1717192499; a=rsa-sha256; cv=none; b=Lcyo7srRG0ygaLdHjFajnXLOktx3967iKjfzS0x5A/ZIV0Cjm9Dy0t0NfBfP9pB4n5EefN 29AMiEAP/MHKlmej7VVlFbQ8NzPy0sE159K3giLlUymG6X12tg+Btq4iLWpRqd8JFSBKKd HiNJrFKx534lQIlxIpH/MqDwQZkfnzGcyPKsso/9RHgIfr9ok3TVSS1VSh7lvgg4YH6Enr imFa6gKeN88wsNXyJEVr63vkl6wKUmJOjtBZapiIO/wPdSKyM2oQ/e92+197TpzHysbJcM luDV+u8x8vavUMLJ7FBympp1KTfHJRMnIAKVCo4EC//dVFvb8KBo1q8Jl2Brmg== 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=1717192499; 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=rcS0o5/MaJOQ9OyAJO3+ty/5hGqZMUxlTynNluaNrpw=; b=XqdXwx5CVuTUbI9xQdrsHO/WjSTYH0ieZrLg5ZlmnwjbxW+LT33i8iqrV817dDzodtMVlG LJst/j/VwgaGWJv0OH4e4CskUm/6bdydtTt42xQCZAB2lzZIXc9k8uOsFe+d5xWoVBh7Rb kCXPyjJWN4OPHYALLwhkMiwdjZP9zxtqVAgd8Psg34+lVmd4kfotqrfImMf5bf6rzoFN+l E9kH+nbHb1X1HpRU9TuBnHbvR53oHNG4brzHGSY0jvJPFh1LdmpVla/3Y2u1OxP+8NPLsD o1GUeE80VdyfPnki4uKFpXz7g915EKC+y+naAsVdcrfC9cTETdk5+39NFi55hg== 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 4VrcNf6mgDzhVR; Fri, 31 May 2024 21:54:58 +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 44VLswm6004883; Fri, 31 May 2024 21:54:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44VLswRX004880; Fri, 31 May 2024 21:54:58 GMT (envelope-from git) Date: Fri, 31 May 2024 21:54:58 GMT Message-Id: <202405312154.44VLswRX004880@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alan Cox Subject: git: 3dc2a8848986 - main - arm64 pmap: Convert panic()s to KASSERT()s List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: alc X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3dc2a8848986df2c10ae7df4ce87a1538f549a85 Auto-Submitted: auto-generated The branch main has been updated by alc: URL: https://cgit.FreeBSD.org/src/commit/?id=3dc2a8848986df2c10ae7df4ce87a1538f549a85 commit 3dc2a8848986df2c10ae7df4ce87a1538f549a85 Author: Alan Cox AuthorDate: 2024-05-31 17:22:14 +0000 Commit: Alan Cox CommitDate: 2024-05-31 21:54:27 +0000 arm64 pmap: Convert panic()s to KASSERT()s There is no reason for the ATTR_SW_NO_PROMOTE checks in pmap_update_{entry,strided}() to be panic()s instead of KASSERT()s. Requested by: markj Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D45424 --- sys/arm64/arm64/pmap.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/sys/arm64/arm64/pmap.c b/sys/arm64/arm64/pmap.c index cd7837e58380..aaba6ca189a1 100644 --- a/sys/arm64/arm64/pmap.c +++ b/sys/arm64/arm64/pmap.c @@ -4565,9 +4565,8 @@ pmap_update_entry(pmap_t pmap, pd_entry_t *ptep, pd_entry_t newpte, register_t intr; PMAP_LOCK_ASSERT(pmap, MA_OWNED); - - if ((newpte & ATTR_SW_NO_PROMOTE) != 0) - panic("%s: Updating non-promote pte", __func__); + KASSERT((newpte & ATTR_SW_NO_PROMOTE) == 0, + ("%s: Updating non-promote pte", __func__)); /* * Ensure we don't get switched out with the page table in an @@ -4608,9 +4607,8 @@ pmap_update_strided(pmap_t pmap, pd_entry_t *ptep, pd_entry_t *ptep_end, register_t intr; PMAP_LOCK_ASSERT(pmap, MA_OWNED); - - if ((newpte & ATTR_SW_NO_PROMOTE) != 0) - panic("%s: Updating non-promote pte", __func__); + KASSERT((newpte & ATTR_SW_NO_PROMOTE) == 0, + ("%s: Updating non-promote pte", __func__)); /* * Ensure we don't get switched out with the page table in an