From 0d2dce0b7865c10f29c2bea2dcaf5d8c42d49708 Mon Sep 17 00:00:00 2001 From: Hans Petter Selasky Date: Tue, 5 Jun 2018 15:30:36 +0000 Subject: [PATCH] Implement mul_u32_u32() function in the LinuxKPI. Submitted by: Johannes Lundberg MFC after: 1 week Sponsored by: Mellanox Technologies Sponsored by: Limelight Networks --- sys/compat/linuxkpi/common/include/linux/math64.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/math64.h b/sys/compat/linuxkpi/common/include/linux/math64.h index 9b22416a9e97..dacba7dbae96 100644 --- a/sys/compat/linuxkpi/common/include/linux/math64.h +++ b/sys/compat/linuxkpi/common/include/linux/math64.h @@ -84,4 +84,11 @@ div_u64(uint64_t dividend, uint32_t divisor) return (dividend / divisor); } +static inline uint64_t +mul_u32_u32(uint32_t a, uint32_t b) +{ + + return ((uint64_t)a * b); +} + #endif /* _LINUX_MATH64_H */