From nobody Mon Sep 25 11:00:49 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 4RvKfn5bJpz4vNPg; Mon, 25 Sep 2023 11:00:49 +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 4RvKfn4k8Kz3Lxx; Mon, 25 Sep 2023 11:00:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695639649; 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=0ygaEuVSsothqGZWZcLZWtKzK/OX6C5QuB6fit/t74g=; b=MV8BUkpxZCrdQqctRCwJjzyGWyspPRlKdA/sGGdRgyVSvZ761a2pIqrLff4nZ8gJ1doWys In9hcFqIpmZ//X8qq9YpOYqNfhDgtGKOBQP7o8Q+riarIrIFyK0KB9q2+sgSCIEV+suBps kzFWq09lXGIrCSG1BjbjJxRWn+qI4lAjpbYsGGONsV5iDaty7WBbmPqRz2P8OgzsrO+mFO JTTxQmrCocSytEZw2Xb93GBFzWf3ss3cT5SauewEZKVZGuDZ4zqwF+OTy/5s4doGuP8GdM JtTTMBE6qkOMkTh9ElWwl0QOiCwpaaPhRSdodUiS6An9dp50WhguS/Tj1b/Vug== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695639649; a=rsa-sha256; cv=none; b=keTm/aqG7GG1+ahthXOKI4JYBGICM4S+fIaY38bgXEJRJaLZTIv/kL6eFRI0FXAbfmenNi 4+nHTO+EIPNYlKfAxX1g/reZ/uxl0WtSTyzwQi733hQllEOahaojJyTqV/nhqa+nXpotjZ 3hPTYwtqiOMP4Nn5a4XF7BVR3Z1zXvlrCEA+xlH97piy7/TAjTuLH1ul781KgBJitBylXZ mlKTQM5l4sI2spBM0kBIS3O8WzoBwk03BUSXEPunap58xUXfRmqoW+V6KvLziRoOMXI2Bl /ySXaE6TLv2Vk6HX6qWx67BhV/4EPIC6eeiY8KHAXgriX0gx5NebO6T+rROcVQ== 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=1695639649; 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=0ygaEuVSsothqGZWZcLZWtKzK/OX6C5QuB6fit/t74g=; b=A3NZqs8cz4a+5H/q6ohMSw3xo+T7wlo0J7drNkGLzL2Zz9rSEnocMKU14PflDagq+6iWx9 OTzmVcyQFbW/pxLWPf6aUfhd6VJFmNqCpuR/Hy8ZQEHzkWsVeFZaSuQPPa7l9MFNFsiJI8 0Eh4MSvAqVizUnJFVEktmqzdT9el92vjCj9jUvFa4iMryKd+Qj9Ps54beh/zNMOvWgTh5d NDti8OJVW7Zv4hrqPtNZuWsP9sP3tm1laLey8NpCNgara5qr4HMdgKSF7XSSmnN+v/NIhL AgZu6LNpyJepbuVZuOVwIgxzPcSwOp1XmwMRDNWWpI9aKp6lVjcQDfoEOFTA9g== 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 4RvKfn3qMfz1QMj; Mon, 25 Sep 2023 11:00:49 +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 38PB0nJI052582; Mon, 25 Sep 2023 11:00:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38PB0nZa052579; Mon, 25 Sep 2023 11:00:49 GMT (envelope-from git) Date: Mon, 25 Sep 2023 11:00:49 GMT Message-Id: <202309251100.38PB0nZa052579@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: 2a88ca31330c - stable/13 - Create pmap_mask_set_locked on arm64 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/stable/13 X-Git-Reftype: branch X-Git-Commit: 2a88ca31330c24cdb364218c5e0404b8878fa9f5 Auto-Submitted: auto-generated The branch stable/13 has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=2a88ca31330c24cdb364218c5e0404b8878fa9f5 commit 2a88ca31330c24cdb364218c5e0404b8878fa9f5 Author: Andrew Turner AuthorDate: 2023-04-12 12:09:06 +0000 Commit: Andrew Turner CommitDate: 2023-09-25 08:41:16 +0000 Create pmap_mask_set_locked on arm64 Create a locked version of pmap_mask_set. We will need this for BTI support. Sponsored by: Arm Ltd (cherry picked from commit 421516f25e9cfa91b33841f633a463889bc10af7) --- sys/arm64/arm64/pmap.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/sys/arm64/arm64/pmap.c b/sys/arm64/arm64/pmap.c index cee9ddffddda..edd34bcd5e68 100644 --- a/sys/arm64/arm64/pmap.c +++ b/sys/arm64/arm64/pmap.c @@ -3449,14 +3449,14 @@ pmap_protect_l2(pmap_t pmap, pt_entry_t *l2, vm_offset_t sva, pt_entry_t mask, * pmap and range */ static void -pmap_mask_set(pmap_t pmap, vm_offset_t sva, vm_offset_t eva, pt_entry_t mask, +pmap_mask_set_locked(pmap_t pmap, vm_offset_t sva, vm_offset_t eva, pt_entry_t mask, pt_entry_t nbits, bool invalidate) { vm_offset_t va, va_next; pd_entry_t *l0, *l1, *l2; pt_entry_t *l3p, l3; - PMAP_LOCK(pmap); + PMAP_LOCK_ASSERT(pmap, MA_OWNED); for (; sva < eva; sva = va_next) { l0 = pmap_l0(pmap, sva); if (pmap_load(l0) == 0) { @@ -3549,6 +3549,14 @@ pmap_mask_set(pmap_t pmap, vm_offset_t sva, vm_offset_t eva, pt_entry_t mask, if (va != va_next && invalidate) pmap_invalidate_range(pmap, va, sva, true); } +} + +static void +pmap_mask_set(pmap_t pmap, vm_offset_t sva, vm_offset_t eva, pt_entry_t mask, + pt_entry_t nbits, bool invalidate) +{ + PMAP_LOCK(pmap); + pmap_mask_set_locked(pmap, sva, eva, mask, nbits, invalidate); PMAP_UNLOCK(pmap); }