iommu/generic_pt: fix GCOV build failure for amdv1
Get series with b4
b4 am [email protected]Versions newest first
- v2 Latest0 of 1 patch 0 repliesNew
Patches in v2 No applies recorded yet
The patch the cover letter announces is not in this archive.
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.
Cover letter [PATCH v2 0/1] iommu/generic_pt: fix GCOV build failure for amdv1
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/[email protected]/
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/[email protected]/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/[email protected]/T/#t
[2] https://lore.kernel.org/lkml/[email protected]/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(-)
Signature · 1 line
2.43.5