diff options
| author | Nathan Chancellor <[email protected]> | 2023-03-29 17:32:46 +0000 |
|---|---|---|
| committer | Johannes Berg <[email protected]> | 2023-03-30 09:16:21 +0000 |
| commit | 6cf882d9aa9e8f1f2d63182e179ac4b2e59c00db (patch) | |
| tree | 9eea3db87e73943c4661d51ebc07cc22f03184f5 /drivers/net/wireless/intel/iwlwifi/mvm/utils.c | |
| parent | mac80211_hwsim: add PMSR report support via virtio (diff) | |
| download | kernel-6cf882d9aa9e8f1f2d63182e179ac4b2e59c00db.tar.gz kernel-6cf882d9aa9e8f1f2d63182e179ac4b2e59c00db.zip | |
wifi: iwlwifi: mvm: Use 64-bit division helper in iwl_mvm_get_crosstimestamp_fw()
There is a 64-bit division in iwl_mvm_get_crosstimestamp_fw(), which
results in a link failure when building 32-bit architectures with clang:
ld.lld: error: undefined symbol: __udivdi3
>>> referenced by ptp.c
>>> drivers/net/wireless/intel/iwlwifi/mvm/ptp.o:(iwl_mvm_phc_get_crosstimestamp) in archive vmlinux.a
GCC has optimizations for division by a constant that clang does not
implement, so this issue is not visible when building with GCC.
Use the 64-bit division helper div_u64(), which takes a u64 dividend and
u32 divisor, which matches this situation and prevents the emission of a
libcall for the division.
Fixes: 21fb8da6ebe4 ("wifi: iwlwifi: mvm: read synced time from firmware if supported")
Reported-by: Arnd Bergmann <[email protected]>
Link: https://github.com/ClangBuiltLinux/linux/issues/1826
Reported-by: "kernelci.org bot" <[email protected]>
Link: https://lore.kernel.org/[email protected]/
Signed-off-by: Nathan Chancellor <[email protected]>
Signed-off-by: Johannes Berg <[email protected]>
Diffstat (limited to 'drivers/net/wireless/intel/iwlwifi/mvm/utils.c')
0 files changed, 0 insertions, 0 deletions
