Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752678AbbKYUO5 (ORCPT ); Wed, 25 Nov 2015 15:14:57 -0500 Received: from arrakis.dune.hu ([78.24.191.176]:52183 "EHLO arrakis.dune.hu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751671AbbKYUOo (ORCPT ); Wed, 25 Nov 2015 15:14:44 -0500 MIME-Version: 1.0 In-Reply-To: <20151124182138.GB12289@roeck-us.net> References: <5650BFD6.5030700@simon.arlott.org.uk> <5650C08C.6090300@simon.arlott.org.uk> <5650E2FA.6090408@roeck-us.net> <5650E5BB.6020404@simon.arlott.org.uk> <56512937.6030903@roeck-us.net> <5651CB13.4090704@simon.arlott.org.uk> <5651CB9C.4090005@simon.arlott.org.uk> <20151124182138.GB12289@roeck-us.net> From: Jonas Gorski Date: Wed, 25 Nov 2015 21:14:13 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 4/10] watchdog: bcm63xx_wdt: Handle hardware interrupt and remove software timer To: Guenter Roeck Cc: Simon Arlott , Florian Fainelli , "devicetree@vger.kernel.org" , Ralf Baechle , Thomas Gleixner , Jason Cooper , Marc Zyngier , Kevin Cernekee , Wim Van Sebroeck , Maxime Bizon , Linux Kernel Mailing List , MIPS Mailing List , linux-watchdog@vger.kernel.org, Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1744 Lines: 39 On Tue, Nov 24, 2015 at 7:21 PM, Guenter Roeck wrote: > On Sun, Nov 22, 2015 at 02:05:16PM +0000, Simon Arlott wrote: >> There is a level triggered interrupt for the watchdog timer as part of >> the bcm63xx_timer device. The interrupt occurs when the hardware watchdog >> timer reaches 50% of the remaining time. >> >> It is not possible to mask the interrupt within the bcm63xx_timer device. >> To get around this limitation, handle the interrupt by restarting the >> watchdog with the current remaining time (which will be half the previous >> timeout) so that the interrupt occurs again at 1/4th, 1/8th, etc. of the >> original timeout value until the watchdog forces a reboot. >> >> The software timer was restarting the hardware watchdog with a 85 second >> timeout until the software timer expired, and then causing a panic() >> about 42.5 seconds later when the hardware interrupt occurred. The >> hardware watchdog would not reboot until a further 42.5 seconds had >> passed. >> >> Remove the software timer and rely on the hardware timer directly, >> reducing the maximum timeout from 256 seconds to 85 seconds >> (2^32 / WDT_HZ). >> > > Florian, > > can you have a look into this patch and confirm that there is no better > way to clear the interrupt status ? While the watchdog interrupt can't be masked, it should be able to be cleared by writing 1 to the appropriate bit in the timer block's interrupt status register. At least the broadcom sources do so. Jonas -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/