diff mbox series

[03/15] ipmi: Generate an interrupt on watchdog pretimeout expiry

Message ID 20190919213924.31852-4-minyard@acm.org (mailing list archive)
State New, archived
Headers show
Series [01/15] ipmi: Fix watchdog NMI handling | expand

Commit Message

Corey Minyard Sept. 19, 2019, 9:39 p.m. UTC
From: Corey Minyard <cminyard@mvista.com>

Add the watchdog pretimeout to the bits that cause an interrupt on attn.
Otherwise the user won't know.

Signed-off-by: Corey Minyard <cminyard@mvista.com>
---
 hw/ipmi/ipmi_bmc_sim.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Comments

Cédric Le Goater Sept. 23, 2019, 5:41 a.m. UTC | #1
On 19/09/2019 23:39, minyard@acm.org wrote:
> From: Corey Minyard <cminyard@mvista.com>
> 
> Add the watchdog pretimeout to the bits that cause an interrupt on attn.
> Otherwise the user won't know.
> 
> Signed-off-by: Corey Minyard <cminyard@mvista.com>

Reviewed-by: Cédric Le Goater <clg@kaod.org>

C.

> ---
>  hw/ipmi/ipmi_bmc_sim.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/hw/ipmi/ipmi_bmc_sim.c b/hw/ipmi/ipmi_bmc_sim.c
> index afb99e33d7..6e6cd1b47d 100644
> --- a/hw/ipmi/ipmi_bmc_sim.c
> +++ b/hw/ipmi/ipmi_bmc_sim.c
> @@ -477,7 +477,9 @@ static int attn_set(IPMIBmcSim *ibs)
>  
>  static int attn_irq_enabled(IPMIBmcSim *ibs)
>  {
> -    return (IPMI_BMC_MSG_INTS_ON(ibs) && IPMI_BMC_MSG_FLAG_RCV_MSG_QUEUE_SET(ibs))
> +    return (IPMI_BMC_MSG_INTS_ON(ibs) &&
> +            (IPMI_BMC_MSG_FLAG_RCV_MSG_QUEUE_SET(ibs) ||
> +             IPMI_BMC_MSG_FLAG_WATCHDOG_TIMEOUT_MASK_SET(ibs)))
>          || (IPMI_BMC_EVBUF_FULL_INT_ENABLED(ibs) &&
>              IPMI_BMC_MSG_FLAG_EVT_BUF_FULL_SET(ibs));
>  }
>
diff mbox series

Patch

diff --git a/hw/ipmi/ipmi_bmc_sim.c b/hw/ipmi/ipmi_bmc_sim.c
index afb99e33d7..6e6cd1b47d 100644
--- a/hw/ipmi/ipmi_bmc_sim.c
+++ b/hw/ipmi/ipmi_bmc_sim.c
@@ -477,7 +477,9 @@  static int attn_set(IPMIBmcSim *ibs)
 
 static int attn_irq_enabled(IPMIBmcSim *ibs)
 {
-    return (IPMI_BMC_MSG_INTS_ON(ibs) && IPMI_BMC_MSG_FLAG_RCV_MSG_QUEUE_SET(ibs))
+    return (IPMI_BMC_MSG_INTS_ON(ibs) &&
+            (IPMI_BMC_MSG_FLAG_RCV_MSG_QUEUE_SET(ibs) ||
+             IPMI_BMC_MSG_FLAG_WATCHDOG_TIMEOUT_MASK_SET(ibs)))
         || (IPMI_BMC_EVBUF_FULL_INT_ENABLED(ibs) &&
             IPMI_BMC_MSG_FLAG_EVT_BUF_FULL_SET(ibs));
 }