linux/arch/arm
Will Deacon 54d4d42b25 ARM: 7467/1: mutex: use generic xchg-based implementation for ARMv6+
commit a76d7bd96d upstream.

The open-coded mutex implementation for ARMv6+ cores suffers from a
severe lack of barriers, so in the uncontended case we don't actually
protect any accesses performed during the critical section.

Furthermore, the code is largely a duplication of the ARMv6+ atomic_dec
code but optimised to remove a branch instruction, as the mutex fastpath
was previously inlined. Now that this is executed out-of-line, we can
reuse the atomic access code for the locking (in fact, we use the xchg
code as this produces shorter critical sections).

This patch uses the generic xchg based implementation for mutexes on
ARMv6+, which introduces barriers to the lock/unlock operations and also
has the benefit of removing a fair amount of inline assembly code.

Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Nicolas Pitre <nico@linaro.org>
Reported-by: Shan Kang <kangshan0910@gmail.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-02 09:47:55 -07:00
..
boot ARM: 7532/1: decompressor: reset SCTLR.TRE for VMSA ARMv7 cores 2012-10-02 09:47:27 -07:00
common ARM: dmabounce: fix map_single() error return value 2011-07-03 23:24:21 +01:00
configs ARM: mxs: Remove MMAP_MIN_ADDR setting from mxs_defconfig 2012-08-15 12:04:29 -07:00
include/asm ARM: 7467/1: mutex: use generic xchg-based implementation for ARMv6+ 2012-10-02 09:47:55 -07:00
kernel ARM: fix rcu stalls on SMP platforms 2012-07-16 08:47:36 -07:00
lib ARM: 6945/1: Add unwinding support for division functions 2011-05-27 22:56:53 +01:00
mach-at91 ARM: at91: fix clock conid for atmel_tcb.1 on 9260/9g20 2011-12-21 12:57:34 -08:00
mach-bcmring ARM: bcmring: convert to use sp804 clockevents 2011-05-23 18:04:54 +01:00
mach-clps711x arm: Fold irq_set_chip/irq_set_handler 2011-03-29 14:47:58 +02:00
mach-cns3xxx
mach-davinci ARM: davinci: dm646x evm: wrong register used in setup_vpif_input_channel_mode 2011-12-21 12:57:34 -08:00
mach-dove ARM: orion: Fix USB phy for orion5x. 2012-03-12 10:32:58 -07:00
mach-ebsa110 arm: Fold irq_set_chip/irq_set_handler 2011-03-29 14:47:58 +02:00
mach-ep93xx ARM: 6966/1: ep93xx: fix inverted RTS/DTR signals on uart1 2011-07-06 20:46:36 +01:00
mach-exynos4 ARM: EXYNOS4: Set appropriate I2C device variant 2011-07-06 16:04:09 +09:00
mach-footbridge ARM: footbridge: fix clock event support 2011-06-11 00:46:17 +01:00
mach-gemini Merge git://git.infradead.org/mtd-2.6 2011-05-27 20:06:53 -07:00
mach-h720x ARM: 6962/1: mach-h720x: fix build error 2011-06-17 11:25:03 +01:00
mach-imx ARM i.MX imx21ads: Fix overlapping static i/o mappings 2012-06-22 11:34:12 -07:00
mach-integrator ARM: 7081/1: mach-integrator: fix the clocksource 2011-10-03 11:40:13 -07:00
mach-iop13xx Fix common misspellings 2011-03-31 11:26:23 -03:00
mach-iop32x ARM: zImage: remove the static qualifier from global data variables 2011-05-07 00:08:02 -04:00
mach-iop33x ARM: zImage: remove the static qualifier from global data variables 2011-05-07 00:08:02 -04:00
mach-ixp4xx ARM: fix regression in IXP4xx clocksource 2011-07-15 18:02:35 -07:00
mach-ixp23xx arm: Fold irq_set_chip/irq_set_handler 2011-03-29 14:47:58 +02:00
mach-ixp2000 arm: Fold irq_set_chip/irq_set_handler 2011-03-29 14:47:58 +02:00
mach-kirkwood ARM: orion: Fix Orion5x GPIO regression from MPP cleanup 2012-03-12 10:32:58 -07:00
mach-ks8695 arm: Fold irq_set_chip/irq_set_handler 2011-03-29 14:47:58 +02:00
mach-l7200/include/mach
mach-loki ARM: orion: Consolidate ethernet platform data 2011-05-16 15:06:01 -04:00
mach-lpc32xx ARM: LPC32xx: Fix irq on GPI_28 2012-03-12 10:32:39 -07:00
mach-mmp ARM: pxa168: correct nand pmu setting 2011-07-06 23:51:36 +08:00
mach-msm msm: timer: Fix DGT rate on 8960 and 8660 2011-06-20 16:30:07 -07:00
mach-mv78xx0 ARM: orion: Fix Orion5x GPIO regression from MPP cleanup 2012-03-12 10:32:58 -07:00
mach-mx5 ARM: mxc: don't allow to compile together i.MX51 and i.MX53 2011-05-19 13:11:30 +02:00
mach-mxs arm: mx23: recognise stmp378x as mx23 2011-12-21 12:57:34 -08:00
mach-netx ARM: 6827/1: mach-netx: delete hardcoded periphid 2011-05-26 10:33:34 +01:00
mach-nomadik gpio: move Nomadik GPIO driver to drivers/gpio 2011-05-26 17:30:03 -06:00
mach-nuc93x ARM: zImage: remove the static qualifier from global data variables 2011-05-07 00:08:02 -04:00
mach-omap1 omap: drop __initdata tags from static struct platform_device declarations 2011-07-04 03:56:15 -07:00
mach-omap2 ARM: OMAP2+: OPP: Fix to ensure check of right oppdef after bad one 2012-08-09 08:27:35 -07:00
mach-orion5x ARM: orion5x: Fix GPIO enable bits for MPP9 2012-05-21 09:39:58 -07:00
mach-pnx4008 arm: Cleanup the irq namespace 2011-03-29 14:47:57 +02:00
mach-pxa ARM: pxa: fix inconsistent CONFIG_USB_PXA27X 2011-12-09 08:52:24 -08:00
mach-realview Merge branches 'consolidate-clksrc', 'consolidate-flash', 'consolidate-generic', 'consolidate-smp', 'consolidate-stmp' and 'consolidate-zones' into consolidate 2011-05-23 18:05:10 +01:00
mach-rpc ARM: zImage: remove the static qualifier from global data variables 2011-05-07 00:08:02 -04:00
mach-s3c24a0/include/mach
mach-s3c64xx ARM: SAMSUNG: DMA Cleanup as per sparse 2011-07-16 15:50:19 +09:00
mach-s3c2400
mach-s3c2410 ARM: S3C2410: remove the now empty mach-s3c2410/irq.c 2011-06-03 18:36:53 -07:00
mach-s3c2412 ARM / Samsung: Use struct syscore_ops for "core" power management 2011-04-24 19:16:10 +02:00
mach-s3c2416 Merge branch 'usb-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6 2011-05-23 12:33:02 -07:00
mach-s3c2440 ARM: S3C2440: fix section mismatch on mini2440 2011-07-08 18:16:56 +09:00
mach-s3c2443 arm: Fold irq_set_chip/irq_set_handler 2011-03-29 14:47:58 +02:00
mach-s5p64x0 ARM: SAMSUNG: Add tx_st_done variable 2011-07-06 15:03:08 +09:00
mach-s5pc100 Merge branch 'for-spi' into s5p-fixes-for-linus 2011-07-06 15:46:41 +09:00
mach-s5pv210 ARM: SAMSUNG: Add tx_st_done variable 2011-07-06 15:03:08 +09:00
mach-sa1100 Merge branches 'consolidate-clksrc', 'consolidate-flash', 'consolidate-generic', 'consolidate-smp', 'consolidate-stmp' and 'consolidate-zones' into consolidate 2011-05-23 18:05:10 +01:00
mach-shark ARM: use ARM_DMA_ZONE_SIZE to adjust the zone sizes 2011-05-12 08:36:53 +01:00
mach-shmobile ARM: mach-shmobile: make a struct in board-ap4evb.c static 2011-06-30 14:37:06 +09:00
mach-spear3xx ARM: 6931/1: SPEAr3xx: Rework KConfig to allow all boards to be compiled in 2011-05-20 22:34:25 +01:00
mach-spear6xx ARM: 6934/1: SPEAr6xx: Rework Kconfig for single image solution 2011-05-20 22:34:25 +01:00
mach-tcc8k clocksource: convert ARM 32-bit up counting clocksources 2011-05-23 18:04:51 +01:00
mach-tegra ARM: Tegra: Harmony: Fix conflicting GPIO numbering 2011-06-04 15:51:52 -07:00
mach-u300 ARM: 6949/2: mach-u300: fix compilaton warning in IO accessors 2011-06-09 10:15:06 +01:00
mach-ux500 mach-ux500: enable ARM errata 764369 2012-02-03 09:18:57 -08:00
mach-versatile Merge branches 'consolidate-clksrc', 'consolidate-flash', 'consolidate-generic', 'consolidate-smp', 'consolidate-stmp' and 'consolidate-zones' into consolidate 2011-05-23 18:05:10 +01:00
mach-vexpress ARM: 6946/1: vexpress: move v2m clock init to init_early 2011-06-06 10:56:09 +01:00
mach-vt8500 arm: mach-vt8500: add forgotten irq_data conversion 2011-07-07 14:35:25 +00:00
mach-w90x900 Merge branch 'devel-stable' into for-linus 2011-05-23 19:28:04 +01:00
mm ARM: 7489/1: errata: fix workaround for erratum #720789 on UP systems 2012-09-14 10:00:36 -07:00
nwfpe
oprofile oprofile, arm/sh: Fix oprofile_arch_exit() linkage issue 2012-01-06 14:13:57 -08:00
plat-iop ARM: 6969/1: plat-iop: fix build error 2011-06-21 11:33:21 +01:00
plat-mxc ARM:imx:fix pwm period value 2012-01-06 14:13:56 -08:00
plat-nomadik gpio/nomadik: fix sleepmode for elder Nomadik 2011-06-09 15:03:38 -06:00
plat-omap Merge branch 'fixes-v3.0-rc3' into devel-fixes 2011-06-14 05:53:42 -07:00
plat-orion ARM: orion: Fix Orion5x GPIO regression from MPP cleanup 2012-03-12 10:32:58 -07:00
plat-pxa ARM: pxa: fix gpio_to_chip() clash with gpiolib namespace 2011-07-11 14:11:00 +08:00
plat-s3c24xx ARM: S3C24XX: Fix s3c2410_dma_enqueue parameters 2012-09-14 10:00:37 -07:00
plat-s5p Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/linux-arm-soc 2011-07-12 14:19:51 -07:00
plat-samsung ARM: SAMSUNG: fix race in s3c_adc_start for ADC 2012-07-19 08:58:21 -07:00
plat-spear Merge branches 'consolidate', 'ep93xx', 'fixes', 'misc', 'mmci', 'remove' and 'spear' into for-linus 2011-05-23 19:27:40 +01:00
plat-tcc
plat-versatile ARM: consolidate SMP cross call implementation 2011-05-23 16:53:17 +01:00
tools ARM: Update mach-types 2011-05-14 21:36:55 +01:00
vfp ARM: Use struct syscore_ops instead of sysdevs for PM in common code 2011-04-24 19:16:08 +02:00
Kconfig ARM: fix bad applied patch for arch/arm/Kconfig of stable 3.0.y tree. 2012-10-02 09:47:27 -07:00
Kconfig-nommu Fix common misspellings 2011-03-31 11:26:23 -03:00
Kconfig.debug lib: consolidate DEBUG_STACK_USAGE option 2011-05-25 08:39:54 -07:00
Makefile Merge branch 'for-rmk' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung into devel-stable 2011-05-25 21:47:48 +01:00