From nobody Wed Oct 05 23:21:18 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 4MjVv26Pf6z4fK7n; Wed, 5 Oct 2022 23:21:18 +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 4MjVv25vcVz3Pvm; Wed, 5 Oct 2022 23:21:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1665012078; 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=LzPJ0cWdSSqa3KHXRAv1zZPYzWjl9gV38/LaUvp1erk=; b=n9mMMPNYOL5aIfQZHWe0f7R3LhQyd1XvChjgSYhnH7mnr+G3uV3vCK4wrI7xRwMK8EJGAv 9gJJcCFT+1g2qy/um2bX02srAyN12w3KK8WPMT3MPFIjXHkdIKbyzP1U8HzFGE4XevRr+I iRjWMiIF/KwtR3LS4X2pAwdQCheQvbbFy1IDKJQLGixuUoPUWfwCXLImaDRH0xo/+kSl/4 OyYmXxjzFkqxhzgXf5lrNR7xR0ajsTyCV99kWTZhzOrdjZk4i9a+fV+L65HqJbRw7BUq0y isZZVVesWcrTZ7Wl0X4QNMq/CV8bNK7zZkrV2DT6LdfU1/qYGXrp5TfJIpxHeg== 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 4MjVv24zdxz13kg; Wed, 5 Oct 2022 23:21:18 +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 295NLIs5059695; Wed, 5 Oct 2022 23:21:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 295NLISV059694; Wed, 5 Oct 2022 23:21:18 GMT (envelope-from git) Date: Wed, 5 Oct 2022 23:21:18 GMT Message-Id: <202210052321.295NLISV059694@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: c1ae7841d4e7 - main - arm64: Simplify initialization of pc_freemask. 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: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c1ae7841d4e73f8627bb76b1dc7e094691cc7a54 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1665012078; 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=LzPJ0cWdSSqa3KHXRAv1zZPYzWjl9gV38/LaUvp1erk=; b=lHpvC0RtwfcwCH19083rtpYK76Yv58BP5EDWxyoi7wd7u7RzWoFoMG3Kevj6xEHH0ZdXOe +bKZ63fD3L1qw/6XY8LRAt77OFLtBYUPMKKwom60PuxxbhHujumIEfD7XcUr+q3Twmdc5h Rgd1EqqFsMmMKDcBXt+V051bSsX6EDRABLqfbhRxrfJ0rRCXjg+j+XoNdVQz6FaKnLTo9L yIst37Z/ipE0KjfuD5f5J+WTTRlSl2ErduNxV+H/2xo2FyO1qSZFZ+JXzrDlw6/9fAgTjq aFHHnoBmpE+sGk8famxgfXxFJx1Nf7OF8QxVXzqKUAFzJ3C8gEVqdLkynlrGNw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1665012078; a=rsa-sha256; cv=none; b=f02/bftHM4u80yYFriFZFIch68Br1EeUvTiu0Pa62rxqZltjmxnuguxwW0oBb/zRTVhpY2 HEgn0J3tM3tw0DDAnE4ZXHgd/LvGG+VJGBRzr5u2/jmyNcqT3xEbf16BrDC1MTZiC8t4QR c7EKIC2sOuqppVBUxvhQDdXC/Kxmr6hpMswqeRETOP6Y+kW+aPnZSxoFLR9/cJZQb145fl 2wmqnxJoXzY+03Owv4gzGhdTEYos8W94e0GnDHlpq9JteMPEqS3pyszLZ65iqtzyQmkHt7 eJlpgm67M6ivQU9gtxSPvPA/8xcA4i/y4tVNucmSDrh5g4oULfUjNapjEmotdQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=c1ae7841d4e73f8627bb76b1dc7e094691cc7a54 commit c1ae7841d4e73f8627bb76b1dc7e094691cc7a54 Author: John Baldwin AuthorDate: 2022-10-05 23:20:55 +0000 Commit: John Baldwin CommitDate: 2022-10-05 23:20:55 +0000 arm64: Simplify initialization of pc_freemask. Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D36502 --- sys/arm64/arm64/pmap.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/sys/arm64/arm64/pmap.c b/sys/arm64/arm64/pmap.c index 148e325c84ba..1e9ada8c89f7 100644 --- a/sys/arm64/arm64/pmap.c +++ b/sys/arm64/arm64/pmap.c @@ -2515,16 +2515,11 @@ pv_to_chunk(pv_entry_t pv) #define PC_FREEN 0xfffffffffffffffful #define PC_FREEL ((1ul << (_NPCPV % 64)) - 1) -static const uint64_t pc_freemask[] = { PC_FREEN, PC_FREEN, -#if _NPCM > 3 - PC_FREEN, PC_FREEN, PC_FREEN, PC_FREEN, PC_FREEN, PC_FREEN, PC_FREEN, - PC_FREEN, -#endif - PC_FREEL +static const uint64_t pc_freemask[_NPCM] = { + [0 ... _NPCM - 2] = PC_FREEN, + [_NPCM - 1] = PC_FREEL }; -CTASSERT(nitems(pc_freemask) == _NPCM); - static __inline bool pc_is_full(struct pv_chunk *pc) {