[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1338288752.11518.166.camel@shinybook.infradead.org>
Date: Tue, 29 May 2012 11:52:32 +0100
From: David Woodhouse <dwmw2@...radead.org>
To: Christian Dietrich
<christian.dietrich@...ormatik.uni-erlangen.de>,
linux-arm-kernel@...ts.infradead.org
Cc: Artem Bityutskiy <dedekind1@...il.com>,
Arnd Bergmann <arnd@...db.de>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Jaroslav Kysela <perex@...ex.cz>, Takashi Iwai <tiwai@...e.de>,
Dmitry Eremin-Solenikov <dbaryshkov@...il.com>,
David Howells <dhowells@...hat.com>,
linux-kernel@...r.kernel.org, linux-mtd@...ts.infradead.org,
alsa-devel@...a-project.org, vamos-dev@...ts.cs.fau.de
Subject: Re: [PATCH] netwinder: nw_gpio_lock is a raw_spinlock_t
On Tue, 2012-05-29 at 12:06 +0200, Christian Dietrich wrote:
> --- a/drivers/char/ds1620.c
> +++ b/drivers/char/ds1620.c
> @@ -74,21 +74,21 @@ static inline void netwinder_ds1620_reset(void)
>
> static inline void netwinder_lock(unsigned long *flags)
> {
> - spin_lock_irqsave(&nw_gpio_lock, *flags);
> + raw_spin_lock_irqsave(&nw_gpio_lock, *flags);
> }
>
> static inline void netwinder_unlock(unsigned long *flags)
> {
> - spin_unlock_irqrestore(&nw_gpio_lock, *flags);
> + raw_spin_unlock_irqrestore(&nw_gpio_lock, *flags);
> }
If you were to make these functions public by shifting them into
arch/arm/mach-footbridge/include/mach/hardware.h that would be a lot
nicer, and other places wouldn't have to touch the raw spinlock
directly.
Also... while we're thinking about preemption and netwinder, note that
the write enable is valid for only 2ms or so. So all the functions in
dc21285.c that you just touched should probably *also* be disabling
preemption when they're run on a netwinder, to ensure that that time
doesn't expire before they actually get to run.
--
dwmw2
Download attachment "smime.p7s" of type "application/x-pkcs7-signature" (6171 bytes)
Powered by blists - more mailing lists