From: Rusty Russell <rusty@rustcorp.com.au>
To: Andrew Morton <akpm@osdl.org>
Cc: Andi Kleen <ak@muc.de>, Linus Torvalds <torvalds@osdl.org>,
Ingo Molnar <mingo@elte.hu>, Neil Brown <neilb@suse.de>,
lkml - Kernel Mailing List <linux-kernel@vger.kernel.org>,
virtualization <virtualization@lists.osdl.org>
Subject: Re: [PATCH] Use correct macros in raid code, not raw asm
Date: Fri, 29 Dec 2006 11:06:43 +1100 [thread overview]
Message-ID: <1167350803.30506.49.camel@localhost.localdomain> (raw)
In-Reply-To: <20061228155659.462eaa9c.akpm@osdl.org>
On Thu, 2006-12-28 at 15:56 -0800, Andrew Morton wrote:
> 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>
> +
The code looks like it's designed to be included from userspace for
testing; as it compiles without this include (and has no other
includes), I chose not to add it.
Linus makes a good point, but someone who actually knows the code
should, y'know, test it and stuff...
Rusty.
next prev parent reply other threads:[~2006-12-29 0:06 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
2006-12-29 0:06 ` Rusty Russell [this message]
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=1167350803.30506.49.camel@localhost.localdomain \
--to=rusty@rustcorp.com.au \
--cc=ak@muc.de \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=neilb@suse.de \
--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