mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Woodhouse <dwmw2@infradead.org>
To: Christian Dietrich 
	<christian.dietrich@informatik.uni-erlangen.de>,
	linux-arm-kernel@lists.infradead.org
Cc: Artem Bityutskiy <dedekind1@gmail.com>,
	Arnd Bergmann <arnd@arndb.de>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.de>,
	Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>,
	David Howells <dhowells@redhat.com>,
	linux-kernel@vger.kernel.org, linux-mtd@lists.infradead.org,
	alsa-devel@alsa-project.org, vamos-dev@lists.cs.fau.de
Subject: Re: [PATCH] netwinder: nw_gpio_lock is a raw_spinlock_t
Date: Tue, 29 May 2012 11:52:32 +0100	[thread overview]
Message-ID: <1338288752.11518.166.camel@shinybook.infradead.org> (raw)
In-Reply-To: <20120529100619.GA23186@faui49q.informatik.uni-erlangen.de>

[-- Attachment #1: Type: text/plain, Size: 1143 bytes --]

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

[-- Attachment #2: smime.p7s --]
[-- Type: application/x-pkcs7-signature, Size: 6171 bytes --]

  parent reply	other threads:[~2012-05-29 10:52 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-25  8:28 [PATCH] mtd: dc21285.c: handle nw_gpio_lock correctly Christian Dietrich
2012-05-26 13:54 ` Artem Bityutskiy
2012-05-29 10:06 ` [PATCH] netwinder: nw_gpio_lock is a raw_spinlock_t Christian Dietrich
2012-05-29 10:11   ` David Woodhouse
2012-05-29 10:24     ` Artem Bityutskiy
2012-05-31 10:15     ` [PATCH] netwinder: encapsulate CPLD hardware locking and access Christian Dietrich
2012-05-31 12:31       ` David Woodhouse
2012-05-29 10:52   ` David Woodhouse [this message]
2012-05-29 10:06 ` [PATCH] mtd: dc21285.c: remove double check of CONFIG_ARCH_NETWINDER Christian Dietrich
2012-05-29 10:19   ` David Woodhouse

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=1338288752.11518.166.camel@shinybook.infradead.org \
    --to=dwmw2@infradead.org \
    --cc=alsa-devel@alsa-project.org \
    --cc=arnd@arndb.de \
    --cc=christian.dietrich@informatik.uni-erlangen.de \
    --cc=dbaryshkov@gmail.com \
    --cc=dedekind1@gmail.com \
    --cc=dhowells@redhat.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=perex@perex.cz \
    --cc=tiwai@suse.de \
    --cc=vamos-dev@lists.cs.fau.de \
    /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

Powered by JetHome