[PATCH v3 0/3] Introduce atomic MMIO register modify

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

After some discussion about the API semantic and implementation,
here's a new version, re-working both:

The semantic has been changed, and the new one is considered cleaner
(although slighlty less intuitive). In addition, it matches the
regmap_update_bits() prototype, which should appear nicely consistent
to our beloved users.

Following Will Deacon's suggestions, I reworked the implementation
mainly to reduce the performance penalty. See the previous discussion,
or the changelog (below) for details.

Changes from v2:
* As suggested by Will Deacon, dropped the iowmb() barrier
  and use relaxed variants instead. See Will's explanation for
  details: http://www.spinics.net/lists/arm-kernel/msg268775.html

* Use spin_{}_irqsave/restore to allow irq-context usage
  also suggested by Will Deacon.

* Re-worked the API semantics as proposed by Russell King.

Changes from v1:
* Added an io barrier iowmb() as suggested by Will Deacon,
  to ensure the writel gets completed before the spin_unlock().

Russell: If nobody has any objections, I'll add patch 1/3 to the
tracking system.


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

 arch/arm/include/asm/io.h        |  6 ++++++
 arch/arm/kernel/io.c             | 29 +++++++++++++++++++++++++++++
 drivers/clocksource/time-orion.c | 28 ++++++++++------------------
 drivers/watchdog/orion_wdt.c     |  8 ++------
 4 files changed, 47 insertions(+), 24 deletions(-)


linux-arm-kernel mailing list

[Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]     [Photos]

Follow linuxarm on Twitter