git: 7a4907250452 - main - powerpc/trap: Change prediction of NOFAULTING in trap_pfault()
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 29 Mar 2025 00:19:43 UTC
The branch main has been updated by jhibbits:
URL: https://cgit.FreeBSD.org/src/commit/?id=7a4907250452de0818dcd4c084a138b03f153f55
commit 7a4907250452de0818dcd4c084a138b03f153f55
Author: Justin Hibbits <jhibbits@FreeBSD.org>
AuthorDate: 2025-03-29 00:03:39 +0000
Commit: Justin Hibbits <jhibbits@FreeBSD.org>
CommitDate: 2025-03-29 00:19:33 +0000
powerpc/trap: Change prediction of NOFAULTING in trap_pfault()
This was probably intended to match the amd64 check, but that tests
NOFAULTING against non-zero, while this checks against 0. We're most
likely to end up in this function when faulting is allowed, so
predict_true is the better option.
---
sys/powerpc/powerpc/trap.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sys/powerpc/powerpc/trap.c b/sys/powerpc/powerpc/trap.c
index d919b7715664..203d270a504b 100644
--- a/sys/powerpc/powerpc/trap.c
+++ b/sys/powerpc/powerpc/trap.c
@@ -794,7 +794,7 @@ trap_pfault(struct trapframe *frame, bool user, int *signo, int *ucode)
return (true);
#endif
- if (__predict_false((td->td_pflags & TDP_NOFAULTING) == 0)) {
+ if (__predict_true((td->td_pflags & TDP_NOFAULTING) == 0)) {
/*
* If we get a page fault while in a critical section, then
* it is most likely a fatal kernel page fault. The kernel