linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Benjamin Gray <bgray@linux.ibm.com>
To: Russell Currey <ruscur@russell.cc>, linuxppc-dev@lists.ozlabs.org
Cc: jniethe5@gmail.com, npiggin@gmail.com, cmr@bluescreens.de,
	ajd@linux.ibm.com
Subject: Re: [PATCH v8 4/6] powerpc/tlb: Add local flush for page given mm_struct and psize
Date: Mon, 24 Oct 2022 16:22:01 +1100	[thread overview]
Message-ID: <36caf90fe6df4cea3b719913856e3d080c2ca31f.camel@linux.ibm.com> (raw)
In-Reply-To: <491120551489673b614d2f058ea580dc9a1534f0.camel@russell.cc>

On Mon, 2022-10-24 at 14:30 +1100, Russell Currey wrote:
> On Fri, 2022-10-21 at 16:22 +1100, Benjamin Gray wrote:
> > Adds a local TLB flush operation that works given an mm_struct, VA
> > to
> > flush, and page size representation.
> > 
> > This removes the need to create a vm_area_struct, which the
> > temporary
> > patching mm work does not need.
> > 
> > Signed-off-by: Benjamin Gray <bgray@linux.ibm.com>
> > ---
> >  arch/powerpc/include/asm/book3s/32/tlbflush.h      | 9 +++++++++
> >  arch/powerpc/include/asm/book3s/64/tlbflush-hash.h | 5 +++++
> >  arch/powerpc/include/asm/book3s/64/tlbflush.h      | 8 ++++++++
> >  arch/powerpc/include/asm/nohash/tlbflush.h         | 1 +
> >  4 files changed, 23 insertions(+)
> > 
> > diff --git a/arch/powerpc/include/asm/book3s/32/tlbflush.h
> > b/arch/powerpc/include/asm/book3s/32/tlbflush.h
> > index ba1743c52b56..e5a688cebf69 100644
> > --- a/arch/powerpc/include/asm/book3s/32/tlbflush.h
> > +++ b/arch/powerpc/include/asm/book3s/32/tlbflush.h
> > @@ -2,6 +2,8 @@
> >  #ifndef _ASM_POWERPC_BOOK3S_32_TLBFLUSH_H
> >  #define _ASM_POWERPC_BOOK3S_32_TLBFLUSH_H
> >  
> > +#include <linux/build_bug.h>
> > +
> >  #define MMU_NO_CONTEXT      (0)
> >  /*
> >   * TLB flushing for "classic" hash-MMU 32-bit CPUs, 6xx, 7xx, 7xxx
> > @@ -74,6 +76,13 @@ static inline void local_flush_tlb_page(struct
> > vm_area_struct *vma,
> >  {
> >         flush_tlb_page(vma, vmaddr);
> >  }
> > +
> > +static inline void local_flush_tlb_page_psize(struct mm_struct
> > *mm,
> > unsigned long vmaddr, int psize)
> > +{
> > +       BUILD_BUG_ON(psize != MMU_PAGE_4K);
> 
> Is there any utility in adding this for 32bit if the following
> patches
> are only for Radix?

It needs some kind of definition to avoid #ifdef's. I figured I may as
well provide a correct implementation, given the functions around it
are implemented. The BUILD_BUG_ON specifically is just defensive in
case my assumptions are wrong. I don't know anything about these
machines, just what the kernel defines. I can remove the check, or
replace the whole implementation with a BUILD_BUG?

  reply	other threads:[~2022-10-24  5:23 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-21  5:22 [PATCH v8 0/6] Use per-CPU temporary mappings for patching Benjamin Gray
2022-10-21  5:22 ` [PATCH v8 1/6] powerpc: Allow clearing and restoring registers independent of saved breakpoint state Benjamin Gray
2022-10-24  3:06   ` Russell Currey
2022-10-21  5:22 ` [PATCH v8 2/6] powerpc/code-patching: Use WARN_ON and fix check in poking_init Benjamin Gray
2022-10-24  3:08   ` Russell Currey
2022-10-21  5:22 ` [PATCH v8 3/6] powerpc/code-patching: Verify instruction patch succeeded Benjamin Gray
2022-10-24  3:20   ` Russell Currey
2022-10-25  3:30     ` Benjamin Gray
2022-10-21  5:22 ` [PATCH v8 4/6] powerpc/tlb: Add local flush for page given mm_struct and psize Benjamin Gray
2022-10-24  3:30   ` Russell Currey
2022-10-24  5:22     ` Benjamin Gray [this message]
2022-10-24  4:22   ` Russell Currey
2022-10-21  5:22 ` [PATCH v8 5/6] powerpc/code-patching: Use temporary mm for Radix MMU Benjamin Gray
2022-10-24  3:45   ` Russell Currey
2022-10-24  5:17     ` Benjamin Gray
2022-10-24 15:39       ` Christopher M. Riedl
2022-10-24  8:46   ` kernel test robot
2022-10-21  5:22 ` [PATCH v8 6/6] powerpc/code-patching: Use CPU local patch address directly Benjamin Gray

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=36caf90fe6df4cea3b719913856e3d080c2ca31f.camel@linux.ibm.com \
    --to=bgray@linux.ibm.com \
    --cc=ajd@linux.ibm.com \
    --cc=cmr@bluescreens.de \
    --cc=jniethe5@gmail.com \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=npiggin@gmail.com \
    --cc=ruscur@russell.cc \
    /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;
as well as URLs for NNTP newsgroup(s).