From: Mikael Pettersson <mikpe@it.uu.se>
To: David Brownell <david-b@pacbell.net>
Cc: "Leon Woestenberg" <leon.woestenberg@gmail.com>,
LAK <linux-arm-kernel@lists.arm.linux.org.uk>,
"Linux Kernel list" <linux-kernel@vger.kernel.org>
Subject: Re: Locking in the (now generic) GPIO infrastructure?
Date: Sat, 7 Jun 2008 13:52:00 +0200 [thread overview]
Message-ID: <18506.30304.646369.956267@alkaid.it.uu.se> (raw)
In-Reply-To: <200806060553.48057.david-b@pacbell.net>
David Brownell writes:
> On Wednesday 04 June 2008, Leon Woestenberg wrote:
> > include/asm-arm/arch-ixp4xx/platform.h:
> > static inline void gpio_line_set(u8 line, int value)
> > {
> > if (value == IXP4XX_GPIO_HIGH)
> > *IXP4XX_GPIO_GPOUTR |= (1 << line);
> > else if (value == IXP4XX_GPIO_LOW)
> > *IXP4XX_GPIO_GPOUTR &= ~(1 << line);
> > }
> >
> > Under a Linux kernel where multiple drivers are accessing GPIO, the
> > latter does not seem safe against preemption (assuming the memory
> > read-modify-write is not atomic).
> >
> > Shouldn't GPIO access be protected against concurrent access here?
>
> Well, against an IRQ in the middle of those read/modify/write
> sequences hidden by the "|=" and "&=" syntax. Last I knew,
> no XScale CPUs support on-chip SMP.
The IOP342 has two XScale cores on-chip. However, these cores are
still only ARMv5TE and Linux wants ARMv6 or newer for SMP, so I
don't know to what extent the IOP342 is supported by Linux.
prev parent reply other threads:[~2008-06-07 11:52 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-04 11:00 Leon Woestenberg
2008-06-06 8:52 ` Russell King - ARM Linux
2008-06-06 10:28 ` Ben Dooks
2008-06-06 12:53 ` David Brownell
2008-06-06 19:23 ` Leon Woestenberg
2008-06-06 20:13 ` David Brownell
2008-06-07 11:52 ` Mikael Pettersson [this message]
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=18506.30304.646369.956267@alkaid.it.uu.se \
--to=mikpe@it.uu.se \
--cc=david-b@pacbell.net \
--cc=leon.woestenberg@gmail.com \
--cc=linux-arm-kernel@lists.arm.linux.org.uk \
--cc=linux-kernel@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®