linux-sg2042/arch/arm
Joonsoo Kim 7c4e9ced42 ARM: 7643/1: sched: correct update_sched_clock()
If we want load epoch_cyc and epoch_ns atomically,
we should update epoch_cyc_copy first of all.
This notify reader that updating is in progress.

If we update epoch_cyc first like as current implementation,
there is subtle error case.
Look at the below example.

<Initial Condition>
cyc = 9
ns = 900
cyc_copy = 9

== CASE 1 ==
<CPU A = reader>           <CPU B = updater>
                           write cyc = 10
read cyc = 10
read ns = 900
                           write ns = 1000
                           write cyc_copy = 10
read cyc_copy = 10

output = (10, 900)

== CASE 2 ==
<CPU A = reader>           <CPU B = updater>
read cyc = 9
                           write cyc = 10
                           write ns = 1000
read ns = 1000
read cyc_copy = 9
                           write cyc_copy = 10
output = (9, 1000)

If atomic read is ensured, output should be (9, 900) or (10, 1000).
But, output in example case are not.

So, change updating sequence in order to correct this problem.

Cc: <stable@vger.kernel.org>
Signed-off-by: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2013-02-11 17:33:08 +00:00
..
boot Merge branch 'vexpress/fixes' of git://git.linaro.org/people/pawelmoll/linux into fixes 2013-01-24 08:12:24 -08:00
common ARM: GIC: fix GIC cpumask initialization 2013-02-08 10:17:22 +00:00
configs ARM: at91/at91_dt_defconfig: add at91sam9n12 SoC to DT defconfig 2013-01-23 10:39:58 +01:00
crypto
include ARM: 7641/1: memory: fix broken mmap by ensuring TASK_UNMAPPED_BASE is aligned 2013-02-08 12:21:07 +00:00
kernel ARM: 7643/1: sched: correct update_sched_clock() 2013-02-11 17:33:08 +00:00
lib
mach-at91 ARM: at91: rm9200: remake the BGA as default version 2013-01-23 10:31:14 +01:00
mach-bcm Add support for generic BCM SoC chipsets 2012-11-19 22:39:07 -08:00
mach-bcm2835 ARM: arm-soc: SoC updates for 3.8 2012-12-12 12:05:15 -08:00
mach-clps711x ARM: clps711x: Rename board files to match functionality 2012-11-21 09:57:46 -08:00
mach-cns3xxx ARM: arm-soc: Non-critical bug fixes 2012-12-12 11:32:16 -08:00
mach-davinci ARM: drivers: remove __dev* attributes. 2013-01-03 15:57:04 -08:00
mach-dove ARM: drivers: remove __dev* attributes. 2013-01-03 15:57:04 -08:00
mach-ebsa110
mach-ep93xx ARM: ep93xx: properly wait for UART FIFO to be empty 2012-12-12 11:22:56 +11:00
mach-exynos pinctrl: exynos: change PINCTRL_EXYNOS option 2013-02-05 15:27:39 +01:00
mach-footbridge
mach-gemini
mach-h720x
mach-highbank ARM: highbank: save and restore L2 cache and GIC on suspend 2013-01-07 21:08:26 -08:00
mach-imx ARM: arm-soc: Fixes for 3.8-rc, take 2 2013-01-24 12:42:50 -08:00
mach-integrator ARM: integrator: move syscon remap for AP PCIv3 2013-01-11 11:25:22 -08:00
mach-iop13xx ARM: drivers: remove __dev* attributes. 2013-01-03 15:57:04 -08:00
mach-iop32x
mach-iop33x
mach-ixp4xx Merge branch 'for-linus' of git://git.linaro.org/people/rmk/linux-arm 2012-12-12 11:30:02 -08:00
mach-kirkwood Merge branch 'v3.8-samsung-fixes-3' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung into fixes 2013-01-16 19:58:58 -08:00
mach-ks8695 ARM: drivers: remove __dev* attributes. 2013-01-03 15:57:04 -08:00
mach-l7200/include/mach
mach-lpc32xx ARM: LPC32xx: Add the motor PWM clock 2012-11-12 11:27:40 +01:00
mach-mmp ARM: drivers: remove __dev* attributes. 2013-01-03 15:57:04 -08:00
mach-msm ARM: drivers: remove __dev* attributes. 2013-01-03 15:57:04 -08:00
mach-mv78xx0 ARM: drivers: remove __dev* attributes. 2013-01-03 15:57:04 -08:00
mach-mvebu arm: mvebu: Fix compile for multiplatform when ARMv6 is selected 2013-01-11 12:17:58 -08:00
mach-mxs Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc 2012-12-18 09:58:09 -08:00
mach-netx treewide: Fix typos in various drivers 2012-12-03 11:05:04 +01:00
mach-nomadik ARM: nomadik: bump the IRQ numbers again 2013-01-03 23:42:07 +01:00
mach-omap1 ARM: arm-soc fixes for 3.8-rc 2013-01-08 18:53:56 -08:00
mach-omap2 ARM: OMAP2+: omap4-panda: add UART2 muxing for WiLink shared transport 2013-01-21 10:39:53 -08:00
mach-orion5x ARM: drivers: remove __dev* attributes. 2013-01-03 15:57:04 -08:00
mach-picoxcell
mach-prima2 ARM: drivers: remove __dev* attributes. 2013-01-03 15:57:04 -08:00
mach-pxa Merge remote-tracking branch 'asoc/fix/pxa' into tmp 2013-01-10 12:22:16 +00:00
mach-realview ARM: realview: ensure that we have sufficient IRQs available 2013-02-08 10:23:32 +00:00
mach-rpc
mach-s3c24xx ARM: drivers: remove __dev* attributes. 2013-01-03 15:57:04 -08:00
mach-s3c64xx ARM: S3C64XX: Fix up IRQ mapping for balblair on Cragganmore 2013-01-16 15:49:53 -08:00
mach-s3c2410
mach-s3c2412
mach-s3c2440
mach-s5p64x0 ARM: S5P64X0: Add I2S clkdev support 2012-12-19 09:49:29 -08:00
mach-s5pc100 ARM: S5PC100: Add I2S clkdev support 2012-12-19 09:49:29 -08:00
mach-s5pv210 ARM: S5PV210: Avoid passing the clks through platform data 2012-12-19 09:49:29 -08:00
mach-sa1100 ARM: drivers: remove __dev* attributes. 2013-01-03 15:57:04 -08:00
mach-shark
mach-shmobile fbdev changes for 3.8: 2012-12-15 13:03:48 -08:00
mach-socfpga ARM: socfpga: mark secondary_trampoline as cpuinit 2012-11-06 23:14:49 +01:00
mach-spear3xx ARM: SPEAr3xx: Shirq: Move shirq controller out of plat/ 2012-11-26 16:55:33 +05:30
mach-spear6xx
mach-spear13xx ARM: SPEAr1310: Fix AUXDATA for compact flash controller 2012-11-26 16:55:31 +05:30
mach-sunxi sunxi: Change the machine compatible string. 2012-12-23 18:20:15 +01:00
mach-tegra ARM: drivers: remove __dev* attributes. 2013-01-03 15:57:04 -08:00
mach-u300 ARM: drivers: remove __dev* attributes. 2013-01-03 15:57:04 -08:00
mach-ux500 ARM: ux500: add pinctrl address resources 2012-12-26 01:59:54 +01:00
mach-versatile ARM: 7610/1: versatile: bump IRQ numbers 2013-01-02 10:35:06 +00:00
mach-vexpress ARM: 7609/1: disable errata work-arounds which access secure registers 2013-01-02 10:35:05 +00:00
mach-vt8500 ARM: arm-soc: multiplatform conversion patches 2012-12-13 10:57:16 -08:00
mach-w90x900
mach-zynq ARM: zynq: Remove all unused mach headers 2012-11-21 10:52:21 +01:00
mm ARM: DMA mapping: fix bad atomic test 2013-02-08 10:25:23 +00:00
net Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2012-12-12 18:07:07 -08:00
nwfpe
oprofile
plat-iop
plat-omap ARM: arm-soc fixes for 3.8-rc 2013-01-08 18:53:56 -08:00
plat-orion ARM: arm-soc: Updates for Marvell mvebu/kirkwood 2012-12-14 14:54:26 -08:00
plat-pxa ARM: drivers: remove __dev* attributes. 2013-01-03 15:57:04 -08:00
plat-s3c24xx Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2012-12-13 12:00:02 -08:00
plat-samsung ARM: arm-soc fixes for 3.8-rc 2013-01-08 18:53:56 -08:00
plat-spear ARM: SPEAr3xx: Shirq: Move shirq controller out of plat/ 2012-11-26 16:55:33 +05:30
plat-versatile ARM: vexpress: extend the MPIDR range used for pen release check 2013-01-24 12:19:23 +00:00
tools ARM: boot: Fix usage of kecho 2012-11-12 23:22:54 +01:00
vfp ARM: 7627/1: Predicate preempt logic on PREEMP_COUNT not PREEMPT alone 2013-01-16 16:51:10 +00:00
xen Features: 2012-12-13 14:29:16 -08:00
Kconfig Merge branch 'fixes' of git://git.linaro.org/people/rmk/linux-arm 2013-01-09 08:58:57 -08:00
Kconfig-nommu
Kconfig.debug ARM: arm-soc: multiplatform conversion patches 2012-12-13 10:57:16 -08:00
Makefile ARM: arm-soc: multiplatform conversion patches 2012-12-13 10:57:16 -08:00