dmaengine: qcom: Always inline gpi_update_reg
Subsystems (2)
PATCH 1/1 dmaengine: qcom: Always inline gpi_update_reg
When building with CONFIG_UBSAN_UNSIGNED_OVERFLOW, clang decides not to inline gpi_update_reg, which causes a linkage failure around __bad_mask:
ld.lld: error: undefined symbol: __bad_mask
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
referenced by bitfield.h:119 (
include/linux/bitfield.h:119)
dma/qcom/gpi.o:(gpi_update_reg) in archivedrivers/built-in.a
referenced by bitfield.h:119 (include/linux/bitfield.h:119)
dma/qcom/gpi.o:(gpi_update_reg) in archivedrivers/built-in.a
If gpi_update_reg is not inlined, the mask value will not be known at compile time so the check in field_multiplier stays in the final object file, causing the above linkage failure. Always inline gpi_update_reg so that this check can never fail.
--- drivers/dma/qcom/gpi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/dma/qcom/gpi.c +1 -1
@@ -584,7 +584,7 @@ static inline void gpi_write_reg_field(struct gpii *gpii, void __iomem *addr,gpi_write_reg (gpii, addr, val); } -static inline void +static __always_inline voidgpi_update_reg (struct gpii *gpii,u32 offset,u32 mask,u32 val) {void __iomem *addr = gpii->regs + offset;
base-commit: 7c53f6b671f4aba70ff15e1b05148b10d58c2837
Signature · 1 line
2.30.0
Quoted 9 lines · Nathan Chancellor
When building with
CONFIG_UBSAN_UNSIGNED_OVERFLOW, clang decides not to inlinegpi_update_reg, which causes a linkage failure around__bad_mask:ld.lld: error: undefined symbol:
__bad_maskQuoted 4 lines
Quoted 4 lines
Quoted 4 lines
referenced by bitfield.h:119 (
include/linux/bitfield.h:119)
dma/qcom/gpi.o:(gpi_update_reg) in archivedrivers/built-in.a
referenced by bitfield.h:119 (include/linux/bitfield.h:119)
dma/qcom/gpi.o:(gpi_update_reg) in archivedrivers/built-in.a
Quoted 4 lines
If
gpi_update_regis not inlined, the mask value will not be known at compile time so the check infield_multiplierstays in the final object file, causing the above linkage failure. Always inlinegpi_update_regso that this check can never fail.
Applied, thanks
Signature · 1 line
~Vinod
This patch was applied to qcom/linux.git (refs/heads/for-next):
Hello:
This patch was applied to qcom/linux.git (refs/heads/for-next):
Quoted 10 lines · On Tue, 12 Jan 2021 12:12:14 -0700 you wrote:
When building with
CONFIG_UBSAN_UNSIGNED_OVERFLOW, clang decides not to inlinegpi_update_reg, which causes a linkage failure around__bad_mask:ld.lld: error: undefined symbol:
__bad_maskQuoted 4 lines
Quoted 4 lines
Quoted 4 lines
referenced by bitfield.h:119 (
include/linux/bitfield.h:119)
dma/qcom/gpi.o:(gpi_update_reg) in archivedrivers/built-in.a
referenced by bitfield.h:119 (include/linux/bitfield.h:119)
dma/qcom/gpi.o:(gpi_update_reg) in archivedrivers/built-in.a[...]
Here is the summary with links:
- dmaengine: qcom: Always inline gpi_update_reg
https://git.kernel.org/qcom/c/0a6d3038d914
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html