lkml.org 
[lkml]   [2012]   [Mar]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH v2] x86,nmi: Fix page faults by nmiaction if kmemcheck is enabled
    On Fri, Mar 09, 2012 at 05:12:18AM -0500, Li Zhong wrote:
    > On Thu, 2012-03-08 at 16:02 -0500, Don Zickus wrote:
    >
    > Thank you, Don.
    >
    > As flags is moved into the macro, it may cause following compile error,
    > drivers/watchdog/hpwdt.c: In function 'hpwdt_init_nmi_decoding':
    > drivers/watchdog/hpwdt.c:737: error: initializer element is not constant
    > drivers/watchdog/hpwdt.c:737: error: (near initialization for
    > 'hpwdt_pretimeout_na.flags')

    Crap, I thought I had them all compiled. Thanks for the heads up.
    Actually I think this could is just misusing the flag to begin with. Let
    me figure out what is going on.

    Thanks,
    Don

    >
    > So following fix might be needed:
    >
    > diff --git a/drivers/watchdog/hpwdt.c b/drivers/watchdog/hpwdt.c
    > index 3c166d3..e1161ea 100644
    > --- a/drivers/watchdog/hpwdt.c
    > +++ b/drivers/watchdog/hpwdt.c
    > @@ -734,9 +734,12 @@ static int __devinit hpwdt_init_nmi_decoding(struct pci_dev *dev)
    > * die notify list to handle a critical NMI. The default is to
    > * be last so other users of the NMI signal can function.
    > */
    > - retval = register_nmi_handler(NMI_UNKNOWN, hpwdt_pretimeout,
    > - (priority) ? NMI_FLAG_FIRST : 0,
    > - "hpwdt");
    > + if (priority)
    > + retval = register_nmi_handler(NMI_UNKNOWN, hpwdt_pretimeout,
    > + NMI_FLAG_FIRST, "hpwdt");
    > + else
    > + retval = register_nmi_handler(NMI_UNKNOWN, hpwdt_pretimeout,
    > + 0, "hpwdt");
    > if (retval != 0) {
    > dev_warn(&dev->dev,
    > "Unable to register a die notifier (err=%d).\n",
    >
    >


    \
     
     \ /
      Last update: 2012-03-09 15:27    [W:0.030 / U:0.188 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site