From nobody Wed Sep 23 10:36:48 2026 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 4hqYL862lmz6sqlG for ; Wed, 23 Sep 2026 10:36:48 +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 "YR2" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4hqYL85XFsz3G2Y for ; Wed, 23 Sep 2026 10:36:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1790159808; 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=fY57ko/VHMpt+lgMXzv6ksvtLM4Ye72Ew/D3xgznGD8=; b=DvvhXQ/ovyhEsXUiSd9JAy2J+NzNOzy/ssLMVqZHjESqKvAVxwj12/zwi0tGtwjP/Fku5b Zr/ulclEiS2zGxbznIJPpgiD9a0wiFyW5Eghq7LDT/L7YLYIcbTfk/1aYKOvEZEcnpowLQ hUSY5Ay+YzzAG5SXDOo3Su1Kx6/1G2zQYIAR69POHk6diIRSFHM0D8MUn4ohuoliJ1rY7v 4p43UqbwYOXbbXHo/6GvlZmptov+XCDaEkL8swBiPRilpucY7SirgcENI4dRluAYueZtI2 PQ1r6o+f6ptpcKrRcJByBQpF+AwoD3+pWqWVTG/HrWEGD8CeoTe0uk378Bxasg== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1790159808; b=ewQOe9KdJaCiRBDUoljyafNdiOMbboCvAYlMkzx9JNOX4aJXV0QWM5eXD0SU1Uuo6/C2UW iJEz8IUS5+34ZR8FlVXLd54UBpxFwRLyO8QP1Ka445zn72pO2W1bDJIdhiOlmESKgIvYNw C7l9RD3IV1c/QseEDZUbPP6x4PyO7C1wqBSrl3MmSQbZWfqbnDnjx4qND3OshsTzbnODke OWez+rHnJYpPd+ImS+45YW8zlz+ZTbTWJZiE80usrSivPu6FbozoRY7CbJs94n3wULXM5v l1e66MOLO1T3bc7EGXIs6Ay8LteMxCcZeen0BWtKnDHLuX2m4W2l8yi1juTkLg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1790159808; 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=fY57ko/VHMpt+lgMXzv6ksvtLM4Ye72Ew/D3xgznGD8=; b=RdpAU5FLqFercM67Ey58hnLTvy9EajUIJYdv98qx1bGdq+RFLzGca+VKhW00I9oD7RzTGa fZlnJyMCPNxz4R8UbA30gZp+Z9KHcxFcgqASKvQHylVfcyrzkXCeQvWsoJU4w5ijqFYQ6m /l6kZLKEO5KdV2ZygBfQnomrDsvrFKWq9T2QmGC063MK0Pe6cTZwyqZVTk650KaUikIBRf ilFmktaE+vBiv0FWcI0DNhdigxz9/HLibRt+cOMUS0gRUQ8f0tuevgCmvUbRjdHEsi0J7u WSAYFlmd3jvBcP5y9+WU7gn3tSvPT1zual8qjC3KRU9/W1KUipjxBJJRwXmDJA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4hqYL84b25zqYR for ; Wed, 23 Sep 2026 10:36:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3e46f by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 23 Sep 2026 10:36:48 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Piotr Kubaj Subject: git: 9d0859637f99 - main - powerpc/radix: fix double page offset in mmu_radix_sync_icache() 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 List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: pkubaj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9d0859637f99160e17b656df153effae3df31f8b Auto-Submitted: auto-generated Date: Wed, 23 Sep 2026 10:36:48 +0000 Message-Id: <6ab3abc0.3e46f.5e79d396@gitrepo.freebsd.org> The branch main has been updated by pkubaj: URL: https://cgit.FreeBSD.org/src/commit/?id=9d0859637f99160e17b656df153effae3df31f8b commit 9d0859637f99160e17b656df153effae3df31f8b Author: Piotr Kubaj AuthorDate: 2026-09-21 07:45:27 +0000 Commit: Piotr Kubaj CommitDate: 2026-09-23 10:36:18 +0000 powerpc/radix: fix double page offset in mmu_radix_sync_icache() mmu_radix_sync_icache() adds the offset of va within its page to the physical address it gets from mmu_radix_extract_locked(). That address already includes the offset - the extract routines return the physical address of the byte, not of the frame - so the offset is counted twice and __syncicache() is handed frame + 2 * offset. The hash MMU counterpart, moea64_sync_icache(), has to add the offset because PVO_PADDR() yields only the frame. Here the addition is wrong. Fixes: 6f0b2a235a13 ("powerpc/pmap: Add pmap_sync_icache() for radix pmap") Reviewed by: jhibbits MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D59870 --- sys/powerpc/aim/mmu_radix.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sys/powerpc/aim/mmu_radix.c b/sys/powerpc/aim/mmu_radix.c index 145b0ec5560b..5a249c18c511 100644 --- a/sys/powerpc/aim/mmu_radix.c +++ b/sys/powerpc/aim/mmu_radix.c @@ -6006,10 +6006,8 @@ mmu_radix_sync_icache(pmap_t pm, vm_offset_t va, vm_size_t sz) pa = mmu_radix_extract_locked(pm, va); sync_sz = PAGE_SIZE - (va & PAGE_MASK); sync_sz = min(sync_sz, sz); - if (pa != 0) { - pa += (va & PAGE_MASK); + if (pa != 0) __syncicache(PHYS_TO_DMAP(pa), sync_sz); - } va += sync_sz; sz -= sync_sz; }