virtualization.lists.linux-foundation.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Use correct macros in raid code, not raw asm
@ 2006-12-28 23:34 Rusty Russell
  2006-12-28 23:51 ` Linus Torvalds
  2006-12-28 23:56 ` Andrew Morton
  0 siblings, 2 replies; 8+ messages in thread
From: Rusty Russell @ 2006-12-28 23:34 UTC (permalink / raw)
  To: Andi Kleen, Andrew Morton, Linus Torvalds, Ingo Molnar,
	Neil Brown
  Cc: lkml - Kernel Mailing List, virtualization

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();
 }
 

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2007-02-09  1:43 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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

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).