From: Alan Cox <alan@lxorguk.ukuu.org.uk>
To: Wim Van Sebroeck <wim@iguana.be>
Cc: Andrew Morton <akpm@osdl.org>, Linus Torvalds <torvalds@osdl.org>,
linux-kernel@vger.kernel.org
Subject: Re: [WATCHDOG] v2.6.18-rc3 patches
Date: Tue, 01 Aug 2006 23:28:35 +0100 [thread overview]
Message-ID: <1154471315.15540.104.camel@localhost.localdomain> (raw)
In-Reply-To: <20060801200931.GA3758@infomag.infomag.iguana.be>
Ar Maw, 2006-08-01 am 22:09 +0200, ysgrifennodd Wim Van Sebroeck:
> If there are problems with these patches, please let me know.
> If not I will sent them to Linus on sunday.
NAK
> +
> +static void wdt_enable(void)
Open, fork and write from both processes. This needs a semaphore
> +{
> + if (wdt_clk)
> + clk_set_rate(wdt_clk, 1);
> +
> + /* stop counter, initiate counter reset */
> + __raw_writel(RESET_COUNT, WDTIM_CTRL(wdt_base));
> + /*wait for reset to complete. 100% guarantee event */
> + while (__raw_readl(WDTIM_COUNTER(wdt_base)));
Should have cpu_relax() and really ought to have a timeout in case it
fails. In fact it needs one or a barrier as you are using __raw and that
may not reload if the compiler is overclever.
> +static void wdt_disable(void)
> +{
Ditto - open, fork write the close sequence in parallel on both ?
> + wdt_disable(); /*disable for now */
> + set_bit(WDT_DEVICE_INITED, &wdt_status);
> + }
Races an open occuring when misc_register is done and before we hit
wdt_disable.
prev parent reply other threads:[~2006-08-01 22:09 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-01 20:09 Wim Van Sebroeck
2006-08-01 22:28 ` Alan Cox [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1154471315.15540.104.camel@localhost.localdomain \
--to=alan@lxorguk.ukuu.org.uk \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@osdl.org \
--cc=wim@iguana.be \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®