Re: [PATCH 2/4] watchdog: hpwdt: Claim NMI from iLO

2018-08-08 Thread Jerry Hoemann
On Sat, Aug 04, 2018 at 06:09:05PM -0700, Guenter Roeck wrote:
> On 08/02/2018 02:15 PM, Jerry Hoemann wrote:
> > The hwpdt driver is overloaded for handling both the iLO
> > watchdog and the explicit "Generate NMI to System" virutal
> > button.
> > 
> > Claim the iLO NMI virtual button even if we are not claiming
> > the iLO watchdog pretimeout.
> > 
> > Signed-off-by: Jerry Hoemann 
> 
> Guess you know what you are doing here.
> 
> Reviewed-by: Guenter Roeck 

Unfortunately the underlying documentation isn't publically available.
I am going loosen the check in version two, but current upstream
is definitely wrong for reasons above.

> 
> > ---
> >   drivers/watchdog/hpwdt.c | 2 +-
> >   1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/drivers/watchdog/hpwdt.c b/drivers/watchdog/hpwdt.c
> > index 369022d..8a85ddd 100644
> > --- a/drivers/watchdog/hpwdt.c
> > +++ b/drivers/watchdog/hpwdt.c
> > @@ -162,7 +162,7 @@ static int hpwdt_pretimeout(unsigned int ulReason, 
> > struct pt_regs *regs)
> > if (ilo5 && ulReason == NMI_UNKNOWN && !mynmi)
> > return NMI_DONE;
> > -   if (ilo5 && !pretimeout)
> > +   if (ilo5 && !pretimeout && !(mynmi & 0x4))
> > return NMI_DONE;
> > hpwdt_stop();
> > 

-- 

-
Jerry Hoemann  Software Engineer   Hewlett Packard Enterprise
-


Re: [PATCH 2/4] watchdog: hpwdt: Claim NMI from iLO

2018-08-08 Thread Jerry Hoemann
On Sat, Aug 04, 2018 at 06:09:05PM -0700, Guenter Roeck wrote:
> On 08/02/2018 02:15 PM, Jerry Hoemann wrote:
> > The hwpdt driver is overloaded for handling both the iLO
> > watchdog and the explicit "Generate NMI to System" virutal
> > button.
> > 
> > Claim the iLO NMI virtual button even if we are not claiming
> > the iLO watchdog pretimeout.
> > 
> > Signed-off-by: Jerry Hoemann 
> 
> Guess you know what you are doing here.
> 
> Reviewed-by: Guenter Roeck 

Unfortunately the underlying documentation isn't publically available.
I am going loosen the check in version two, but current upstream
is definitely wrong for reasons above.

> 
> > ---
> >   drivers/watchdog/hpwdt.c | 2 +-
> >   1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/drivers/watchdog/hpwdt.c b/drivers/watchdog/hpwdt.c
> > index 369022d..8a85ddd 100644
> > --- a/drivers/watchdog/hpwdt.c
> > +++ b/drivers/watchdog/hpwdt.c
> > @@ -162,7 +162,7 @@ static int hpwdt_pretimeout(unsigned int ulReason, 
> > struct pt_regs *regs)
> > if (ilo5 && ulReason == NMI_UNKNOWN && !mynmi)
> > return NMI_DONE;
> > -   if (ilo5 && !pretimeout)
> > +   if (ilo5 && !pretimeout && !(mynmi & 0x4))
> > return NMI_DONE;
> > hpwdt_stop();
> > 

-- 

-
Jerry Hoemann  Software Engineer   Hewlett Packard Enterprise
-


Re: [PATCH 2/4] watchdog: hpwdt: Claim NMI from iLO

2018-08-04 Thread Guenter Roeck

On 08/02/2018 02:15 PM, Jerry Hoemann wrote:

The hwpdt driver is overloaded for handling both the iLO
watchdog and the explicit "Generate NMI to System" virutal
button.

Claim the iLO NMI virtual button even if we are not claiming
the iLO watchdog pretimeout.

Signed-off-by: Jerry Hoemann 


Guess you know what you are doing here.

Reviewed-by: Guenter Roeck 


