From: Alan Cox <alan@lxorguk.ukuu.org.uk>
To: Wim Van Sebroeck <wim@iguana.be>
Cc: Andrew Morton <akpm@linux-foundation.org>,
LKML <linux-kernel@vger.kernel.org>,
Samuel Tardieu <sam@rfc1149.net>,
Mike Frysinger <vapier.adi@gmail.com>,
Mingarelli@infomag.iguana.be, Thomas <Thomas.Mingarelli@hp.com>,
Jordan Crouse <jordan.crouse@amd.com>,
Chen Gong <g.chen@freescale.com>,
Gabriel C <nix.or.die@googlemail.com>
Subject: Re: [WATCHDOG] v2.6.26-rc3 patches
Date: Sun, 25 May 2008 11:08:12 +0100 [thread overview]
Message-ID: <20080525110812.3a05e9fa@core> (raw)
In-Reply-To: <20080525100944.GA4084@infomag.infomag.iguana.be>
> +
> +static void geodewdt_ping(void)
> +{
> + /* Stop the counter */
> + geode_mfgpt_write(wdt_timer, MFGPT_REG_SETUP, 0);
> +
> + /* Reset the counter */
> + geode_mfgpt_write(wdt_timer, MFGPT_REG_COUNTER, 0);
> +
> + /* Enable the counter */
> + geode_mfgpt_write(wdt_timer, MFGPT_REG_SETUP, MFGPT_SETUP_CNTEN);
> +}
> +
> +static void geodewdt_disable(void)
> +{
> + geode_mfgpt_write(wdt_timer, MFGPT_REG_SETUP, 0);
> + geode_mfgpt_write(wdt_timer, MFGPT_REG_COUNTER, 0);
> +}
> +
> +static int geodewdt_set_heartbeat(int val)
> +{
> + if (val < 1 || val > GEODEWDT_MAX_SECONDS)
> + return -EINVAL;
> +
> + geode_mfgpt_write(wdt_timer, MFGPT_REG_SETUP, 0);
> + geode_mfgpt_write(wdt_timer, MFGPT_REG_CMP2, val * GEODEWDT_HZ);
> + geode_mfgpt_write(wdt_timer, MFGPT_REG_COUNTER, 0);
> + geode_mfgpt_write(wdt_timer, MFGPT_REG_SETUP, MFGPT_SETUP_CNTEN);
> +
> + timeout = val;
> + return 0;
> +}
> +
There is no locking in geodewdt - so all those routines can end up being
run together. Not sure it is a problem just noting it while reviewing.
next prev parent reply other threads:[~2008-05-25 10:23 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-25 10:09 [WATCHDOG] v2.6.26-rc3 patches Wim Van Sebroeck
2008-05-25 10:08 ` Alan Cox [this message]
2008-05-25 17:05 ` Wim Van Sebroeck
2008-05-30 15:02 ` [patch] drivers/watchdog/geodewdt.c: build fix Ingo Molnar
2008-05-30 15:39 ` Jordan Crouse
2008-05-30 15:54 ` David Brigada
2008-05-30 16:05 ` Jordan Crouse
2008-05-30 16:24 ` Lennart Sorensen
2008-05-30 16:48 ` Jordan Crouse
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=20080525110812.3a05e9fa@core \
--to=alan@lxorguk.ukuu.org.uk \
--cc=Mingarelli@infomag.iguana.be \
--cc=Thomas.Mingarelli@hp.com \
--cc=akpm@linux-foundation.org \
--cc=g.chen@freescale.com \
--cc=jordan.crouse@amd.com \
--cc=linux-kernel@vger.kernel.org \
--cc=nix.or.die@googlemail.com \
--cc=sam@rfc1149.net \
--cc=vapier.adi@gmail.com \
--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