From: Venkat <venkat88@linux.ibm.com>
To: "Ritesh Harjani (IBM)" <ritesh.list@gmail.com>
Cc: linuxppc-dev@lists.ozlabs.org,
Madhavan Srinivasan <maddy@linux.ibm.com>,
linux-kernel@vger.kernel.org, chleroy@kernel.org,
Michael Ellerman <mpe@ellerman.id.au>,
Nicholas Piggin <npiggin@gmail.com>,
Shrikanth Hegde <sshegde@linux.ibm.com>
Subject: Re: [PATCHv3 00/19] powerpc/mm, pseries, powernv: Enable clang context analysis
Date: Mon, 30 Nov 2026 13:09:10 +0530 [thread overview]
Message-ID: <F094A537-FEBD-4CAC-AB51-16FA07422A19@linux.ibm.com> (raw)
In-Reply-To: <cover.1795147055.git.ritesh.list@gmail.com>
Hello Ritesh,
I have tested this series on both pseries LPAR and Baremetal machine.
Toolchain: Clang 24.0.0git (39103f5c4c73), CONFIG_WARN_CONTEXT_ANALYSIS=y.
The only extra flag was KCFLAGS=-Wno-unsequenced-volatile, to work around
an unrelated Clang 24 error on 'jiffies' in kernel/sched/topology.c.
Build (both machines): no -Wthread-safety warnings or errors.
On pseries LPAR:
- Radix: powerpc/mm selftests 14/14 pass. papr_vpd selftest 8/8 pass.
- CMM booted with cmm.simulate=1: sysfs and cmmthread present.
- Hash (disable_radix, CONFIG_PPC_SUBPAGE_PROT=y): powerpc/mm selftests
14/14 pass plus stress-ng with no errors.
PowerNV bare metal (9006-22C POWER9, skiboot-v6.8, ppc64le, 64K pages):
- Radix: powerpc/mm selftests pass, stress-ng mmap/vm/mprotect/fork/
pthread (60s each) pass.
- Hash (disable_radix, CONFIG_PPC_SUBPAGE_PROT=y): powerpc/mm selftests
14/14 pass. The same stress-ng workloads pass.
- No BUG/WARNING/lockdep/stall messages in dmesg in any run.
If it makes sense, then please add below tag.
Tested-by: Venkat Rao Bagalkote <venkat88@linux.ibm.com>
Regards,
Venkat.
> On 20 Nov 2026, at 9:32 AM, Ritesh Harjani (IBM) <ritesh.list@gmail.com> wrote:
>
> 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")
>
>
> v2 -> v3:
> =========
> 1. Added patch-3 to remove -Wunused-but-set-variable on 4K with Hash (reported
> by Sashiko).
>
> 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) (19):
> powerpc/mm/book3s64: unlock RCU before returning from mm_iommu_is_devmem()
> powerpc/mm/book3s64: Rework tlbie() to remove conditional locking
> powerpc/64s/hash: Reference all arguments in the 4K pte_iterate_hashed_subpages()
> 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/include/asm/book3s/64/hash-4k.h | 4 +
> 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 +
> 19 files changed, 183 insertions(+), 81 deletions(-)
>
> --
> 2.39.5
>
next prev parent reply other threads:[~2026-11-30 7:39 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-20 4:02 [PATCHv3 00/19] powerpc/mm, pseries, powernv: Enable clang context analysis Ritesh Harjani (IBM)
2026-11-20 4:03 ` [PATCHv3 01/19] powerpc/mm/book3s64: unlock RCU before returning from mm_iommu_is_devmem() Ritesh Harjani (IBM)
2026-11-20 4:03 ` [PATCHv3 02/19] powerpc/mm/book3s64: Rework tlbie() to remove conditional locking Ritesh Harjani (IBM)
2026-11-20 4:03 ` [PATCHv3 03/19] powerpc/64s/hash: Reference all arguments in the 4K pte_iterate_hashed_subpages() Ritesh Harjani (IBM)
2026-11-20 4:03 ` [PATCHv3 04/19] powerpc/mm/book3s64: Rework native_flush_hash_range() to remove conditional locking Ritesh Harjani (IBM)
2026-11-20 4:03 ` [PATCHv3 05/19] powerpc/mm/book3s64: Annotate the subpage-protection PTE lock Ritesh Harjani (IBM)
2026-11-20 4:03 ` [PATCHv3 06/19] powerpc/mm: Rework nohash TLB broadcast locking Ritesh Harjani (IBM)
2026-11-20 4:03 ` [PATCHv3 07/19] powerpc/mm: Enable context analysis Ritesh Harjani (IBM)
2026-11-20 4:03 ` [PATCHv3 08/19] powerpc/pseries: Drop inline from hugepage invalidate Ritesh Harjani (IBM)
2026-11-20 4:03 ` [PATCHv3 09/19] powerpc/pseries: Rework hugepage invalidate to remove conditional locking Ritesh Harjani (IBM)
2026-11-20 4:03 ` [PATCHv3 10/19] powerpc/pseries: Rework hash flush " Ritesh Harjani (IBM)
2026-11-20 4:03 ` [PATCHv3 11/19] powerpc/pseries: Add context annotations for the DTL worker lock Ritesh Harjani (IBM)
2026-11-20 4:03 ` [PATCHv3 12/19] powerpc/pseries: Annotate the VPD sequence lock context Ritesh Harjani (IBM)
2026-11-20 4:03 ` [PATCHv3 13/19] powerpc/pseries: Annotate the RTAS indices " Ritesh Harjani (IBM)
2026-11-20 4:03 ` [PATCHv3 14/19] powerpc/pseries: Annotate the RTAS physical-attestation " Ritesh Harjani (IBM)
2026-11-20 4:03 ` [PATCHv3 15/19] powerpc/pseries: Annotate the DTL debugfs read " Ritesh Harjani (IBM)
2026-11-20 4:03 ` [PATCHv3 16/19] powerpc/pseries: Disable context analysis for the CMM hotplug notifier Ritesh Harjani (IBM)
2026-11-20 4:03 ` [PATCHv3 17/19] powerpc/pseries: Enable context analysis Ritesh Harjani (IBM)
2026-11-20 4:03 ` [PATCHv3 18/19] powerpc/powernv: Rework OPAL console write to remove conditional locking Ritesh Harjani (IBM)
2026-11-20 4:03 ` [PATCHv3 19/19] powerpc/powernv: Enable context analysis Ritesh Harjani (IBM)
2026-11-30 7:39 ` Venkat [this message]
2026-11-30 12:26 ` [PATCHv3 00/19] powerpc/mm, pseries, powernv: Enable clang " Madhavan Srinivasan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=F094A537-FEBD-4CAC-AB51-16FA07422A19@linux.ibm.com \
--to=venkat88@linux.ibm.com \
--cc=chleroy@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=maddy@linux.ibm.com \
--cc=mpe@ellerman.id.au \
--cc=npiggin@gmail.com \
--cc=ritesh.list@gmail.com \
--cc=sshegde@linux.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox