8f704ef666
I link error on 32-bit ARM points to yet another arithmetic bug: drivers/net/ethernet/stmicro/stmmac/stmmac_tc.o: In function `tc_setup_cbs': stmmac_tc.c:(.text+0x148): undefined reference to `__aeabi_uldivmod' stmmac_tc.c:(.text+0x1fc): undefined reference to `__aeabi_uldivmod' stmmac_tc.c:(.text+0x308): undefined reference to `__aeabi_uldivmod' stmmac_tc.c:(.text+0x320): undefined reference to `__aeabi_uldivmod' stmmac_tc.c:(.text+0x33c): undefined reference to `__aeabi_uldivmod' drivers/net/ethernet/stmicro/stmmac/stmmac_tc.o:stmmac_tc.c:(.text+0x3a4): more undefined references to `__aeabi_uldivmod' follow I observe that the last change to add the 'ul' prefix was incorrect, as it did not turn the result of the multiplication into a 64-bit expression on 32-bit architectures. Further, it seems that the do_div() macro gets confused by the fact that we pass a signed variable rather than unsigned into it. This changes the code to instead use the div_s64() helper that is meant for signed division, along with changing the constant suffix to 'll' to actually make it a 64-bit argument everywhere, fixing both of the issues I pointed out. I'm not completely convinced that this makes the code correct, but I'm fairly sure that we have two problems less than before. Fixes: |
||
---|---|---|
.. | ||
altr_tse_pcs.c | ||
altr_tse_pcs.h | ||
chain_mode.c | ||
common.h | ||
descs_com.h | ||
descs.h | ||
dwmac4_core.c | ||
dwmac4_descs.c | ||
dwmac4_descs.h | ||
dwmac4_dma.c | ||
dwmac4_dma.h | ||
dwmac4_lib.c | ||
dwmac4.h | ||
dwmac5.c | ||
dwmac5.h | ||
dwmac100_core.c | ||
dwmac100_dma.c | ||
dwmac100.h | ||
dwmac1000_core.c | ||
dwmac1000_dma.c | ||
dwmac1000.h | ||
dwmac_dma.h | ||
dwmac_lib.c | ||
dwmac-anarion.c | ||
dwmac-dwc-qos-eth.c | ||
dwmac-generic.c | ||
dwmac-ipq806x.c | ||
dwmac-lpc18xx.c | ||
dwmac-meson8b.c | ||
dwmac-meson.c | ||
dwmac-oxnas.c | ||
dwmac-rk.c | ||
dwmac-socfpga.c | ||
dwmac-sti.c | ||
dwmac-stm32.c | ||
dwmac-sun8i.c | ||
dwmac-sunxi.c | ||
enh_desc.c | ||
hwif.c | ||
hwif.h | ||
Kconfig | ||
Makefile | ||
mmc_core.c | ||
mmc.h | ||
norm_desc.c | ||
ring_mode.c | ||
stmmac_ethtool.c | ||
stmmac_hwtstamp.c | ||
stmmac_main.c | ||
stmmac_mdio.c | ||
stmmac_pci.c | ||
stmmac_pcs.h | ||
stmmac_platform.c | ||
stmmac_platform.h | ||
stmmac_ptp.c | ||
stmmac_ptp.h | ||
stmmac_tc.c | ||
stmmac.h |