---
  drivers/watchdog/hpwdt.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/watchdog/hpwdt.c b/drivers/watchdog/hpwdt.c
index 369022d..8a85ddd 100644
--- a/drivers/watchdog/hpwdt.c
+++ b/drivers/watchdog/hpwdt.c
@@ -162,7 +162,7 @@ static int hpwdt_pretimeout(unsigned int ulReason, struct 
pt_regs *regs)
if (ilo5 && ulReason == NMI_UNKNOWN && !mynmi)
return NMI_DONE;
  
-	if (ilo5 && !pretimeout)

+   if (ilo5 && !pretimeout && !(mynmi & 0x4))
return NMI_DONE;
  
  	hpwdt_stop();






Re: [PATCH 2/4] watchdog: hpwdt: Claim NMI from iLO

2018-08-04 Thread Guenter Roeck

On 08/02/2018 02:15 PM, Jerry Hoemann wrote:

The hwpdt driver is overloaded for handling both the iLO
watchdog and the explicit "Generate NMI to System" virutal
button.

Claim the iLO NMI virtual button even if we are not claiming
the iLO watchdog pretimeout.

Signed-off-by: Jerry Hoemann 


Guess you know what you are doing here.

Reviewed-by: Guenter Roeck 


---
  drivers/watchdog/hpwdt.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/watchdog/hpwdt.c b/drivers/watchdog/hpwdt.c
index 369022d..8a85ddd 100644
--- a/drivers/watchdog/hpwdt.c
+++ b/drivers/watchdog/hpwdt.c
@@ -162,7 +162,7 @@ static int hpwdt_pretimeout(unsigned int ulReason, struct 
pt_regs *regs)
if (ilo5 && ulReason == NMI_UNKNOWN && !mynmi)
return NMI_DONE;
  
-	if (ilo5 && !pretimeout)

+   if (ilo5 && !pretimeout && !(mynmi & 0x4))
return NMI_DONE;
  
  	hpwdt_stop();






[PATCH 2/4] watchdog: hpwdt: Claim NMI from iLO

2018-08-02 Thread Jerry Hoemann
The hwpdt driver is overloaded for handling both the iLO
watchdog and the explicit "Generate NMI to System" virutal
button.

Claim the iLO NMI virtual button even if we are not claiming
the iLO watchdog pretimeout.

Signed-off-by: Jerry Hoemann 
---
 drivers/watchdog/hpwdt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/watchdog/hpwdt.c b/drivers/watchdog/hpwdt.c
index 369022d..8a85ddd 100644
--- a/drivers/watchdog/hpwdt.c
+++ b/drivers/watchdog/hpwdt.c
@@ -162,7 +162,7 @@ static int hpwdt_pretimeout(unsigned int ulReason, struct 
pt_regs *regs)
if (ilo5 && ulReason == NMI_UNKNOWN && !mynmi)
return NMI_DONE;
 
-   if (ilo5 && !pretimeout)
+   if (ilo5 && !pretimeout && !(mynmi & 0x4))
return NMI_DONE;
 
hpwdt_stop();
-- 
1.8.3.1



[PATCH 2/4] watchdog: hpwdt: Claim NMI from iLO

2018-08-02 Thread Jerry Hoemann
The hwpdt driver is overloaded for handling both the iLO
watchdog and the explicit "Generate NMI to System" virutal
button.

Claim the iLO NMI virtual button even if we are not claiming
the iLO watchdog pretimeout.

Signed-off-by: Jerry Hoemann 
---
 drivers/watchdog/hpwdt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/watchdog/hpwdt.c b/drivers/watchdog/hpwdt.c
index 369022d..8a85ddd 100644
--- a/drivers/watchdog/hpwdt.c
+++ b/drivers/watchdog/hpwdt.c
@@ -162,7 +162,7 @@ static int hpwdt_pretimeout(unsigned int ulReason, struct 
pt_regs *regs)
if (ilo5 && ulReason == NMI_UNKNOWN && !mynmi)
return NMI_DONE;
 
-   if (ilo5 && !pretimeout)
+   if (ilo5 && !pretimeout && !(mynmi & 0x4))
return NMI_DONE;
 
hpwdt_stop();
-- 
1.8.3.1