Skip to content

RFC powerpc/mm: Enable clang context analysis

Ritesh Harjani (IBM) linuxppc-dev lkml 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest6 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6powerpc/mm/book3s64: unlock RCU before returning from mm_iommu_is_devmem()arch/powerpc/mm/book3s64/iommu_api.c+4 -20 replies
2/6powerpc/mm/book3s64: Rework tlbie() to remove conditional lockingarch/powerpc/mm/book3s64/hash_native.c+24 -100 replies
3/6powerpc/mm/book3s64: Rework native_flush_hash_range() to remove conditional lockingarch/powerpc/mm/book3s64/hash_native.c+54 -340 replies
4/6powerpc/mm/book3s64: Annotate the subpage-protection PTE lockarch/powerpc/mm/book3s64/subpage_prot.c+2 -00 replies
5/6powerpc/mm: Rework nohash TLB broadcast lockingarch/powerpc/mm/nohash/mmu_context.c arch/powerpc/mm/nohash/tlb.c+6 -30 replies
6/6powerpc/mm: Enable context analysisarch/powerpc/mm/Makefile arch/powerpc/mm/book3s32/Makefile arch/powerpc/mm/book3s64/Makefile +1 more+8 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC 0/6] powerpc/mm: Enable clang context analysis

Lock acquire and release checking used to be done with Sparse. That support was removed [1] and replaced with Clang context analysis [2].

Note that enabling this caught a real locking rcu bug in arch/powerpc/mm (Patch-1). Note, more invasive checkers to check what each lock protects is deferred for later enablement.

This is based on top of previous powerpc/powernv,pseries Clang context analysis enablement series [3].

The series was build tested with LLVM/Clang 23.x

[1] 5b63d0ae94cc ("compiler-context-analysis: Remove Sparse support")
[2] 3269701cb256 ("compiler-context-analysis: Add infrastructure for Context Analysis with Clang") [3]: https://lore.kernel.org/linuxppc-dev/[email protected]/

Ritesh Harjani (IBM) (6):
powerpc/mm/book3s64: unlock RCU before returning from mm_iommu_is_devmem() powerpc/mm/book3s64: Rework tlbie() to remove conditional locking powerpc/mm/book3s64: Rework native_flush_hash_range() to remove conditional locking powerpc/mm/book3s64: Annotate the subpage-protection PTE lock powerpc/mm: Rework nohash TLB broadcast locking
powerpc/mm: Enable context analysis

 arch/powerpc/mm/Makefile                |   2 +
 arch/powerpc/mm/book3s32/Makefile       |   2 +
 arch/powerpc/mm/book3s64/Makefile       |   2 +
 arch/powerpc/mm/book3s64/hash_native.c  | 122 +++++++++++++++---------
 arch/powerpc/mm/book3s64/iommu_api.c    |   6 +-
 arch/powerpc/mm/book3s64/subpage_prot.c |   2 +
 arch/powerpc/mm/nohash/Makefile         |   2 +
 arch/powerpc/mm/nohash/mmu_context.c    |   1 +
 arch/powerpc/mm/nohash/tlb.c            |   8 +-
 9 files changed, 98 insertions(+), 49 deletions(-)

--
2.39.5