Re: [PATCH] [14/28] x86: MCE: Add MSR read wrappers for easier error injection
From: Andi Kleen
Date: Fri Apr 17 2009 - 08:57:36 EST
On Fri, Apr 17, 2009 at 08:23:51PM +0900, Hidetoshi Seto wrote:
> Andi Kleen wrote:
> > This will be used by future patches to allow machine check error injection.
> > Right now it's a nop, except for adding some wrappers around the MSR reads.
> >
> > This is early in the sequence to avoid too many conflicts.
> >
> > Andi Kleen <ak@xxxxxxxxxxxxxxx>
> >
> >
> > Signed-off-by: Andi Kleen <ak@xxxxxxxxxxxxxxx>
> >
> > ---
> > arch/x86/kernel/cpu/mcheck/mce_64.c | 37 ++++++++++++++++++++++++------------
> > 1 file changed, 25 insertions(+), 12 deletions(-)
> >
> > Index: linux/arch/x86/kernel/cpu/mcheck/mce_64.c
> > ===================================================================
> > --- linux.orig/arch/x86/kernel/cpu/mcheck/mce_64.c 2009-04-07 16:09:59.000000000 +0200
> > +++ linux/arch/x86/kernel/cpu/mcheck/mce_64.c 2009-04-07 16:43:12.000000000 +0200
> > @@ -171,6 +171,19 @@
> > panic(msg);
> > }
>
> Since you introduce X86_MCE_INJECT in later patch,
> how about this style?
If someone feels strongly about that I can do that, but personally
I would think using standard function return arguments without
macros is more regular and more readable in general. That seems
to be also the general trend in the source base, going away from
magic macros.
Do you feel strongly about it?
-Andi
>
> #ifdef CONFIG_X86_MCE_INJECT
> #define mce_rdmsrl(msr,v) (v) = __mce_rdmsrl((msr))
> #define mce_wrmsrl(msr,v) __mce_wrmsrl((msr),(v))
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/