All of lore.kernel.org
 help / color / mirror / Atom feed
From: Robert Jarzmik <robert.jarzmik@free.fr>
To: Linux mtd <linux-mtd@lists.infradead.org>
Subject: MTD API locking and concurrency
Date: Tue, 13 Mar 2012 06:45:24 +0100	[thread overview]
Message-ID: <87obs1rr4b.fsf@free.fr> (raw)

Hi,

I came across a concurrent usage of my MTD driver by UBIFS by doing
an IOC_UBI_UPVOL. As my chip doesn't support multiple requests at a time, I need
to protect the access to chip registers.

I wonder if mtd api function can be called in interrupt context. My wish would
be to use mutexes, but I have to be sure there is no interrupt path I have not
seen. The only thing I'm certain is that my MTD drivers doesn't handle
interrupts, so the interrupt won't come from him.

Is there a guarantee that mtd api functions are called with !in_interrupt() ?

Cheers.

-- 
Robert

             reply	other threads:[~2012-03-13  5:45 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-13  5:45 Robert Jarzmik [this message]
2012-03-13 12:41 ` MTD API locking and concurrency Artem Bityutskiy
2012-03-13 17:17 ` Mike Dunn

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=87obs1rr4b.fsf@free.fr \
    --to=robert.jarzmik@free.fr \
    --cc=linux-mtd@lists.infradead.org \
    /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.