From nobody Fri Oct 07 20:32:44 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 4Mkg3d2B4Nz4dq8G; Fri, 7 Oct 2022 20:32:45 +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 4Mkg3d1bJPz3YJ2; Fri, 7 Oct 2022 20:32:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1665174765; 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=9pNl1zQDLwuhj+dQBhhenXw+8EfLGK/KYA8oH5PJPHw=; b=CmiUiWjomPrgo1O05hBjDpF8nvXEHINqOWoSaiWgyjnkfIPZxLK2iPMMU+FOtoIi5LADmt igXXuOlALBCFA5nH8vSvZkctWsaC50ZpbUY6+7ga9TePYvwd2ZGjr1WQuJyMs0EU1Rv5Sw gFNXckMF4sM1Ez07splvyE93d4dpLXmqbxhpQI6gsHhOvqlaeWGREN21PvWE1QtCcVEm6w BrkV5t37CXA5P7hwLPinW8N9q58chN0LC1UimGRE/8aJww10Jl5Gvlp7HQ9D6/geZNeHDv LWFcS40kjrw9//MyqOh0NfIvXc4scJjdy9v4qgaFInY17wEvF5cu+jd2ct2fzQ== 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 4Mkg3d0d7Rzjl5; Fri, 7 Oct 2022 20:32:45 +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 297KWi6J035425; Fri, 7 Oct 2022 20:32:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 297KWiuG035424; Fri, 7 Oct 2022 20:32:44 GMT (envelope-from git) Date: Fri, 7 Oct 2022 20:32:44 GMT Message-Id: <202210072032.297KWiuG035424@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: ce9e720af2f8 - main - : Add a fallback for __LONG_WIDTH__ for older compilers. 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: ce9e720af2f8fa378e36134bab8a82ebf67c159d Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1665174765; 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=9pNl1zQDLwuhj+dQBhhenXw+8EfLGK/KYA8oH5PJPHw=; b=PEt4PAImnRYiVOTErhKB74PcF03ZtDA9TmMN/UU/fmXTgqzmW2QBrij1nq917eaPFXy6qo 7iO4vyQCemWBcb8alPSCT7Mww5v5AZdXtSkhs+OLtciNio0CvN5fpTcvbp1vprDA9xoFsf CDblG5YyBw1QKcOdxKfe2dLd88ZoXxbwNejlcto2UOMKwCfbSDuZH3ki4Y9ClYXK+6iJJ6 zfdqvw5YWB44fbuXf4ZpBj4MTRhW1jRaFZ0joEXTLYPJC7l8GmxihXOi6Rz1qIRQBD/Fmz 1ElhpMOzUS7H7OSIwUEy0wer7RwRY2pzoZuJ0caG6XlDnD+AFpps+NNU0JikXQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1665174765; a=rsa-sha256; cv=none; b=WVR1QJGZFcUXkXqtAI95uYZZC6/Twp9wJqIAOBdvguIqozLHwRQeGLgnqxa0pBdMSc4VPY bfH1GQusMC9WofOQMIEKWE3Y2R6cIcoGlbloLtFPRvX31BN/G79y3MFwhDk0upwoCPWXcY IX1fvf4ArQWqEWbndeGF4EqMJyNrkmoGLetWbsZ8pZfZB8/vS+BPOQd/nYjkAepyEwhNGT /vmaBWEWUhBdJOIXAlYdx5OfbiLQX2WdDjYH5meLWWQqP06FuH8yjie8Y3XZZI20WalGi8 uJLr4FIhDqYrQi1Q9AL1Ss3eXbFKBJSGHS+D03N5Z4IGTwaEK9l9mrfDwd8wMA== 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=ce9e720af2f8fa378e36134bab8a82ebf67c159d commit ce9e720af2f8fa378e36134bab8a82ebf67c159d Author: John Baldwin AuthorDate: 2022-10-07 19:44:31 +0000 Commit: John Baldwin CommitDate: 2022-10-07 19:44:31 +0000 : Add a fallback for __LONG_WIDTH__ for older compilers. clang only includes a __LONG_WIDTH__ builtin in clang 14 and later. --- sys/sys/_pv_entry.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sys/sys/_pv_entry.h b/sys/sys/_pv_entry.h index 411643cf49ec..3cd0d9c687f6 100644 --- a/sys/sys/_pv_entry.h +++ b/sys/sys/_pv_entry.h @@ -77,6 +77,11 @@ typedef struct pv_entry { #error Unsupported page size #endif +/* Support clang < 14 */ +#ifndef __LONG_WIDTH__ +#define __LONG_WIDTH__ (__CHAR_BIT__ * __SIZEOF_LONG__) +#endif + #define _NPCM howmany(_NPCPV, __LONG_WIDTH__) #define PC_FREEN ~0ul #define PC_FREEL ((1ul << (_NPCPV % __LONG_WIDTH__)) - 1)