Messages in this thread |  | | From | Konstantin Khorenko <> | | Subject | [PATCH v2 0/1] iommu/generic_pt: fix GCOV build failure for amdv1 | | Date | Thu, 9 Apr 2026 20:01:16 +0300 |
| |
This patch fixes a build failure in drivers/iommu/generic_pt/fmt/iommu_amdv1.o when -fprofile-update=atomic is added to global CFLAGS_GCOV.
v2: Use __always_inline instead of disabling GCOV for the file, as suggested by Jason Gunthorpe. The root cause is that amdv1pt_install_leaf_entry() is "static inline" (not __always_inline), so GCC may choose not to inline it. Without inlining, the compiler cannot see constant arguments at the call site and fails to eliminate the impossible branch in FIELD_PREP(). Forcing inlining via __always_inline solves the problem without losing GCOV coverage.
v1: https://lore.kernel.org/lkml/20260401142020.1434243-4-khorenko@virtuozzo.com/
This is part of a larger effort to add -fprofile-update=atomic to global CFLAGS_GCOV to fix GCOV counter races that cause crashes on SMP (posted earlier as a combined series): https://lore.kernel.org/lkml/20260401142020.1434243-1-khorenko@virtuozzo.com/T/#t
That combined series was split per subsystem as requested by reviewers. The companion patches are:
- net: fix skb_ext BUILD_BUG_ON failures (sent to netdev) [1] - gcov: add -fprofile-update=atomic globally (sent to gcov/kbuild maintainers, depends on this patch and the net patches) [2]
[1] https://lore.kernel.org/lkml/20260402140558.1437002-1-khorenko@virtuozzo.com/T/#t [2] https://lore.kernel.org/lkml/20260402141831.1437357-1-khorenko@virtuozzo.com/T/#t
Konstantin Khorenko (1): iommu/generic_pt: use __always_inline for amdv1pt_install_leaf_entry()
drivers/iommu/generic_pt/fmt/amdv1.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
-- 2.43.5
|  |