From patchwork Thu May 24 00:13:32 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: William Kennington X-Patchwork-Id: 919468 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 40rqgZ01msz9s1B for ; Thu, 24 May 2018 10:16:42 +1000 (AEST) Authentication-Results: ozlabs.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=google.com header.i=@google.com header.b="odSbfUuN"; dkim-atps=neutral Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 40rqgY57VJzF1Hf for ; Thu, 24 May 2018 10:16:41 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=google.com header.i=@google.com header.b="odSbfUuN"; dkim-atps=neutral X-Original-To: skiboot@lists.ozlabs.org Delivered-To: skiboot@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=flex--wak.bounces.google.com (client-ip=2607:f8b0:4001:c06::24a; helo=mail-io0-x24a.google.com; envelope-from=32wmgwwmkb9gq4eaiiaf8.6igmec5iinfcmnm.itf45m.ila@flex--wak.bounces.google.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=google.com header.i=@google.com header.b="odSbfUuN"; dkim-atps=neutral Received: from mail-io0-x24a.google.com (mail-io0-x24a.google.com [IPv6:2607:f8b0:4001:c06::24a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 40rqd02rTvzF1HG for ; Thu, 24 May 2018 10:14:21 +1000 (AEST) Received: by mail-io0-x24a.google.com with SMTP id q8-v6so154342ioh.7 for ; Wed, 23 May 2018 17:14:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:date:in-reply-to:message-id:references:subject:from:to :cc; bh=lOaYJGn9fGwibGzjhV8qKcUhB9cd6iV7iRVxzZHg8Ug=; b=odSbfUuNioktTEtm3hCCG9O4fUzeE29niqTcn8Rk7OFP4Z+iHIGA6o8NVkq82uIpxm qczRDHXoU8cVLcLWCZXItx0U3X9xrUJgsv0DUQEgcQVO9RMJwtdpYjy+IOXgx3EgwDhO vuUOGP3+4AP9+9cPs+ROz14RLOYVo3qrYeXc2np8ZndfvA2BtagAGdqE+5QKVk+fOpzu 3o5GkdhWvuJcEL9l5LT9xdbcXZGVH4f1wL0ApHx0aGiEGju4et8nuWDc9jfnBhS/xAy1 BnVdTRSoPm7BZPYmD9UT328SqvSff7hUFfgzbrPqWn22V+yU8GBzt9yZ2GBJq/WhGqji 4r4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:date:in-reply-to:message-id :references:subject:from:to:cc; bh=lOaYJGn9fGwibGzjhV8qKcUhB9cd6iV7iRVxzZHg8Ug=; b=NkMu4QFMCaD8KACv/AMFPcfiHcb/NEovR4H/5tj+R7QCpnY8oIkV+y/ZV4dESpAYIS eKwukwWZalat7+L5MjYdIP+ZduB3hKue56RB89yCN5N3S2P3qkzwq9fFZdQJjFsD4XkW Az3IavUMDE0oPy3vu5rdl8yMU7msAv+5iGr93ErrXKdWBly6aSLRQIHb49/S1QZn2TUg XiQVf0dq1PMGpYXTgq4sgig3gdG2wmi/3hKpTuGrnY4dktmabX/EAgDiQ2bKy4dU4OqL /rMn7mQMQwjefh2EUV+SDMWJrlXURUeaKg3SsUKAAFUAodx72T/zaMeDT0EHqouCmfUG Q2mA== X-Gm-Message-State: ALKqPwd3Him0oDyHHtZGozYCnt9xWdQ32pltUFYhHVGN81gGpzFcaHUJ tCfk1Kv981ghNQZ0aysfAcR7dQVYKVz4QVdAGPC75VAa0eds7wH8eabT3avjXOU3m6He+A6byV3 orhdh8cogeg3TwA0AJixRT6YF8GmhXNBPuOlpJFpWedgPt9wazbcKtGcC X-Google-Smtp-Source: AB8JxZrqEqfPcLh1aDIYcBSMwF/yCmbA+4al71XYp2B4GM3X1Sip6ajHe9gEPAvhkFTrbnR+1qvHi30= MIME-Version: 1.0 X-Received: by 2002:a24:f90b:: with SMTP id l11-v6mr3536816ith.53.1527120859168; Wed, 23 May 2018 17:14:19 -0700 (PDT) Date: Wed, 23 May 2018 17:13:32 -0700 In-Reply-To: <20180524001335.15457-1-wak@google.com> Message-Id: <20180524001335.15457-7-wak@google.com> References: <20180524001335.15457-1-wak@google.com> X-Mailer: git-send-email 2.17.0 From: "William A. Kennington III" To: skiboot@lists.ozlabs.org, alistair@popple.id.au, jk@ozlabs.org Subject: [Skiboot] [PATCH 6/9] ipmi-watchdog: The stop action should disable reset X-BeenThere: skiboot@lists.ozlabs.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: Mailing list for skiboot development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Skiboot" Otherwise it is possible for the reset timer to elapse and trigger the watchdog to wake back up. This doesn't affect the behavior of the system since we are providing a NONE action to the BMC. However we would like to avoid the action from taking place if possible. Signed-off-by: William A. Kennington III --- hw/ipmi/ipmi-watchdog.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/hw/ipmi/ipmi-watchdog.c b/hw/ipmi/ipmi-watchdog.c index fc559c6da..6f2ac4abf 100644 --- a/hw/ipmi/ipmi-watchdog.c +++ b/hw/ipmi/ipmi-watchdog.c @@ -115,6 +115,15 @@ static void reset_wdt(struct timer *t __unused, void *data __unused, void ipmi_wdt_stop(void) { if (!wdt_stopped) { + /* Make sure the background reset timer is disabled before + * stopping the watchdog. If we issue a reset after disabling + * the timer, it will be re-enabled. */ + wdt_ticking = false; + cancel_timer(&wdt_timer); + + /* Configure the watchdog to be disabled and do no action + * in case the underlying implementation is buggy and times + * out anyway. */ wdt_stopped = true; set_wdt(WDT_NO_ACTION, 100, 0, false); }