The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCHv2 00/18] powerpc/mm, pseries, powernv: Enable clang context analysis
@ 2026-11-19  3:38 Ritesh Harjani (IBM)
  2026-11-19  3:38 ` [PATCHv2 01/18] powerpc/mm/book3s64: unlock RCU before returning from mm_iommu_is_devmem() Ritesh Harjani (IBM)
                   ` (17 more replies)
  0 siblings, 18 replies; 19+ messages in thread
From: Ritesh Harjani (IBM) @ 2026-11-19  3:38 UTC (permalink / raw)
  To: linuxppc-dev
  Cc: Madhavan Srinivasan, Michael Ellerman, Christophe Leroy,
	Venkat Rao Bagalkote, Shrikanth Hegde, linux-kernel, Marco Elver,
	Ritesh Harjani (IBM)

Enable Clang context analysis checking for most of powerpc/mm, pseries & powernv
platforms.

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.

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")


v1 -> v2:
===========
1. Dropped RFC tag, since this series is looking in shape to be included for
   v7.5
2. Clubbed both RFC series {pseries|powernv} and mm into one.
2. Patch-3 changed the type of i from "unsigned long i" to "int i"
3. Fixed commit msg for patch-14 - as pointed by Sashiko


Ritesh Harjani (IBM) (18):
  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
  powerpc/pseries: Drop inline from hugepage invalidate
  powerpc/pseries: Rework hugepage invalidate to remove conditional locking
  powerpc/pseries: Rework hash flush to remove conditional locking
  powerpc/pseries: Add context annotations for the DTL worker lock
  powerpc/pseries: Annotate the VPD sequence lock context
  powerpc/pseries: Annotate the RTAS indices sequence lock context
  powerpc/pseries: Annotate the RTAS physical-attestation sequence lock context
  powerpc/pseries: Annotate the DTL debugfs read lock context
  powerpc/pseries: Disable context analysis for the CMM hotplug notifier
  powerpc/pseries: Enable context analysis
  powerpc/powernv: Rework OPAL console write to remove conditional locking
  powerpc/powernv: 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 +-
 arch/powerpc/platforms/powernv/Makefile       |   2 +
 arch/powerpc/platforms/powernv/opal.c         |  30 +++--
 arch/powerpc/platforms/pseries/Makefile       |   3 +
 arch/powerpc/platforms/pseries/cmm.c          |   1 +
 arch/powerpc/platforms/pseries/dtl.c          |   8 ++
 arch/powerpc/platforms/pseries/lpar.c         |  59 +++++----
 arch/powerpc/platforms/pseries/papr-indices.c |   3 +
 .../platforms/pseries/papr-phy-attest.c       |   4 +
 arch/powerpc/platforms/pseries/papr-vpd.c     |   3 +
 18 files changed, 179 insertions(+), 81 deletions(-)

--
2.39.5


^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2026-11-19  3:40 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-19  3:38 [PATCHv2 00/18] powerpc/mm, pseries, powernv: Enable clang context analysis Ritesh Harjani (IBM)
2026-11-19  3:38 ` [PATCHv2 01/18] powerpc/mm/book3s64: unlock RCU before returning from mm_iommu_is_devmem() Ritesh Harjani (IBM)
2026-11-19  3:38 ` [PATCHv2 02/18] powerpc/mm/book3s64: Rework tlbie() to remove conditional locking Ritesh Harjani (IBM)
2026-11-19  3:38 ` [PATCHv2 03/18] powerpc/mm/book3s64: Rework native_flush_hash_range() " Ritesh Harjani (IBM)
2026-11-19  3:38 ` [PATCHv2 04/18] powerpc/mm/book3s64: Annotate the subpage-protection PTE lock Ritesh Harjani (IBM)
2026-11-19  3:39 ` [PATCHv2 05/18] powerpc/mm: Rework nohash TLB broadcast locking Ritesh Harjani (IBM)
2026-11-19  3:39 ` [PATCHv2 06/18] powerpc/mm: Enable context analysis Ritesh Harjani (IBM)
2026-11-19  3:39 ` [PATCHv2 07/18] powerpc/pseries: Drop inline from hugepage invalidate Ritesh Harjani (IBM)
2026-11-19  3:39 ` [PATCHv2 08/18] powerpc/pseries: Rework hugepage invalidate to remove conditional locking Ritesh Harjani (IBM)
2026-11-19  3:39 ` [PATCHv2 09/18] powerpc/pseries: Rework hash flush " Ritesh Harjani (IBM)
2026-11-19  3:39 ` [PATCHv2 10/18] powerpc/pseries: Add context annotations for the DTL worker lock Ritesh Harjani (IBM)
2026-11-19  3:39 ` [PATCHv2 11/18] powerpc/pseries: Annotate the VPD sequence lock context Ritesh Harjani (IBM)
2026-11-19  3:39 ` [PATCHv2 12/18] powerpc/pseries: Annotate the RTAS indices " Ritesh Harjani (IBM)
2026-11-19  3:39 ` [PATCHv2 13/18] powerpc/pseries: Annotate the RTAS physical-attestation " Ritesh Harjani (IBM)
2026-11-19  3:39 ` [PATCHv2 14/18] powerpc/pseries: Annotate the DTL debugfs read " Ritesh Harjani (IBM)
2026-11-19  3:39 ` [PATCHv2 15/18] powerpc/pseries: Disable context analysis for the CMM hotplug notifier Ritesh Harjani (IBM)
2026-11-19  3:39 ` [PATCHv2 16/18] powerpc/pseries: Enable context analysis Ritesh Harjani (IBM)
2026-11-19  3:39 ` [PATCHv2 17/18] powerpc/powernv: Rework OPAL console write to remove conditional locking Ritesh Harjani (IBM)
2026-11-19  3:39 ` [PATCHv2 18/18] powerpc/powernv: Enable context analysis Ritesh Harjani (IBM)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox