linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/3] Introduce atomic MMIO register clear-set
@ 2013-08-20 16:48 Ezequiel Garcia
  2013-08-20 16:48 ` [PATCH v2 1/3] ARM: Introduce atomic MMIO clear/set Ezequiel Garcia
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Ezequiel Garcia @ 2013-08-20 16:48 UTC (permalink / raw)
  To: linux-arm-kernel

Here's the v2 for the introduction of a generic thread-safe clear-set
register access.

Following the v1, I've added a proper barrier to ensure proper ordering,
between the writel and the spin_unlock.

It's worth noticing a different approach has been proposed (several times)
for getting thread-safe register access, through the use of regmap_update_bits
(just as it's done in mfd/syscon).

However, as noted in [1], such solution has been rejected (several times)
for two reasons:

  * It's way more heavy-weight than necessary
  * It cannot be used in very early scenarios,
    such as a clocksource initialization.

Using this API it's possible -for instance- to add support for Armada 370/XP
in the orion_wdt driver. That work is ready, and it's been hold until we
decide a proper solution for shared-register access.

[1] http://www.spinics.net/lists/arm-kernel/msg266494.html

Ezequiel Garcia (3):
  ARM: Introduce atomic MMIO clear/set
  clocksource: orion: Use atomic access for shared registers
  watchdog: orion: Use atomic access for shared registers

 arch/arm/include/asm/io.h        |  5 +++++
 arch/arm/kernel/io.c             | 13 +++++++++++++
 drivers/clocksource/time-orion.c |  9 ++-------
 drivers/watchdog/orion_wdt.c     |  8 ++------
 4 files changed, 22 insertions(+), 13 deletions(-)

-- 
1.8.1.5

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2013-08-21 16:28 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-20 16:48 [PATCH v2 0/3] Introduce atomic MMIO register clear-set Ezequiel Garcia
2013-08-20 16:48 ` [PATCH v2 1/3] ARM: Introduce atomic MMIO clear/set Ezequiel Garcia
2013-08-20 16:55   ` Ezequiel Garcia
2013-08-20 21:08   ` Russell King - ARM Linux
2013-08-21 14:36     ` Ezequiel Garcia
2013-08-21 12:24   ` Will Deacon
2013-08-21 14:22     ` Ezequiel Garcia
2013-08-21 16:28       ` Will Deacon
2013-08-20 16:48 ` [PATCH v2 2/3] clocksource: orion: Use atomic access for shared registers Ezequiel Garcia
2013-08-20 16:48 ` [PATCH v2 3/3] watchdog: " Ezequiel Garcia

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).