From nobody Thu Dec 12 18:18: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 4Y8LMQ4nd4z5gZps; Thu, 12 Dec 2024 18:18:58 +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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y8LMQ35wsz3xLr; Thu, 12 Dec 2024 18:18:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1734027538; 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=ii5OZvfWU06F5Zq+8qR2MjY0f0ZkXfcvbiX3L1DRM3o=; b=tfB79UbqYte1pID7HJLudRHnp7ZZFoUgO1ToPVb/SQmEiI21LDla2EP91wmy6bPZswY+0p hhshwTTG4hOERUoB0etdRGb0sbkgZLGKeqDmb7cn+FJL1EvVIkSsLSR68hroG4D20K88Vp 4n8GVEQtXkYICLuoCMIoyGfaMcZ2gGQ1oXMf4BmxefzWhUT1gc9E84fznomUr9cpVUoXky MDxznT/qc3Jee9pqrap8jVn7VseU9OIFFZjRHLPQsT/Pk7o9OomdTDCMvFBC6MwoRWyPOO 1GPfmZGB7laFgy09D8F4aUVefrrbZoP85smKmn3TIQ5/FZtxfMVqiQsIbdas+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1734027538; 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=ii5OZvfWU06F5Zq+8qR2MjY0f0ZkXfcvbiX3L1DRM3o=; b=Ggax7wPKYxs4guTFxwxQnDl4zftPolTA2MzJcptsR301eo7PD07G/+q9mO5HGyR15ELE/j 8O48IP82AmNy+KGBv8n8rzF9Zb7KY8EpEoHlHDx0pGe87XIwuP9KpbPAOiDjv6fhAo5Be8 hGo3a2ERNwIqy7NpruJu2EWqOO3ASAgf5Vyqx0Gn6/YSwFNAE0UmO/tZB891Or/qfVH4pL e4Z9QCVhAg+Ob1KeKd8jBdfb8YRZwquAUrBHoPrG15ARVwXtx+q9rgy6iCh7QnbSA1BFxM FjgT61bmonBoFZqY2h6aPXm64PRvuivoqQ0UmcKBNx54yTn45lvZourUdSGpMg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1734027538; a=rsa-sha256; cv=none; b=w2qZrZM0hRuuBj5rCZDxbVsz89z6xBItXv1LauK+DwlpLsDRlPzQIT1G0RHAka1DNgua36 HHvWMA7NWEYF/rvksUy1Fhdn1OjV9vCDrumNdQLbBVi2G2eJzefsGk/Q5iIIw6jGDmutqS 5hoQaxKMeYZLT9T3e6zVUXWaVuhOO76o8GnSU4hofe8D1l6iIyhuVYtktJ9ysHQH2ZbQ75 JMuVTnfZa9RQFEIN7P1ny2xi4piUsd+2tPblVkpp3Y3xTZUqDg/BeKzXyn/GanTcPeecx2 r7IpECQzlMVByw0C2hUW47FCofNPMWQiUIfCtdIvCTGv+Y4AHFKh7k4Gg0ZPWQ== 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 4Y8LMQ2j9cz13Lv; Thu, 12 Dec 2024 18:18:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4BCIIwd6097008; Thu, 12 Dec 2024 18:18:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4BCIIwST097005; Thu, 12 Dec 2024 18:18:58 GMT (envelope-from git) Date: Thu, 12 Dec 2024 18:18:58 GMT Message-Id: <202412121818.4BCIIwST097005@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: 14006c96214a - main - arm64: Fix the MRS_EXACT_IF_DIFFERENT check 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: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 14006c96214a772ba2e2f07bb4301657d8c2055a Auto-Submitted: auto-generated The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=14006c96214a772ba2e2f07bb4301657d8c2055a commit 14006c96214a772ba2e2f07bb4301657d8c2055a Author: Andrew Turner AuthorDate: 2024-12-11 17:54:37 +0000 Commit: Andrew Turner CommitDate: 2024-12-12 18:00:22 +0000 arm64: Fix the MRS_EXACT_IF_DIFFERENT check When comparing two ID registers to create a common userspace view we have an option where we set an exact value only if the two are different. This is only used in one field in the cache type register that is accessible by userspace without being trapped by the kernel. In preparation for trapping access to this register to handle it in the kernel in some situations fix the 'if different' check. Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D47811 --- sys/arm64/arm64/identcpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/arm64/arm64/identcpu.c b/sys/arm64/arm64/identcpu.c index 95e7669d053e..646d10d5ae1a 100644 --- a/sys/arm64/arm64/identcpu.c +++ b/sys/arm64/arm64/identcpu.c @@ -2261,7 +2261,7 @@ update_special_reg_field(uint64_t user_reg, u_int type, uint64_t value, switch (type & MRS_TYPE_MASK) { case MRS_EXACT_IF_DIFFERENT: - if (mrs_field_cmp(new_val, cur, shift, width, sign) != 0) + if (mrs_field_cmp(new_val, cur, shift, width, sign) == 0) break; /* FALLTHROUGH */ case MRS_EXACT: