lkml.org 
[lkml]   [2006]   [Dec]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH] Use correct macros in raid code, not raw asm
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 {
_
?
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-12-29 01:01    [W:0.081 / U:0.320 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site