From patchwork Fri Jun 18 19:50:31 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Grzegorz Jaszczyk X-Patchwork-Id: 12332111 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-11.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8D58EC48BE8 for ; Fri, 18 Jun 2021 19:53:15 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4DB5161284 for ; Fri, 18 Jun 2021 19:53:15 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4DB5161284 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=W0P9jGHi2y+PoFPkLXJE8Mvae/+QdQXJV34rFhH/wF0=; b=zl3edF01OGzfkZ hPs49AaGmT7CwmWSBbaFQQ+U/+CBR7u3f+1NqC2PeGorvVzrtasV4voXMlInkgvJWprzs23P8evZs R9KobU4qWIWtM5hOjkhfjYmaU+v4pJF29Ruq7bzzjfiFhpkdQkkBI8bduc/c4o4MMnSIuQZQdVXm8 VP51PWygNJgAhAFfndSgPJqydZsxV+mMPSN2GfETu4FCcAj0Ni93pMFd8IzsKT21ckF7nGGp1D/wd JGXVStz7+pAhKPTPnE9JgX3sRB1oH1faBdejPUXoLjcMUct+kFPKEKRouL3ecVjwatPpTbJzzaU6F ZXnhxYIMxGsL5pWfY8Rw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1luKWC-00FN18-2K; Fri, 18 Jun 2021 19:51:08 +0000 Received: from mail-lf1-x133.google.com ([2a00:1450:4864:20::133]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1luKW5-00FMyz-9O for linux-arm-kernel@lists.infradead.org; Fri, 18 Jun 2021 19:51:05 +0000 Received: by mail-lf1-x133.google.com with SMTP id p7so18381552lfg.4 for ; Fri, 18 Jun 2021 12:51:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=CPNUC1INpkBGp7L0c6yR9HA1R8pzzjkYXv1R+/dnXdc=; b=JbpUejWIGvdWnGdaScvOssgSjlQOm6+oUTSDMXhPVQU17pxE44HrVju0YelRoaFNhI j63avYLtLaX7KWvuQNZZ40b4KqNxCl8kLOCGy5dnSL3ukn0FvO6D1xQYhDXtwS4x/Iyl uqeoUquKOq1oEsEBOVVL1/DMrMnrozFtlAZU9IsxEHSQycwtRdaYDaPwMjAiRnwwCrEj lLe6Xsf0uvNluuIP0veR3+Dka65ddrYNIFUAZ/qw5zyM5rc7MFQaB2UB0iyd6h/4eWI1 Dyyn18WMyPfrSeHIMlhOzEnQrbbYog2eyq36FGpxY2cW1GRBbHSeUyNZP49WR3IT3W6q G+VA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=CPNUC1INpkBGp7L0c6yR9HA1R8pzzjkYXv1R+/dnXdc=; b=jqkNvB8A2qQ5Mvvo8KSEXycPrNcHqI8LFcbju6I/EHhSWq9a9mzyySSv/R8AoXFr2z 4GqIrETrwxqDtyUuOSz8Q+IbUlAzxc7FAdSFOD/hEs9Q7+ps0GuJEWkYqktbk8BAs7mg F7Zs19FU3btYEm6ONlLbxQsOIpJlUo+eEDoiwYIA9uM5bXVHmvNIA13GqeVpEX62kXJP Qs0qCoqA3eZN2o1rWrYEFJpLzlWKTy+1d8807U3/Mz1Qf55cr4pJx4vg0ZqlcWMwcc+u Cv48wKl6NY6zKTT9ybqxW+KenocJzxlhpYC5lwmh+gUHB0QX/d+yQGIQsD+vmVR41IJ2 qc3g== X-Gm-Message-State: AOAM533XxNFl99jtW8kekeiCe8NVJPO5p8J6rFeCpaAFvN/d/QBbfbhO zwAQQwbunRxhMRFR/mOMgsXrEw== X-Google-Smtp-Source: ABdhPJwSCScqwnEQQilC7ZOKJUU/HzRiR2R7hdC02vTd9iU32d4X7neASyXaR24rQhCDirfjQi57qQ== X-Received: by 2002:a05:6512:3da5:: with SMTP id k37mr4585528lfv.181.1624045858969; Fri, 18 Jun 2021 12:50:58 -0700 (PDT) Received: from gilgamesh.lab.semihalf.net ([83.142.187.85]) by smtp.gmail.com with ESMTPSA id o7sm993221lfu.215.2021.06.18.12.50.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 18 Jun 2021 12:50:58 -0700 (PDT) From: Grzegorz Jaszczyk To: wim@linux-watchdog.org, linux@roeck-us.net, shawnguo@kernel.org Cc: linux-watchdog@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, grzegorz.jaszczyk@linaro.org Subject: [PATCH v2 0/2] introduce watchdog_dev_suspend/resume Date: Fri, 18 Jun 2021 21:50:31 +0200 Message-Id: <20210618195033.3209598-1-grzegorz.jaszczyk@linaro.org> X-Mailer: git-send-email 2.29.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210618_125101_441600_CE1A3A9D X-CRM114-Status: GOOD ( 10.55 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi All, The following is a v2 version of the series [1] that fixes system hang which occurs when the ping worker fires after wdog suspend and before wdog resume. This happens because the ping worker can issue low-level ping while the wdog clk was disabled by the suspend routine (accessing hw wdog registers while they are not fed by the clk). To overcome this issue two patches were introduced. Patch #1 introduces pm notifier in the watchdog core which will call watchdog_dev_suspend/resume and actually cancel ping worker during suspend and restore it back, if needed, during resume. Patch #2 introduces relevant changes to imx2_wdt driver and notifies wdog core to stop ping worker on suspend. [1] https://lkml.org/lkml/2021/6/15/542 Best regards, Grzegorz Grzegorz Jaszczyk (2): watchdog: introduce watchdog_dev_suspend/resume watchdog: imx2_wdg: notify wdog core to stop ping worker on suspend drivers/watchdog/imx2_wdt.c | 1 + drivers/watchdog/watchdog_core.c | 37 +++++++++++++++++++++++++ drivers/watchdog/watchdog_dev.c | 47 ++++++++++++++++++++++++++++++++ include/linux/watchdog.h | 10 +++++++ 4 files changed, 95 insertions(+)