From nobody Thu Feb 5 03:43:35 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 4f633c39sKz6R7Nw for ; Thu, 05 Feb 2026 03:43:40 +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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4f633c20h1z3xxg for ; Thu, 05 Feb 2026 03:43:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1770263020; 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=nHly4CvRRteYQN556CVoYPU4rNMt6cWIvMYZgvBvkGA=; b=BBe2NXQhvOKMe2ZWqeKNhdG/+1JyYrGA9HS/wtk5Q8NtOSYGALDJGkr36WQjB2dYVowAvg k+w1qMOY5NmfNkZ/Jzt1n3rcvaA8qLBJ0ipcaCXQdbEy9n/pivA31fq62fqT/Uci66ZJAj anhXP3Ss06rjEoST5jhAFJOty/K61j0Q+iydiAPOpZboM6i6MTnjDS+o/hqlJxP2tP4dVv sU7qb0QlwslGSoTPHhacCWiuC3ckJGN0//F9U0DOdf804gRjtKfqoXvjgaMntP9yCER2Ih oxZ5LD3g2GUFS6cR8HiEA9p6I2xGBvsv1qDMYCHtiKXjBicusbUy9qDwQ+3Plg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1770263020; a=rsa-sha256; cv=none; b=V3F5xHEgK3/7rzwnYbQeO9sVb6Pou6AnL9i1jBNX2uzgjWrf1VpZuQtSsBRvW+O6xzUwok IG1MLrHBI+4978jIbgRUuZMSG2UDcX0YuxMO+JIEAauG6D5wfrXwP5lveyid/JrUMsBqQC o3yKjmhLJbducIVbZoVOu7DfK4fHxEpCyEYc9I1UEeLfhaGr+Nf7EOeylItaWC3DGB6hpk iWrMr5fx3PIcu51ZVCsMaj4Rxp2FPr+izN4RVXjR+YrDUw5V+M6yDaVziMKrosEg7uvJLa Wcnk/wBmxPhdfkgB2TtWQrUZoIzQwOZh/j589REW9xGhcUQ5QahzAT0W/DYm2Q== 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=1770263020; 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=nHly4CvRRteYQN556CVoYPU4rNMt6cWIvMYZgvBvkGA=; b=ckRVOTePqSs8XccGv19gAoDrwoipun9R2vSY9sYxKEUjkIvK0TvaJqTzgJp52rmVot+N2i 20cvyl7aL68cmZlSEjpe8Tvs5Lm/sjMHymRlAFSR85rz2rNEeb/mhqDO9nN/qydWvn9bVo GrQcOAGIW8CHw96nJfvzgfX2rtogZGfk/NjXUS9ubw40Q0dYpLp7dfPeYGcH02/4qCYmGS T+8uR3O2FaGG5y3mEkwEHsmfz97xIJKtB9BTVYmHd3A9WcRUDl/7aBYFva8fdiNjnSMVHs cyKpO9tMwTAFbSQe6Cc8kE+jn1oKyVfUhsTq8NCxwggIZmmdbZq97St+Jlvk0Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4f633c1MyBz1Rmq for ; Thu, 05 Feb 2026 03:43:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 44bb3 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 05 Feb 2026 03:43:35 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Justin Hibbits Subject: git: c1a339b4a313 - main - powerpc64/pmap: No need to use r0 anymore in tlbie 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: jhibbits X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c1a339b4a313ead4122c630ab9ac8f9c54c3e0a2 Auto-Submitted: auto-generated Date: Thu, 05 Feb 2026 03:43:35 +0000 Message-Id: <698411e7.44bb3.7b40fde6@gitrepo.freebsd.org> The branch main has been updated by jhibbits: URL: https://cgit.FreeBSD.org/src/commit/?id=c1a339b4a313ead4122c630ab9ac8f9c54c3e0a2 commit c1a339b4a313ead4122c630ab9ac8f9c54c3e0a2 Author: Justin Hibbits AuthorDate: 2026-02-05 03:28:16 +0000 Commit: Justin Hibbits CommitDate: 2026-02-05 03:42:23 +0000 powerpc64/pmap: No need to use r0 anymore in tlbie The only use of `tlbie %rN, 0` is now explicit and covered in the block above. Since there's no need for an explicit `tlbie %rN, 0` now, drop this convoluted piece and let the compiler decide. While here, a trivial optimization of the old-style tlbie block, by clearing tlbie_lock and returning, instead of going to the end which checks again if the lock is needed. Since it's already known to be needed, there's no need to check again. --- sys/powerpc/aim/moea64_native.c | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/sys/powerpc/aim/moea64_native.c b/sys/powerpc/aim/moea64_native.c index 0ea44b1097b6..7714187c2f4d 100644 --- a/sys/powerpc/aim/moea64_native.c +++ b/sys/powerpc/aim/moea64_native.c @@ -183,7 +183,8 @@ TLBIE(uint64_t vpn, uint64_t oldptehi) "memory"); __asm __volatile("eieio; tlbsync; ptesync" ::: "memory"); - goto done; + tlbie_lock = 0; + return; #endif } } @@ -197,20 +198,8 @@ TLBIE(uint64_t vpn, uint64_t oldptehi) (oldptehi & LPTE_KERNEL_VSID_BIT) == 0) vpn |= AP_16M; - /* - * Explicitly clobber r0. The tlbie instruction has two forms: an old - * one used by PowerISA 2.03 and prior, and a newer one used by PowerISA - * 2.06 (maybe 2.05?) and later. We need to support both, and it just - * so happens that since we use 4k pages we can simply zero out r0, and - * clobber it, and the assembler will interpret the single-operand form - * of tlbie as having RB set, and everything else as 0. The RS operand - * in the newer form is in the same position as the L(page size) bit of - * the old form, so a slong as RS is 0, we're good on both sides. - */ - __asm __volatile("li 0, 0 \n tlbie %0, 0" :: "r"(vpn) : "r0", "memory"); + __asm __volatile("tlbie %0, %1" :: "r"(vpn), "r"(0) : "memory"); __asm __volatile("eieio; tlbsync; ptesync" ::: "memory"); -done: - #else vpn_hi = (uint32_t)(vpn >> 32); vpn_lo = (uint32_t)vpn;