linuxkpi: Correct DIV_ROUND_DOWN_ULL

This fixes a black screen issue with the i915 DRM driver from Linux v6.8

Fixes: c4e0746e7d ("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)
This commit is contained in:
Lutz Bichler 2025-03-12 18:20:58 +01:00 committed by Ed Maste
parent 235fe911df
commit 872c817d52

View file

@ -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) ({ \