From mboxrd@z Thu Jan 1 00:00:00 1970 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=-2.5 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_PASS, USER_AGENT_MUTT 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 3FBBDC43381 for ; Tue, 5 Mar 2019 00:57:41 +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 0F60E206B6 for ; Tue, 5 Mar 2019 00:57:40 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="NLPi/32G"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b="xiGEiKkm" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0F60E206B6 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=lunn.ch Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-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.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=JxZ6QlfFFGdWNEBC/zj2GJPQHsKXJSz+k3qib45s4UQ=; b=NLPi/32GE4lpj2 fWbufNGpoFSp3UwDLkVnCm7LvzXv/A8lRn0B6fzivMjoXpOtt4GxijL+GWjrqXYF72O5iQwPmXeNz LzXDf2AMKXy8jp2RT7F2Y0hNJuM95QE+sryIct+U08YRbMWYtOsisaK2Ew5IzJWIQvcdPrSfkNQXG VX3jobpQOna+7Cgs+0kRPA8MXakNbgXQdNE4ddPs4FFgv91mp3s3q2ti5x+bDgmXRCicg6lM+72Cc 6VJukJTB+CuBc79JZUTZ/GTMZckgz3LEPL7tu1Vt5R8njUIuHpPxglsm33GZp5N7NcsOvIW3Fe/Nh cyaEgdYab9Aj5nH90RGw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1h0yOi-0000H9-4e; Tue, 05 Mar 2019 00:57:32 +0000 Received: from vps0.lunn.ch ([185.16.172.187]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1h0yOe-0000Gl-DL for linux-arm-kernel@lists.infradead.org; Tue, 05 Mar 2019 00:57:30 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=9/HkbvfsZhsGC83D/DHLkvbKCUxRfZZgJRuKR+Q595U=; b=xiGEiKkmcdAcBBb2VB++MWBpyW dX0NJP73TjZoiUj/Rlot82LN35fMhqajszUfU9+9JcscN/ylzX9sweGt4eIBt7oUM6Zf1Ch85hrUF xlYW9md5tKvw3isq4E2o0xWeR22adTuoOLjge+97eFVINE49U96WmO7p0Nlf0AGcljEI=; Received: from andrew by vps0.lunn.ch with local (Exim 4.89) (envelope-from ) id 1h0yOM-00024T-37; Tue, 05 Mar 2019 01:57:10 +0100 Date: Tue, 5 Mar 2019 01:57:10 +0100 From: Andrew Lunn To: Chris Packham Subject: Re: [PATCH 2/2] watchdog: orion_wdt: use timer1 as a pretimeout Message-ID: <20190305005710.GL26378@lunn.ch> References: <20190227230707.GA28635@roeck-us.net> <20190304225152.26831-1-chris.packham@alliedtelesis.co.nz> <20190304225152.26831-3-chris.packham@alliedtelesis.co.nz> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20190304225152.26831-3-chris.packham@alliedtelesis.co.nz> User-Agent: Mutt/1.5.23 (2014-03-12) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190304_165728_604488_2030DA16 X-CRM114-Status: GOOD ( 16.21 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , devicetree@vger.kernel.org, Wim Van Sebroeck , jason@lakedaemon.net, gregory.clement@bootlin.com, linux-kernel@vger.kernel.org, Rob Herring , linux@roeck-us.net, Sebastian Hesselbarth , linux-arm-kernel@lists.infradead.org, linux-watchdog@vger.kernel.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue, Mar 05, 2019 at 11:51:52AM +1300, Chris Packham wrote: > The orion watchdog can either reset the CPU or generate an interrupt. > The interrupt would be useful for debugging as it provides panic() > output about the watchdog expiry, however if the interrupt is used the > watchdog can't reset the CPU in the event of being stuck in a loop with > interrupts disabled or if the CPU is prevented from accessing memory > (e.g. an unterminated DMA). > > All of the orion based CPU cores (at least back as far as Kirkwood) have > spare timers that aren't currently used by the Linux kernel. We can use > timer1 to provide a pre-timeout ahead of the watchdog timer and provide > the possibility of gathering debug before the reset triggers. Hi Chris I had a quick look at other drivers implementing pre-timeout. They seem to call watchdog_notify_pretimeout(). I don't see that here? What happens when timer1 fires? > @@ -169,38 +174,46 @@ static int armadaxp_wdt_clock_init(struct platform_device *pdev, > } > > /* Enable the fixed watchdog clock input */ > - atomic_io_modify(dev->reg + TIMER_CTRL, > - WDT_AXP_FIXED_ENABLE_BIT, > - WDT_AXP_FIXED_ENABLE_BIT); > + val = WDT_AXP_FIXED_ENABLE_BIT | TIMER1_FIXED_ENABLE_BIT; > + atomic_io_modify(dev->reg + TIMER_CTRL, val, val); > > dev->clk_rate = clk_get_rate(dev->clk); > + > + One blank line is sufficient, > return 0; > } Andrew _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel