DF-4892 / run.log
/root/df4892/rpm_wrap_demo.c: In function 'main':
/root/df4892/rpm_wrap_demo.c:36:29: warning: integer overflow in expression of type 'int' results in '2115098112' [-Woverflow]
uint32_t r32 = 60 * 25000 * 10000 / tach_period[j];
^
/root/df4892/rpm_wrap_demo.c:47:30: warning: integer overflow in expression of type 'int' results in '2115098112' [-Woverflow]
uint32_t p32 = 60 * 25000 * 10000 / (8 * req[j]);
^
DF-4892 smu7 fan RPM math: 60 * xclk * 10000 (u32 vs u64)
xclk=25000 u32: 2115098112 u64: 15000000000 wrap: YES
xclk=27000 u32: 3315098112 u64: 16200000000 wrap: YES
xclk=6250 u32: 3750000000 u64: 3750000000 wrap: no
get_fan_speed_rpm (:100): reported RPM for real tach periods
tach_period=1 kernel(u32)=2115098112 correct(u64)=15000000000 error=12884901888x
tach_period=100 kernel(u32)=21150981 correct(u64)=150000000 error=128849019x
tach_period=1000 kernel(u32)=2115098 correct(u64)=15000000 error=12884902x
tach_period=100000 kernel(u32)=21150 correct(u64)=150000 error=128850x
tach_period=2000000 kernel(u32)=1057 correct(u64)=7500 error=6443x
set_fan_speed_rpm (:273): programmed TARGET_PERIOD for requests
rpm=800 kernel(u32)=330484 correct(u64)=2343750 -> fan target off by 7.09x
rpm=1500 kernel(u32)=176258 correct(u64)=1250000 -> fan target off by 7.09x
rpm=2200 kernel(u32)=120176 correct(u64)=852272 -> fan target off by 7.09x
rpm=3000 kernel(u32)=88129 correct(u64)=625000 -> fan target off by 7.09x
---
DragonFly dfbsd 6.5-DEVELOPMENT DragonFly 6.5-DEVELOPMENT #0: Thu Jul 2 06:02:54 UTC 2026 root@dfbsd:/usr/obj/usr/src/sys/X86_64_GENERIC x86_64
1