virtualization.lists.linux-foundation.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@osdl.org>
To: Rusty Russell <rusty@rustcorp.com.au>
Cc: Andi Kleen <ak@muc.de>, Linus Torvalds <torvalds@osdl.org>,
	virtualization <virtualization@lists.osdl.org>,
	Neil Brown <neilb@suse.de>, Ingo Molnar <mingo@elte.hu>,
	lkml - Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] Use correct macros in raid code, not raw asm
Date: Thu, 28 Dec 2006 15:56:59 -0800	[thread overview]
Message-ID: <20061228155659.462eaa9c.akpm@osdl.org> (raw)
In-Reply-To: <1167348861.30506.46.camel@localhost.localdomain>

On Fri, 29 Dec 2006 10:34:21 +1100
Rusty Russell <rusty@rustcorp.com.au> wrote:

> This make sure it's paravirtualized correctly when CONFIG_PARAVIRT=y.
> 
> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
> 
> diff -r 4ff048622391 drivers/md/raid6x86.h
> --- a/drivers/md/raid6x86.h	Thu Dec 28 16:52:54 2006 +1100
> +++ b/drivers/md/raid6x86.h	Fri Dec 29 10:09:38 2006 +1100
> @@ -75,13 +75,14 @@ static inline unsigned long raid6_get_fp
>  	unsigned long cr0;
>  
>  	preempt_disable();
> -	asm volatile("mov %%cr0,%0 ; clts" : "=r" (cr0));
> +	cr0 = read_cr0();
> +	clts();
>  	return cr0;
>  }
>  
>  static inline void raid6_put_fpu(unsigned long cr0)
>  {
> -	asm volatile("mov %0,%%cr0" : : "r" (cr0));
> +	write_cr0(cr0);
>  	preempt_enable();
>  }
>  

Perhaps we also need:

--- a/drivers/md/raid6x86.h~use-correct-macros-in-raid-code-not-raw-asm-include
+++ a/drivers/md/raid6x86.h
@@ -21,6 +21,8 @@
 
 #if defined(__i386__) || defined(__x86_64__)
 
+#include <asm/system.h>
+
 #ifdef __x86_64__
 
 typedef struct {
_

?

  parent reply	other threads:[~2006-12-28 23:56 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-28 23:34 [PATCH] Use correct macros in raid code, not raw asm Rusty Russell
2006-12-28 23:51 ` Linus Torvalds
2006-12-28 23:56 ` Andrew Morton [this message]
2006-12-29  0:06   ` Rusty Russell
2006-12-29 11:13     ` Andi Kleen
2007-02-09  1:20       ` H. Peter Anvin
2007-02-09  1:37         ` Neil Brown
2007-02-09  1:43           ` H. Peter Anvin

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=20061228155659.462eaa9c.akpm@osdl.org \
    --to=akpm@osdl.org \
    --cc=ak@muc.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=neilb@suse.de \
    --cc=rusty@rustcorp.com.au \
    --cc=torvalds@osdl.org \
    --cc=virtualization@lists.osdl.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;
as well as URLs for NNTP newsgroup(s).