From: sashiko-bot@kernel.org
To: "Magnus Lindholm" <linmag7@gmail.com>
Cc: linux-serial@vger.kernel.org
Subject: Re: [PATCH v2 4/6] sparc64: add SPARC64 VII CPU, MMU and SMP support
Date: Sun, 11 Oct 2026 20:09:30 +0000 [thread overview]
Message-ID: <sashiko-outbox-167445@kernel.org> (raw)
In-Reply-To: <20261011195729.981243-5-linmag7@gmail.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] sparc64: missing VII membar synchronization for __flush_tlb_mm and xcall
--
commit 3658cc67da72bc2e25beda7e9124cb710a511258
Author: Magnus Lindholm <linmag7@gmail.com>
sparc64: add SPARC64 VII CPU, MMU and SMP support
This commit adds support for SPARC64 VII and VII+ processors in the Fujitsu
M3000. It introduces separate CPU, MMU, and SMP paths, managing CPU topology
and restrainable ECC errors. It also provides separate demap routines to satisfy
hardware synchronization requirements that are missing in the Cheetah paths.
> diff --git a/arch/sparc/mm/ultra.S b/arch/sparc/mm/ultra.S
> index 70e658d107e02..c4a9647d6eb04 100644
> --- a/arch/sparc/mm/ultra.S
> +++ b/arch/sparc/mm/ultra.S
[ ... ]
> @@ -981,6 +981,242 @@ xcall_kgdb_capture:
>
> #endif /* CONFIG_SMP */
>
[ ... ]
> + .globl sparc64_vii_patch_cachetlbops
> +sparc64_vii_patch_cachetlbops:
> + save %sp, -128, %sp
> +
> + sethi %hi(__flush_tlb_mm), %o0
> + or %o0, %lo(__flush_tlb_mm), %o0
> + sethi %hi(__cheetah_flush_tlb_mm), %o1
> + or %o1, %lo(__cheetah_flush_tlb_mm), %o1
[Severity: High]
Does this incorrectly reuse the Cheetah variant for VII hardware?
The commit message explicitly notes that SPARC64 VII requires hardware
synchronization (membar #Sync) for context writes and instruction demaps,
and that the existing Cheetah assembly does not establish this. However,
sparc64_vii_patch_cachetlbops patches __flush_tlb_mm using
__cheetah_flush_tlb_mm, which lacks the required membar #Sync after writing
to ASI_DMMU.
> + call tlb_patch_one
> + mov 19, %o2
> +
> + sethi %hi(__flush_tlb_page), %o0
[ ... ]
> +#ifdef CONFIG_SMP
> + sethi %hi(xcall_flush_tlb_page), %o0
> + or %o0, %lo(xcall_flush_tlb_page), %o0
> + sethi %hi(__vii_xcall_flush_tlb_page_patch), %o1
> + or %o1, %lo(__vii_xcall_flush_tlb_page_patch), %o1
> + call tlb_patch_one
> + mov 3, %o2
> +
> + /* VII uses 32-entry fTLBs: do not use the Spitfire 64-slot sweep. */
> + sethi %hi(xcall_flush_tlb_kernel_range), %o0
> + or %o0, %lo(xcall_flush_tlb_kernel_range), %o0
> + sethi %hi(__cheetah_xcall_flush_tlb_kernel_range), %o1
> + or %o1, %lo(__cheetah_xcall_flush_tlb_kernel_range), %o1
> + call tlb_patch_one
> + mov 44, %o2
> +#endif
[Severity: High]
Is xcall_flush_tlb_mm missing from this patch block?
By omitting xcall_flush_tlb_mm entirely, it seems remote CPUs will fall back
to the unpatched Spitfire handler. This would violate the JPS2 F.10.1
synchronization requirements and potentially leave the VII hardware exposed to
stale TLB or pipeline states.
> +
> +#ifdef DCACHE_ALIASING_POSSIBLE
> + sethi %hi(__flush_dcache_page), %o0
[ ... ]
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261011195729.981243-1-linmag7@gmail.com?part=4
next prev parent reply other threads:[~2026-10-11 20:09 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-11 19:55 [PATCH v2 0/6] sparc64: add Fujitsu M3000 support Magnus Lindholm
2026-10-11 19:55 ` [PATCH v2 1/6] sparc64: return from the generic clear_page implementation Magnus Lindholm
2026-10-11 20:01 ` sashiko-bot
2026-10-11 19:55 ` [PATCH v2 2/6] sparc64: honor queued spinlock layout in secondary startup Magnus Lindholm
2026-10-11 20:05 ` sashiko-bot
2026-10-11 19:55 ` [PATCH v2 3/6] sparc64: avoid huge kernel PUD mappings on sun4u Magnus Lindholm
2026-10-11 20:04 ` sashiko-bot
2026-10-11 19:55 ` [PATCH v2 4/6] sparc64: add SPARC64 VII CPU, MMU and SMP support Magnus Lindholm
2026-10-11 20:09 ` sashiko-bot [this message]
2026-10-12 7:34 ` kernel test robot
2026-10-11 19:55 ` [PATCH v2 5/6] sparc64: add M3000 Oberon PCIe support Magnus Lindholm
2026-10-11 20:09 ` sashiko-bot
2026-10-11 19:55 ` [PATCH v2 6/6] hvc: add an M3000 firmware console backend Magnus Lindholm
2026-10-11 20:05 ` sashiko-bot
2026-10-12 6:46 ` Jiri Slaby
2026-10-12 14:57 ` Magnus Lindholm
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=sashiko-outbox-167445@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=linmag7@gmail.com \
--cc=linux-serial@vger.kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/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