git: ef037a028af7 - main - linuxkpi: Correct DIV_ROUND_DOWN_ULL
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 12 Mar 2025 17:43:36 UTC
The branch main has been updated by emaste:
URL: https://cgit.FreeBSD.org/src/commit/?id=ef037a028af7cc331e36ca6c8e2eb5612cdb1130
commit ef037a028af7cc331e36ca6c8e2eb5612cdb1130
Author: Lutz Bichler <Lutz.Bichler@gmail.com>
AuthorDate: 2025-03-12 17:20:58 +0000
Commit: Ed Maste <emaste@FreeBSD.org>
CommitDate: 2025-03-12 17:43:08 +0000
linuxkpi: Correct DIV_ROUND_DOWN_ULL
This fixes a black screen issue with the i915 DRM driver from Linux v6.8
Fixes: c4e0746e7d5bd ("LinuxKPI: Add helper macros IS_ALIGNED and DIV_ROUND_DOWN_ULL.")
Pull request: https://github.com/freebsd/freebsd-src/pull/1612
---
sys/compat/linuxkpi/common/include/linux/math.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sys/compat/linuxkpi/common/include/linux/math.h b/sys/compat/linuxkpi/common/include/linux/math.h
index dad7fa7fbe9c..5a348a57747b 100644
--- a/sys/compat/linuxkpi/common/include/linux/math.h
+++ b/sys/compat/linuxkpi/common/include/linux/math.h
@@ -46,7 +46,7 @@
#define DIV_ROUND_UP(x, n) howmany(x, n)
#define DIV_ROUND_UP_ULL(x, n) DIV_ROUND_UP((unsigned long long)(x), (n))
-#define DIV_ROUND_DOWN_ULL(x, n) (((unsigned long long)(x) / (n)) * (n))
+#define DIV_ROUND_DOWN_ULL(x, n) ((unsigned long long)(x) / (n))
#define DIV_ROUND_CLOSEST(x, divisor) (((x) + ((divisor) / 2)) / (divisor))
#define DIV_ROUND_CLOSEST_ULL(x, divisor) ({ \