linux-mips
[Top] [All Lists]

Re: [PATCH] Add support for SB1 hardware watchdog.

To: Andrew Sharp <andy.sharp@onstor.com>
Subject: Re: [PATCH] Add support for SB1 hardware watchdog.
From: Alan Cox <alan@lxorguk.ukuu.org.uk>
Date: Mon, 3 Dec 2007 18:34:19 +0000
Cc: linux-mips@linux-mips.org, Ralf Baechle <ralf@linux-mips.org>, akpm@linux-foundation.org, wim@iguana.be
In-reply-to: <20071203181658.GA26631@onstor.com>
Organization: Red Hat UK Cyf., Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SL4 1TE, Y Deyrnas Gyfunol. Cofrestrwyd yng Nghymru a Lloegr o'r rhif cofrestru 3798903
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <20071203181658.GA26631@onstor.com>
Sender: linux-mips-bounce@linux-mips.org
> +       on such processors; this driver supports only the first one,
> +       because currently Linux only supports exporting one watchdog
> +       to userspace.

Yep. Perhaps that should change.

> + * wdog is the iomem address of the cfg register
> + */
> + void
> +sbwdog_set(char __iomem *wdog, unsigned long t)
> +{
> +     __raw_writeb(0, wdog - 0x10);
> +     __raw_writeq(t & 0x7fffffUL, wdog);
> +}

What guarantees you don't get a pair of these calls at once or
interleaving ?



> +              * return the bits from the config register
> +              */
> +             ret = put_user(__raw_readb(user_dog), p);

Should return the translated status bits ?



Alan

<Prev in Thread] Current Thread [Next in Thread>