linux/drivers/clocksource
Mark Rutland 6aa7de0591 locking/atomics: COCCINELLE/treewide: Convert trivial ACCESS_ONCE() patterns to READ_ONCE()/WRITE_ONCE()
Please do not apply this to mainline directly, instead please re-run the
coccinelle script shown below and apply its output.

For several reasons, it is desirable to use {READ,WRITE}_ONCE() in
preference to ACCESS_ONCE(), and new code is expected to use one of the
former. So far, there's been no reason to change most existing uses of
ACCESS_ONCE(), as these aren't harmful, and changing them results in
churn.

However, for some features, the read/write distinction is critical to
correct operation. To distinguish these cases, separate read/write
accessors must be used. This patch migrates (most) remaining
ACCESS_ONCE() instances to {READ,WRITE}_ONCE(), using the following
coccinelle script:

----
// Convert trivial ACCESS_ONCE() uses to equivalent READ_ONCE() and
// WRITE_ONCE()

// $ make coccicheck COCCI=/home/mark/once.cocci SPFLAGS="--include-headers" MODE=patch

virtual patch

@ depends on patch @
expression E1, E2;
@@

- ACCESS_ONCE(E1) = E2
+ WRITE_ONCE(E1, E2)

@ depends on patch @
expression E;
@@

- ACCESS_ONCE(E)
+ READ_ONCE(E)
----

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: davem@davemloft.net
Cc: linux-arch@vger.kernel.org
Cc: mpe@ellerman.id.au
Cc: shuah@kernel.org
Cc: snitzer@redhat.com
Cc: thor.thayer@linux.intel.com
Cc: tj@kernel.org
Cc: viro@zeniv.linux.org.uk
Cc: will.deacon@arm.com
Link: http://lkml.kernel.org/r/1508792849-3115-19-git-send-email-paulmck@linux.vnet.ibm.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2017-10-25 11:01:08 +02:00
..
Kconfig Merge branch 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2017-09-04 13:06:34 -07:00
Makefile clocksource/drivers/imx-tpm: Add imx tpm timer support 2017-08-29 11:07:56 +02:00
acpi_pm.c
arc_timer.c
arm_arch_timer.c Merge branch 'linus' into locking/core, to pick up fixes 2017-08-25 11:04:51 +02:00
arm_global_timer.c
armv7m_systick.c
asm9260_timer.c
bcm2835_timer.c locking/atomics: COCCINELLE/treewide: Convert trivial ACCESS_ONCE() patterns to READ_ONCE()/WRITE_ONCE() 2017-10-25 11:01:08 +02:00
bcm_kona_timer.c
cadence_ttc_timer.c
clksrc-dbx500-prcmu.c
clksrc_st_lpc.c
clps711x-timer.c
cs5535-clockevt.c clockevents/drivers/cs5535: Improve resilience to spurious interrupts 2017-10-20 13:41:52 +02:00
dummy_timer.c
dw_apb_timer.c
dw_apb_timer_of.c
em_sti.c clocksource/drivers/em_sti: Fix error return codes in em_sti_probe() 2017-08-10 14:48:18 +02:00
exynos_mct.c
fsl_ftm_timer.c
h8300_timer8.c
h8300_timer16.c
h8300_tpu.c
i8253.c
jcore-pit.c
meson6_timer.c
metag_generic.c
mips-gic-timer.c clocksource: mips-gic-timer: Use new GIC accessor functions 2017-08-30 14:30:07 +02:00
mmio.c
mps2-timer.c
mtk_timer.c
mxs_timer.c
nomadik-mtu.c
numachip.c x86/numachip: Add const and __initconst to numachip2_clockevent 2017-09-25 09:36:15 +02:00
owl-timer.c
pxa_timer.c
qcom-timer.c
renesas-ostm.c
rockchip_timer.c
samsung_pwm_timer.c
scx200_hrt.c
sh_cmt.c
sh_mtu2.c
sh_tmu.c
sun4i_timer.c
tango_xtal.c clocksource: Convert to using %pOF instead of full_name 2017-08-31 15:56:17 +02:00
tcb_clksrc.c
tegra20_timer.c
time-armada-370-xp.c
time-efm32.c
time-lpc32xx.c
time-orion.c
time-pistachio.c
timer-atlas7.c
timer-atmel-pit.c
timer-atmel-st.c
timer-digicolor.c
timer-fttmr010.c
timer-imx-gpt.c
timer-imx-tpm.c clocksource/drivers/imx-tpm: Add imx tpm timer support 2017-08-29 11:07:56 +02:00
timer-integrator-ap.c clocksource/integrator: Fix section mismatch warning 2017-09-18 09:37:33 +02:00
timer-keystone.c
timer-nps.c
timer-of.c Merge branch 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2017-09-04 13:06:34 -07:00
timer-of.h
timer-oxnas-rps.c
timer-prima2.c
timer-probe.c clocksource: Convert to using %pOF instead of full_name 2017-08-31 15:56:17 +02:00
timer-sp.h
timer-sp804.c
timer-stm32.c clocksource: Convert to using %pOF instead of full_name 2017-08-31 15:56:17 +02:00
timer-sun5i.c
timer-ti-32k.c
timer-u300.c
versatile.c
vf_pit_timer.c
vt8500_timer.c
zevio-timer.c