public inbox for linuxppc-dev@ozlabs.org 
 help / color / mirror / Atom feed
From: Michael Ellerman <michael@ellerman•id.au>
To: Michael Neuling <mikey@neuling•org>
Cc: anton@samba•org, miltonm@realtime•net,
	Linux PPC dev <linuxppc-dev@ozlabs•org>
Subject: Re: [PATCH] powerpc/pseries: Kill all prefetch streams on context switch
Date: Sun, 2 Jun 2013 01:13:28 +1000	[thread overview]
Message-ID: <20130601151327.GA27644@concordia> (raw)
In-Reply-To: <17925.1369892067@ale.ozlabs.ibm.com>

On Thu, May 30, 2013 at 03:34:27PM +1000, Michael Neuling wrote:
> On context switch, we should have no prefetch streams leak from one
> userspace process to another.  This frees up prefetch resources for the
> next process.
> 
> Based on patch from Milton Miller.
> 
> Signed-off-by: Michael Neuling <mikey@neuling•org>
> 
> diff --git a/arch/powerpc/include/asm/ppc_asm.h b/arch/powerpc/include/asm/ppc_asm.h
> index cea8496..2f1b6c5 100644
> --- a/arch/powerpc/include/asm/ppc_asm.h
> +++ b/arch/powerpc/include/asm/ppc_asm.h
> @@ -523,6 +523,17 @@ END_FTR_SECTION_NESTED(CPU_FTR_HAS_PPR,CPU_FTR_HAS_PPR,946)
>  #define PPC440EP_ERR42
>  #endif
>  
> +/* The following stops all load and store data streams associated with stream
> + * ID (ie. streams created explicitly).  The embedded and server mnemonics for
> + * dcbt are different so we use machine "power4" here explicitly.
> + */
> +#define DCBT_STOP_ALL_STREAM_IDS(scratch)	\
> +.machine push ;					\
> +.machine "power4" ;				\
> +       lis     scratch,0x60000000@h;		\
> +       dcbt    r0,scratch,0b01010;		\
> +.machine pop

I don't see why we need the macro, ie. just stick this code in
entry_64.S directly.

cheers

  reply	other threads:[~2013-06-01 15:13 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-30  5:34 [PATCH] powerpc/pseries: Kill all prefetch streams on context switch Michael Neuling
2013-06-01 15:13 ` Michael Ellerman [this message]
2013-06-03  0:42   ` Michael Neuling

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=20130601151327.GA27644@concordia \
    --to=michael@ellerman$(echo .)id.au \
    --cc=anton@samba$(echo .)org \
    --cc=linuxppc-dev@ozlabs$(echo .)org \
    --cc=mikey@neuling$(echo .)org \
    --cc=miltonm@realtime$(echo .)net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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