From: Arnd Bergmann <arnd@arndb.de>
To: Nathan Lynch <ntl@pobox.com>
Cc: linuxppc64-dev@ozlabs.org, Paul Mackerras <paulus@samba.org>,
linux-kernel@vger.kernel.org, Anton Blanchard <anton@samba.org>,
Utz Bacher <utz.bacher@de.ibm.com>,
Wim Van Sebroeck <wim@iguana.be>
Subject: Re: [PATCH 3/8] ppc64: add a watchdog driver for rtas
Date: Wed, 18 May 2005 09:14:41 +0200 [thread overview]
Message-ID: <200505180914.44336.arnd@arndb.de> (raw)
In-Reply-To: <20050517204029.GA2748@otto>
On Dinsdag 17 Mai 2005 22:40, Nathan Lynch wrote:
> Arnd Bergmann wrote:
> > +static volatile int wdrtas_miscdev_open = 0;
> ...
> > +static int
> > +wdrtas_open(struct inode *inode, struct file *file)
> > +{
> > + /* only open once */
> > + if (xchg(&wdrtas_miscdev_open,1))
> > + return -EBUSY;
>
> The volatile and xchg strike me as an obscure method for ensuring only
> one process at a time can open this file. Any reason a semaphore
> couldn't be used?
A semaphore would also be the wrong approach since we don't want
processes to block but instead to fail opening the watchdog twice.
Other watchdog drivers use atomic_t or bitops to guard open, which
imho would be the better solution.
Of course, there is also Wim's plan to do a unified watchdog driver
that would solve this once and for all.
> > + printk("wdrtas: got unexpected close. Watchdog "
> > + "not stopped.\n");
>
> printk's need a valid log level specified. There are several in this
> file that lack them.
Right.
Utz, do you have time to fix up these issues? If not, I probably won't
look into it this week either.
Thanks,
Arnd <><
next prev parent reply other threads:[~2005-05-18 7:31 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-05-13 19:31 [PATCH 0/8] ppc64: Introduce Cell/BPA platform, v2 Arnd Bergmann
2005-05-13 19:21 ` [PATCH 1/8] ppc64: split out generic rtas code from pSeries_pci.c Arnd Bergmann
2005-05-13 19:23 ` [PATCH 2/8] ppc64: add a minimal nvram driver Arnd Bergmann
2005-05-13 19:24 ` [PATCH 3/8] ppc64: add a watchdog driver for rtas Arnd Bergmann
2005-05-17 20:40 ` Nathan Lynch
2005-05-18 7:14 ` Arnd Bergmann [this message]
2005-05-18 14:45 ` Nathan Lynch
2005-05-18 14:39 ` Arnd Bergmann
2005-05-13 19:25 ` [PATCH 4/8] ppc64: add BPA platform type Arnd Bergmann
2005-05-17 7:01 ` Paul Mackerras
2005-05-17 11:05 ` Arnd Bergmann
2005-05-13 19:26 ` [PATCH 5/8] ppc64: Add driver for BPA interrupt controllers Arnd Bergmann
2005-05-13 19:27 ` [PATCH 6/8] ppc64: Add driver for BPA iommu Arnd Bergmann
2005-05-13 19:29 ` [PATCH 7/8] ppc64: SPU file system Arnd Bergmann
2005-05-13 23:31 ` Benjamin Herrenschmidt
2005-05-15 9:07 ` Pavel Machek
2005-05-15 12:02 ` Benjamin Herrenschmidt
2005-05-15 12:33 ` Arnd Bergmann
2005-05-14 7:45 ` Greg KH
2005-05-14 13:05 ` Arnd Bergmann
2005-05-15 6:29 ` Benjamin Herrenschmidt
2005-05-15 10:08 ` Arnd Bergmann
2005-05-15 11:50 ` Arnd Bergmann
2005-05-16 20:58 ` Greg KH
2005-05-16 22:01 ` Arnd Bergmann
2005-05-16 22:27 ` Greg KH
2005-05-16 22:22 ` Arnd Bergmann
2005-05-16 22:49 ` Greg KH
2005-05-15 11:24 ` Andi Kleen
2005-05-16 20:14 ` Roland Dreier
2005-05-16 20:53 ` Greg KH
2005-05-18 12:40 ` [PATCH] libfs: add simple attribute files Arnd Bergmann
2005-05-18 20:24 ` Greg KH
2005-05-19 8:29 ` Arnd Bergmann
2005-05-19 9:18 ` 2.4 Kernel threads linux
2005-06-10 4:33 ` [PATCH] libfs: add simple attribute files Greg KH
2005-05-13 19:32 ` [PATCH 8/8] ppc64: add spufs user library Arnd Bergmann
-- strict thread matches above, loose matches on Subject: below --
2005-06-02 23:33 [PATCH 3/8] ppc64: add a watchdog driver for rtas Utz Bacher
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=200505180914.44336.arnd@arndb.de \
--to=arnd@arndb.de \
--cc=anton@samba.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc64-dev@ozlabs.org \
--cc=ntl@pobox.com \
--cc=paulus@samba.org \
--cc=utz.bacher@de.ibm.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.