[BUG] vmlinux.o: warning: objtool: iommu_dma_sw_msi() falls through to next function alloc_io_pgtable_ops()
From: Paul E. McKenney
Date: Wed Mar 26 2025 - 19:19:01 EST
Hello!
Building next-20250326 using clang version 19.1.7 (CentOS 19.1.7-1.el9)
gets me the following warning:
vmlinux.o: warning: objtool: iommu_dma_sw_msi() falls through to next function alloc_io_pgtable_ops()
This surprised me for a couple of reasons. First, from what I
can see, iommu_dma_sw_msi() does not fall through. Second, it
is in drivers/iommu/dma-iommu.c while alloc_io_pgtable_ops() is in
drivers/iommu/io-pgtable.c, though maybe the compiler and/or linker saw
fit to rearrange these functions' object code.
Please let me know of any debug patches or fixes that I could apply,
or any additional information that you might need.
Thanx, Paul
Note to self: Run 2025.03.26-14.37.10-remote on first test system. ;-)
------------------------------------------------------------------------
int iommu_dma_sw_msi(struct iommu_domain *domain, struct msi_desc *desc,
phys_addr_t msi_addr)
{
struct device *dev = msi_desc_to_dev(desc);
const struct iommu_dma_msi_page *msi_page;
if (!has_msi_cookie(domain)) {
msi_desc_set_iommu_msi_iova(desc, 0, 0);
return 0;
}
iommu_group_mutex_assert(dev);
msi_page = iommu_dma_get_msi_page(dev, msi_addr, domain);
if (!msi_page)
return -ENOMEM;
msi_desc_set_iommu_msi_iova(desc, msi_page->iova,
ilog2(cookie_msi_granule(domain)));
return 0;
}