lkml.org 
[lkml]   [2016]   [May]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH RFC] Watchdog: sbsa_gwdt: Enhance timeout range
From
Date
Pratyush Anand wrote:
> static irqreturn_t sbsa_gwdt_interrupt(int irq, void *dev_id)
> {
> + struct sbsa_gwdt *gwdt = (struct sbsa_gwdt *)dev_id;
> + struct watchdog_device *wdd = &gwdt->wdd;
> + u64 timeout = (u64)gwdt->clk * wdd->timeout;
> +
> + writeq(timeout + arch_counter_get_cntvct(),
> + gwdt->control_base + SBSA_GWDT_WCV);
> +
> panic(WATCHDOG_NAME " timeout");

I'm on the fence about this.

On one hand, I have always opposed the idea that the interrupt handler
needs to function properly in order for the timeout to be correct. Fu's
original patch required this for every timeout.

The current code, however, only uses the interrupt when action=1. In
this case, WCV is only reprogrammed in order to prevent the system from
resetting during the kexec. Technically, the watchdog timeout has
already been handled.

However, this should be unnecessary, because it can't be a problem
that's unique to the SBSA watchdog. Every system that kexecs another
kernel needs to be able to handle a watchdog timeout. Shouldn't the
kexec code already ping or disable the watchdog? We need a
cross-platform solution. Drivers should not need to do this.

--
Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the
Code Aurora Forum, hosted by The Linux Foundation.

\
 
 \ /
  Last update: 2016-05-04 16:41    [W:0.060 / U:0.420 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site