git: 300c54a0389f - main - powerpc/booke pmap: Adjust TID bits to correct size

From: Justin Hibbits <jhibbits_at_FreeBSD.org>
Date: Sat, 12 Sep 2026 15:04:36 UTC
The branch main has been updated by jhibbits:

URL: https://cgit.FreeBSD.org/src/commit/?id=300c54a0389fe8165a35d7fe88c46a993aaa11f8

commit 300c54a0389fe8165a35d7fe88c46a993aaa11f8
Author:     Justin Hibbits <jhibbits@FreeBSD.org>
AuthorDate: 2026-07-04 04:50:18 +0000
Commit:     Justin Hibbits <jhibbits@FreeBSD.org>
CommitDate: 2026-09-12 15:04:21 +0000

    powerpc/booke pmap: Adjust TID bits to correct size
    
    MMUCFG::PIDSIZE is the TID field size less 1, so adjust to get the
    full width.
---
 sys/powerpc/booke/pmap.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/powerpc/booke/pmap.c b/sys/powerpc/booke/pmap.c
index 280b7df7a6b4..0b9eef628368 100644
--- a/sys/powerpc/booke/pmap.c
+++ b/sys/powerpc/booke/pmap.c
@@ -681,7 +681,7 @@ mmu_booke_bootstrap(vm_offset_t start, vm_offset_t kernelend)
 		tid_max = INT_MAX;
 	else
 		tid_max = 1 << ilog2(tid_max);
-	tid_max = min((1 << tid_bits), tid_max) - 1;
+	tid_max = min((1 << (tid_bits + 1)), tid_max) - 1;
 
 	/*
 	 * Align kernel start and end address (kernel image).