mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Chris Wright <chrisw@sous-sol.org>
To: Chris Wright <chrisw@sous-sol.org>
Cc: "Jeremy Fitzhardinge" <jeremy@goop.org>,
	"Steven Rostedt" <rostedt@goodmis.org>,
	"Ingo Molnar" <mingo@elte.hu>,
	"Frédéric Weisbecker" <fweisbec@gmail.com>,
	LKML <linux-kernel@vger.kernel.org>,
	"Andrew Morton" <akpm@linux-foundation.org>,
	"Glauber de Oliveira Costa" <gcosta@redhat.com>,
	"Rusty Russell" <rusty@rustcorp.com.au>,
	"Pekka Enberg" <penberg@cs.helsinki.fi>
Subject: Re: [PATCH 0/2] [GIT PULL] tracing: various bug fixes
Date: Thu, 23 Apr 2009 11:02:38 -0700	[thread overview]
Message-ID: <20090423180238.GS3036@sequoia.sous-sol.org> (raw)
In-Reply-To: <20090423172138.GR3036@sequoia.sous-sol.org>

* Chris Wright (chrisw@sous-sol.org) wrote:
> * Jeremy Fitzhardinge (jeremy@goop.org) wrote:
> > OK, the good news is that its not a callee-save calling convention  
> > problem, which is what I feared.  But it does sound pretty awkward to  
> > fix.  Does __native_flush_tlb_global() have to use  
> > raw_local_irq_save/restore?
> 
> Vaguely related...makes sense to do native_(read/write)_cr4 since it's
> the native tlb flushing implementation, no?
> 
> looks ok from inspection, not tested yet...

BTW, Steve, does that fix it for you?  Sure makes the code cleaner:

 410:   0f 20 e2                mov    %cr4,%rdx
 413:   48 89 d0                mov    %rdx,%rax
 416:   24 7f                   and    $0x7f,%al
 418:   0f 22 e0                mov    %rax,%cr4
 41b:   0f 22 e2                mov    %rdx,%cr4

thanks,
-chris

> Subject: [PATCH] x86: use native register access for native tlb flushing
> 
> currently these are paravirtulaized, doesn't appear any callers rely on
> this (no pv_ops backends are using native_tlb and overriding cr3/4
> access).
> 
> Signed-off-by: Chris Wright <chrisw@sous-sol.org>
> ---
>  arch/x86/include/asm/tlbflush.h |    8 ++++----
>  1 files changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/arch/x86/include/asm/tlbflush.h b/arch/x86/include/asm/tlbflush.h
> index 16a5c84..a5ecc9c 100644
> --- a/arch/x86/include/asm/tlbflush.h
> +++ b/arch/x86/include/asm/tlbflush.h
> @@ -17,7 +17,7 @@
>  
>  static inline void __native_flush_tlb(void)
>  {
> -	write_cr3(read_cr3());
> +	native_write_cr3(native_read_cr3());
>  }
>  
>  static inline void __native_flush_tlb_global(void)
> @@ -32,11 +32,11 @@ static inline void __native_flush_tlb_global(void)
>  	 */
>  	raw_local_irq_save(flags);
>  
> -	cr4 = read_cr4();
> +	cr4 = native_read_cr4();
>  	/* clear PGE */
> -	write_cr4(cr4 & ~X86_CR4_PGE);
> +	native_write_cr4(cr4 & ~X86_CR4_PGE);
>  	/* write old PGE again and flush TLBs */
> -	write_cr4(cr4);
> +	native_write_cr4(cr4);
>  
>  	raw_local_irq_restore(flags);
>  }

  reply	other threads:[~2009-04-23 18:04 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-20 22:22 Steven Rostedt
2009-04-20 22:22 ` [PATCH 1/2] tracing: use recursive counter over irq level Steven Rostedt
2009-04-20 22:22 ` [PATCH 2/2] tracing: use nowakeup version of commit for function event trace tests Steven Rostedt
2009-04-20 22:41   ` Frederic Weisbecker
2009-04-20 22:57     ` Steven Rostedt
2009-04-21  8:23 ` [PATCH 0/2] [GIT PULL] tracing: various bug fixes Ingo Molnar
2009-04-21  9:46   ` Ingo Molnar
2009-04-21 13:08     ` Steven Rostedt
2009-04-21 13:55     ` [PATCH][GIT PULL] ring-buffer: only warn on wrap if buffer is bigger than two pages Steven Rostedt
2009-04-21 14:35       ` Ingo Molnar
2009-04-21 14:54         ` Steven Rostedt
2009-04-21 16:22         ` Steven Rostedt
2009-04-21 14:03     ` [tip:tracing/core] " tip-bot for Steven Rostedt
2009-04-22  6:48     ` [PATCH 0/2] [GIT PULL] tracing: various bug fixes Steven Rostedt
2009-04-22 11:47       ` Frederic Weisbecker
2009-04-22 13:49         ` Steven Rostedt
2009-04-22 17:10           ` Frederic Weisbecker
2009-04-22 17:17             ` Jeremy Fitzhardinge
2009-04-22 17:22               ` Steven Rostedt
2009-04-22 21:32                 ` Steven Rostedt
2009-04-23  8:28                   ` Ingo Molnar
2009-04-23  3:35       ` Steven Rostedt
2009-04-23  8:20         ` Ingo Molnar
2009-04-23 13:53           ` Steven Rostedt
2009-04-23 14:39             ` Steven Rostedt
2009-04-23 15:08               ` Steven Rostedt
2009-04-23 15:11                 ` Ingo Molnar
2009-04-23 16:49                 ` Jeremy Fitzhardinge
2009-04-23 17:21                   ` Chris Wright
2009-04-23 18:02                     ` Chris Wright [this message]
2009-04-23 18:33                       ` Steven Rostedt
2009-04-23 18:43                         ` Chris Wright
2009-04-24  8:36                           ` Ingo Molnar
2009-04-24 15:12                             ` Chris Wright
2009-04-29  6:16                     ` [tip:tracing/core] x86: use native register access for native tlb flushing tip-bot for Chris Wright
2009-04-23 17:52                   ` [PATCH 0/2] [GIT PULL] tracing: various bug fixes Steven Rostedt
2009-04-24  8:34             ` Ingo Molnar

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=20090423180238.GS3036@sequoia.sous-sol.org \
    --to=chrisw@sous-sol.org \
    --cc=akpm@linux-foundation.org \
    --cc=fweisbec@gmail.com \
    --cc=gcosta@redhat.com \
    --cc=jeremy@goop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=penberg@cs.helsinki.fi \
    --cc=rostedt@goodmis.org \
    --cc=rusty@rustcorp.com.au \
    /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

Powered by JetHome