mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andreas Larsson <andreas@gaisler.com>
To: Imre Kaloz <kaloz@kernel.org>, "David S. Miller" <davem@davemloft.net>
Cc: "Matthew Wilcox (Oracle)" <willy@infradead.org>,
	"Mike Rapoport (IBM)" <rppt@kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	sparclinux@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-mm@kvack.org
Subject: Re: [PATCH v3 0/4] sparc64: D-cache alias flushing fixes
Date: Fri, 23 Oct 2026 11:22:24 +0200	[thread overview]
Message-ID: <87800728-48e6-4953-a705-048d38bbf9c7@gaisler.com> (raw)
In-Reply-To: <cover.1792609488.git.kaloz@kernel.org>

On 2026-10-22 01:33, Imre Kaloz wrote:
> These fix D-cache alias flushing on sparc64 CPUs with a virtually
> indexed L1 D-cache (Spitfire and Cheetah).
> 
> 1/4 makes xcall_deliver() bail out before it touches the trap block
> when there is no other CPU to call, so an early cross call, before
> init_IRQ() sets up the mondo blocks, can't end up writing to physical
> address 0.
> 
> 2/4 flushes only the page a PTE maps instead of its whole folio, which
> removes about a million redundant page flushes from a colour-changing
> mremap() of a large folio (7.3 s on a Sun Fire V240).
> 
> 3/4 implements flush_cache_vmap() and flush_cache_vunmap(), which have
> been no-ops. Stale vmalloc lines corrupt BPF programs and module data
> on UltraSPARC III.
> 
> 4/4 passes the number of PTEs to move_pte(), as Andreas suggested. It
> touches mm/mremap.c and include/linux/pgtable.h, so it needs an ack
> from the mm folks.
> 
> 1-3 don't depend on 4 and can go in on their own. 2 and 3 are for
> stable (3 needs 2), 1 and 4 aren't. The series is on top of the sparc
> for-next branch.
> 
> Changes in v3:
> - new 1/4 and 4/4, following Andreas' review
> - 2/4: reworded the message and the move_pte() comment, marked the
>   UP #endif
> - 3/4: reworded the message, dropped the Suggested-by (I have no
>   email address for nsafran1217, the Link credits them), noted the
>   stable dependency on 2/4
> - picked up Stian's and Adrian's Tested-by tags
> 
> v2: https://lore.kernel.org/r/20260928132102.1707-1-kaloz@kernel.org
> 
> Imre Kaloz (4):
>   sparc64: skip the trap block in xcall_deliver() when there is no
>     target
>   sparc64: flush only the aliased page, not its whole folio
>   sparc64: flush vmalloc ranges from the D-cache on map and unmap
>   mm: pass the number of PTEs to move_pte()
> 
>  arch/sparc/include/asm/cacheflush_64.h |  9 ++--
>  arch/sparc/include/asm/pgtable_64.h    | 14 ++++--
>  arch/sparc/kernel/smp_64.c             | 51 +++++++++++++++-----
>  arch/sparc/mm/init_64.c                | 65 ++++++++++++++++++++++++++
>  arch/sparc/mm/tlb.c                    |  2 +-
>  arch/sparc/mm/ultra.S                  | 25 ++++++++++
>  include/linux/pgtable.h                |  2 +-
>  mm/mremap.c                            |  2 +-
>  8 files changed, 148 insertions(+), 22 deletions(-)
> 
> 
> base-commit: 2bc58762a3d74e42de129d717ae3ba10ecf0ab96

Reviewed-by: Andreas Larsson <andreas@gaisler.com>

Picking patches 1-3 to my for-next. I won't pick number 4 up at this
point without confirmation from the mm folks.

Thanks,
Andreas


      parent reply	other threads:[~2026-10-23  9:22 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-21 23:33 Imre Kaloz
2026-10-21 23:33 ` [PATCH v3 1/4] sparc64: skip the trap block in xcall_deliver() when there is no target Imre Kaloz
2026-10-21 23:33 ` [PATCH v3 2/4] sparc64: flush only the aliased page, not its whole folio Imre Kaloz
2026-10-21 23:33 ` [PATCH v3 3/4] sparc64: flush vmalloc ranges from the D-cache on map and unmap Imre Kaloz
2026-10-21 23:33 ` [PATCH v3 4/4] mm: pass the number of PTEs to move_pte() Imre Kaloz
2026-10-23 17:17   ` Pedro Falcato
2026-10-23 20:53   ` David Hildenbrand (Arm)
2026-10-27 21:26     ` Imre Kaloz
2026-10-28  8:49       ` David Hildenbrand (Arm)
2026-10-28  9:16         ` Imre Kaloz
2026-10-28  9:22           ` David Hildenbrand (Arm)
2026-10-28  9:58             ` John Paul Adrian Glaubitz
2026-10-28 10:02               ` David Hildenbrand (Arm)
2026-10-28 10:12                 ` Lorenzo Stoakes (ARM)
2026-10-28 10:17             ` Imre Kaloz
2026-10-28 13:57               ` Andreas Larsson
2026-10-28 13:59                 ` David Hildenbrand (Arm)
2026-10-28 16:26                   ` Imre Kaloz
2026-10-28 14:00               ` David Hildenbrand (Arm)
2026-10-22  8:20 ` [PATCH v3 0/4] sparc64: D-cache alias flushing fixes Stian Halseth
2026-10-23  9:22 ` Andreas Larsson [this message]

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=87800728-48e6-4953-a705-048d38bbf9c7@gaisler.com \
    --to=andreas@gaisler.com \
    --cc=akpm@linux-foundation.org \
    --cc=davem@davemloft.net \
    --cc=kaloz@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=rppt@kernel.org \
    --cc=sparclinux@vger.kernel.org \
    --cc=willy@infradead.org \
    /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

all inboxes | Powered by JetHome®