lkml.org 
[lkml]   [2011]   [Sep]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [V5][PATCH 2/6] x86, nmi: create new NMI handler routines
    On Wed, Sep 21, 2011 at 01:36:30PM +0800, Huang Ying wrote:
    > On 09/20/2011 10:43 PM, Don Zickus wrote:
    > > index 68d758a..c2df58a 100644
    > > --- a/arch/x86/kernel/nmi.c
    > > +++ b/arch/x86/kernel/nmi.c
    > > @@ -13,6 +13,9 @@
    > > #include <linux/kprobes.h>
    > > #include <linux/kdebug.h>
    > > #include <linux/nmi.h>
    > > +#include <linux/delay.h>
    > > +#include <linux/hardirq.h>
    > > +#include <linux/slab.h>
    > >
    > > #if defined(CONFIG_EDAC)
    > > #include <linux/edac.h>
    > > @@ -21,6 +24,28 @@
    > > #include <linux/atomic.h>
    > > #include <asm/traps.h>
    > > #include <asm/mach_traps.h>
    > > +#include <asm/nmi.h>
    > > +
    > > +#define NMI_MAX_NAMELEN 16
    > > +struct nmiaction {
    > > + struct nmiaction __rcu *next;
    >
    > Why not just use struct list_head here and use list_xxx_rcu family to
    > operate on the list? IMHO, that will make code simpler without much
    > overhead.

    Yeah, I just copied and pasted from what was in the notifier chain stuff.
    Even though I don't need the previous pointer, the awkward rcu pointer
    stuff would be a lot simpler to implement and read with those macros. Let
    me play with it and see what I come up with.

    Thanks for the suggestion.

    Cheers,
    Don


    \
     
     \ /
      Last update: 2011-09-21 15:59    [W:2.922 / U:0.132 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site