git: 872c817d52d9 - stable/14 - linuxkpi: Correct DIV_ROUND_DOWN_ULL
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 18 Mar 2025 13:28:07 UTC
The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=872c817d52d9a4e46cf3b9d34169c310fdccc91b commit 872c817d52d9a4e46cf3b9d34169c310fdccc91b Author: Lutz Bichler <Lutz.Bichler@gmail.com> AuthorDate: 2025-03-12 17:20:58 +0000 Commit: Ed Maste <emaste@FreeBSD.org> CommitDate: 2025-03-18 13:27:37 +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 (cherry picked from commit ef037a028af7cc331e36ca6c8e2eb5612cdb1130) --- 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) ({ \