linux-sg2042/arch/blackfin/include/asm
Davidlohr Bueso 3a6bfbc91d arch, locking: Ciao arch_mutex_cpu_relax()
The arch_mutex_cpu_relax() function, introduced by 34b133f, is
hacky and ugly. It was added a few years ago to address the fact
that common cpu_relax() calls include yielding on s390, and thus
impact the optimistic spinning functionality of mutexes. Nowadays
we use this function well beyond mutexes: rwsem, qrwlock, mcs and
lockref. Since the macro that defines the call is in the mutex header,
any users must include mutex.h and the naming is misleading as well.

This patch (i) renames the call to cpu_relax_lowlatency  ("relax, but
only if you can do it with very low latency") and (ii) defines it in
each arch's asm/processor.h local header, just like for regular cpu_relax
functions. On all archs, except s390, cpu_relax_lowlatency is simply cpu_relax,
and thus we can take it out of mutex.h. While this can seem redundant,
I believe it is a good choice as it allows us to move out arch specific
logic from generic locking primitives and enables future(?) archs to
transparently define it, similarly to System Z.

Signed-off-by: Davidlohr Bueso <davidlohr@hp.com>
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Anton Blanchard <anton@samba.org>
Cc: Aurelien Jacquiot <a-jacquiot@ti.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Bharat Bhushan <r65777@freescale.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Chen Liqin <liqin.linux@gmail.com>
Cc: Chris Metcalf <cmetcalf@tilera.com>
Cc: Christian Borntraeger <borntraeger@de.ibm.com>
Cc: Chris Zankel <chris@zankel.net>
Cc: David Howells <dhowells@redhat.com>
Cc: David S. Miller <davem@davemloft.net>
Cc: Deepthi Dharwar <deepthi@linux.vnet.ibm.com>
Cc: Dominik Dingel <dingel@linux.vnet.ibm.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Guan Xuetao <gxt@mprc.pku.edu.cn>
Cc: Haavard Skinnemoen <hskinnemoen@gmail.com>
Cc: Hans-Christian Egtvedt <egtvedt@samfundet.no>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Helge Deller <deller@gmx.de>
Cc: Hirokazu Takata <takata@linux-m32r.org>
Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Cc: James E.J. Bottomley <jejb@parisc-linux.org>
Cc: James Hogan <james.hogan@imgtec.com>
Cc: Jason Wang <jasowang@redhat.com>
Cc: Jesper Nilsson <jesper.nilsson@axis.com>
Cc: Joe Perches <joe@perches.com>
Cc: Jonas Bonn <jonas@southpole.se>
Cc: Joseph Myers <joseph@codesourcery.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: Koichi Yasutake <yasutake.koichi@jp.panasonic.com>
Cc: Lennox Wu <lennox.wu@gmail.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mark Salter <msalter@redhat.com>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Matt Turner <mattst88@gmail.com>
Cc: Max Filippov <jcmvbkbc@gmail.com>
Cc: Michael Neuling <mikey@neuling.org>
Cc: Michal Simek <monstr@monstr.eu>
Cc: Mikael Starvik <starvik@axis.com>
Cc: Nicolas Pitre <nico@linaro.org>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Paul Burton <paul.burton@imgtec.com>
Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Qais Yousef <qais.yousef@imgtec.com>
Cc: Qiaowei Ren <qiaowei.ren@intel.com>
Cc: Rafael Wysocki <rafael.j.wysocki@intel.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Richard Henderson <rth@twiddle.net>
Cc: Richard Kuo <rkuo@codeaurora.org>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: Steven Miao <realmz6@gmail.com>
Cc: Steven Rostedt <srostedt@redhat.com>
Cc: Stratos Karafotis <stratosk@semaphore.gr>
Cc: Tim Chen <tim.c.chen@linux.intel.com>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Vasily Kulikov <segoon@openwall.com>
Cc: Vineet Gupta <vgupta@synopsys.com>
Cc: Vineet Gupta <Vineet.Gupta1@synopsys.com>
Cc: Waiman Long <Waiman.Long@hp.com>
Cc: Will Deacon <will.deacon@arm.com>
Cc: Wolfram Sang <wsa@the-dreams.de>
Cc: adi-buildroot-devel@lists.sourceforge.net
Cc: linux390@de.ibm.com
Cc: linux-alpha@vger.kernel.org
Cc: linux-am33-list@redhat.com
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-c6x-dev@linux-c6x.org
Cc: linux-cris-kernel@axis.com
Cc: linux-hexagon@vger.kernel.org
Cc: linux-ia64@vger.kernel.org
Cc: linux@lists.openrisc.net
Cc: linux-m32r-ja@ml.linux-m32r.org
Cc: linux-m32r@ml.linux-m32r.org
Cc: linux-m68k@lists.linux-m68k.org
Cc: linux-metag@vger.kernel.org
Cc: linux-mips@linux-mips.org
Cc: linux-parisc@vger.kernel.org
Cc: linuxppc-dev@lists.ozlabs.org
Cc: linux-s390@vger.kernel.org
Cc: linux-sh@vger.kernel.org
Cc: linux-xtensa@linux-xtensa.org
Cc: sparclinux@vger.kernel.org
Link: http://lkml.kernel.org/r/1404079773.2619.4.camel@buesod1.americas.hpqcorp.net
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2014-07-17 12:32:47 +02:00
..
Kbuild locking/mcs: Allow architecture specific asm files to be used for contended case 2014-02-09 21:18:52 +01:00
asm-offsets.h kbuild: move asm-offsets.h to include/generated 2009-12-12 13:08:14 +01:00
atomic.h blackfin: smp: fix smp build after drop asm/system.h 2013-05-09 13:08:45 +08:00
barrier.h arch,blackfin: Convert smp_mb__*() 2014-04-18 11:40:34 +02:00
bfin-global.h bfin: add 32M, 16M and 8M uncached DMA region options 2012-07-24 13:39:48 +08:00
bfin-lq035q1.h Blackfin: extend bfin-lq035q1-fb resources to include PPI mode 2010-03-09 00:30:46 -05:00
bfin5xx_spi.h spi/bfin_spi: drop bits_per_word from client data 2012-03-21 11:00:07 +08:00
bfin_can.h Blackfin: bfin_can.h: add missing VERSION/VERSION2 MMRs 2010-10-22 16:30:03 -04:00
bfin_dma.h blackfin: add bf60x to current framework 2012-05-21 14:54:12 +08:00
bfin_pfmon.h blackfin: license: Change ADI BSD license 2012-05-21 14:54:30 +08:00
bfin_ppi.h blackfin: add spi/sport3/ppi head file for bf60x 2012-05-21 14:54:18 +08:00
bfin_rotary.h blackfin: rotary: Add pm_wakeup flag to platform data structure. 2012-05-21 14:54:43 +08:00
bfin_sdh.h bf609: rsi: Add bf609 rsi MMR macro and board platform data. 2013-05-07 18:26:18 +08:00
bfin_serial.h bf60x: update anomaly id in serial and twi driver headers. 2012-07-24 13:39:52 +08:00
bfin_simple_timer.h bfin: simple_timer: add READ_COUNTER ioctl and add NOIRQ timer mode 2012-07-24 13:39:50 +08:00
bfin_sport.h UAPI: (Scripted) Disintegrate arch/blackfin/include/asm 2012-12-13 13:50:56 +08:00
bfin_sport3.h treewide: Fix typos in printk and comment 2013-03-18 14:57:53 +01:00
bfin_twi.h i2c: bfin-twi: remove unnecessary Blackfin SSYNC from the driver 2014-03-09 08:41:18 +01:00
bfin_watchdog.h Blackfin: split watchdog definitions into a dedicated header file 2010-03-09 00:30:50 -05:00
bfrom.h Blackfin arch: Update some inline assembly, tweak some register constraints 2009-01-07 23:14:39 +08:00
bitops.h arch,blackfin: Convert smp_mb__*() 2014-04-18 11:40:34 +02:00
blackfin.h blackfin: asm: fix blackfin.h broken 2012-05-21 14:54:08 +08:00
bug.h Blackfin: change the BUG opcode to an unused 16-bit opcode 2010-05-22 14:19:04 -04:00
cache.h Blackfin: SMP: fix build breakage in cache.h 2011-01-10 07:18:14 -05:00
cacheflush.h Blackfin: don't attempt to flush on-chip L1 SRAM regions 2011-05-25 08:13:41 -04:00
cdef_LPBlackfin.h Blackfin: fix inverted anomaly 05000481 logic 2010-10-25 17:24:00 -04:00
checksum.h Blackfin: convert to generic checksum code 2009-12-15 00:13:32 -05:00
clkdev.h clk: Add common __clk_get(), __clk_put() implementations 2013-12-04 17:19:44 +01:00
clocks.h blackfin: bf60x: add clock support 2012-05-21 14:54:13 +08:00
cmpxchg.h blackfin: fix cmpxchg build fails from system.h fallout 2012-04-02 14:41:25 -07:00
context.S bfin: pm: add deepsleep for bf60x 2012-07-24 13:39:49 +08:00
cplb.h blackfin: cplb: add support for bf60x 2012-05-21 14:54:16 +08:00
cplbinit.h Blackfin: mass clean up of copyright/licensing info 2009-10-07 04:36:26 -04:00
cpu.h blackfin: smp: cleanup smp code 2012-01-09 10:26:15 +08:00
def_LPBlackfin.h blackfin: Support L1 SRAM parity checking feature on bf60x 2014-01-29 15:12:20 +08:00
delay.h Blackfin: implement ndelay() 2010-03-09 00:30:50 -05:00
dma-mapping.h blackfin: Provide dma_mmap_coherent() and dma_get_sgtable() 2013-01-29 08:11:14 +01:00
dma.h Revert "blackfin: dma: current count mmr is read only" 2014-06-11 00:13:22 +08:00
dpmc.h pm: dpmc macro typo fix 2012-07-24 13:39:48 +08:00
early_printk.h Blackfin: mass clean up of copyright/licensing info 2009-10-07 04:36:26 -04:00
elf.h default SET_PERSONALITY() in linux/elf.h 2013-02-26 02:46:08 -05:00
entry.h m68k{nommu}/blackfin : remove old assembler-only flags bit definitions 2010-10-26 16:52:12 -07:00
exec.h Disintegrate asm/system.h for Blackfin [ver #2] 2012-03-21 11:00:08 +08:00
fixed_code.h UAPI: (Scripted) Disintegrate arch/blackfin/include/asm 2012-12-13 13:50:56 +08:00
flat.h Blackfin: mass clean up of copyright/licensing info 2009-10-07 04:36:26 -04:00
ftrace.h ftrace: Make CALLER_ADDRx macros more generic 2014-05-21 03:10:32 -04:00
gpio.h blackfin: adi gpio driver and pinctrl driver support 2013-11-15 17:33:42 +08:00
gptimers.h blackfin: bf60x: enable gptimer clock source 2012-05-21 14:54:20 +08:00
hardirq.h hardirq: Make hardirq bits generic 2013-11-13 20:21:46 +01:00
io.h Blackfin: switch to asm-generic/io.h 2011-01-10 07:18:04 -05:00
ipipe.h atomic: use <linux/atomic.h> 2011-07-26 16:49:47 -07:00
ipipe_base.h Blackfin/ipipe: upgrade to I-pipe mainline 2011-03-18 04:01:10 -04:00
irq.h pinctrl: Move pint PM storage structure out of blackfin architecture. 2014-02-10 10:13:08 +01:00
irq_handler.h blackfin: adi gpio driver and pinctrl driver support 2013-11-15 17:33:42 +08:00
irqflags.h blackfin: mach-common: add sec support for bf60x 2012-05-21 14:54:15 +08:00
kgdb.h blackfin: kgdb: skip hardware watchpoint test 2012-03-21 11:00:07 +08:00
l1layout.h Blackfin: mass clean up of copyright/licensing info 2009-10-07 04:36:26 -04:00
linkage.h Blackfin: mass clean up of copyright/licensing info 2009-10-07 04:36:26 -04:00
mem_init.h blackfin: dmc: Improve DDR2 write through in DMC effict controller. 2013-05-07 18:25:59 +08:00
mem_map.h Blackfin: unify memory map headers 2009-06-22 21:16:07 -04:00
mmu.h Blackfin: mass clean up of copyright/licensing info 2009-10-07 04:36:26 -04:00
mmu_context.h blackfin: restore L1 base address and length 2012-03-21 11:00:06 +08:00
module.h Make most arch asm/module.h files use asm-generic/module.h 2012-09-28 14:31:03 +09:30
nand.h mtd: Blackfin NFC: fix handling of page sizes 2010-08-05 16:14:38 +01:00
nmi.h Blackfin: implement nmi_watchdog for SMP on BF561 2010-03-09 00:30:49 -05:00
page.h blackfin: add bf60x to current framework 2012-05-21 14:54:12 +08:00
page_offset.h Blackfin: mass clean up of copyright/licensing info 2009-10-07 04:36:26 -04:00
pci.h PCI: Turn pcibios_penalize_isa_irq() into a weak function 2014-05-27 16:23:58 -06:00
pda.h blackfin: SMP: pda: "next" field of blackfin_pda only used in SMP kernel 2012-05-21 14:54:36 +08:00
perf_event.h Blackfin: initial perf_event support 2011-05-25 08:24:09 -04:00
pgtable.h consolidate io_remap_pfn_range definitions 2013-06-29 12:46:35 +04:00
pm.h blackfin: fix build after add bf60x mach/pm.h 2012-05-21 14:55:07 +08:00
portmux.h blackfin: portmux: cleanup head file 2014-04-12 08:46:32 +08:00
processor.h arch, locking: Ciao arch_mutex_cpu_relax() 2014-07-17 12:32:47 +02:00
pseudo_instructions.h Blackfin: add support for the DBG (debug output) pseudo insn 2010-05-22 14:19:05 -04:00
ptrace.h Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/signal 2012-12-20 18:05:28 -08:00
reboot.h Blackfin arch: Fix bug - Run "reboot" hangs bf518-ezbrd 2009-02-04 16:49:45 +08:00
rwlock.h Blackfin arch: SMP supporting patchset: Blackfin header files and machine common code 2009-01-07 23:14:39 +08:00
scb.h blackfin: scb: Add system crossbar init code. 2013-09-13 10:42:27 +08:00
sections.h Blackfin: convert unicode space gremlins 2011-07-23 01:18:23 -04:00
segment.h Blackfin: mass clean up of copyright/licensing info 2009-10-07 04:36:26 -04:00
smp.h blackfin: smp: adapt to generic smp helpers 2012-09-07 17:54:56 +08:00
spinlock.h atomic: use <linux/atomic.h> 2011-07-26 16:49:47 -07:00
spinlock_types.h locking: Convert raw_rwlock to arch_rwlock 2009-12-14 23:55:32 +01:00
string.h Blackfin: move string functions to normal lib/ assembly 2010-05-22 14:19:09 -04:00
switch_to.h Disintegrate asm/system.h for Blackfin [ver #2] 2012-03-21 11:00:08 +08:00
syscall.h Blackfin: initial tracehook support 2010-03-09 00:30:51 -05:00
thread_info.h preempt: Make PREEMPT_ACTIVE generic 2013-11-13 20:21:47 +01:00
time.h Blackfin: add support for cpufreq on SMP systems 2010-03-09 00:30:50 -05:00
timex.h Blackfin arch: make sure cycles is marked as volatile so gcc doesnt reorder on us 2008-10-16 23:55:41 +08:00
tlb.h Blackfin: mass clean up of copyright/licensing info 2009-10-07 04:36:26 -04:00
tlbflush.h Blackfin: SMP: add flush_tlb_kernel_range stub 2010-05-21 09:40:20 -04:00
trace.h Blackfin: make hardware trace output a little more useful 2010-05-21 09:40:19 -04:00
traps.h bf60x: Add double fault, hardware error and NMI SEC handler 2012-07-24 13:39:52 +08:00
uaccess.h blackfin: sync data in blackfin write buffer 2013-02-20 15:21:23 +08:00
unistd.h sys_sgetmask/sys_ssetmask: add CONFIG_SGETMASK_SYSCALL 2014-06-04 16:54:14 -07:00