linux_dsm_epyc7002/arch/ia64/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
..
native ia64/pv_ops: paravirtualize gate.S. 2009-03-26 11:01:46 -07:00
sn Disintegrate asm/system.h for IA64 2012-03-28 18:30:02 +01:00
uv Disintegrate asm/system.h for IA64 2012-03-28 18:30:02 +01:00
acenv.h ACPICA: Clean up redudant definitions already defined elsewhere 2014-05-27 18:13:08 +02:00
acpi-ext.h ACPI: remove private acpica headers from driver files 2008-12-31 01:15:22 -05:00
acpi.h Merge branch 'acpica' 2014-06-03 23:12:27 +02:00
agp.h agp: kill phys_to_gart() and gart_to_phys() 2009-08-03 09:05:00 +01:00
asm-offsets.h kbuild: move asm-offsets.h to include/generated 2009-12-12 13:08:14 +01:00
asmmacro.h Rename .data..patch.XXX to .data..patch.XXX. 2010-03-03 11:25:59 +01:00
atomic.h arch,ia64: Convert smp_mb__*() 2014-04-18 14:20:35 +02:00
barrier.h arch,ia64: Convert smp_mb__*() 2014-04-18 14:20:35 +02:00
bitops.h arch,ia64: Convert smp_mb__*() 2014-04-18 14:20:35 +02:00
bug.h
bugs.h
cache.h Rename .data.read_mostly to .data..read_mostly. 2010-03-03 11:26:00 +01:00
cacheflush.h block: add helpers to run flush_dcache_page() against a bio and a request's pages 2009-11-26 09:16:19 +01:00
checksum.h
clocksource.h clocksource: Change __ARCH_HAS_CLOCKSOURCE_DATA to a CONFIG option 2011-07-21 13:34:05 -07:00
cpu.h
cputime.h cputime: Generic on-demand virtual cputime accounting 2013-01-27 19:23:27 +01:00
current.h
cyclone.h
delay.h
device.h driver core / ACPI: Move ACPI support to core device and driver types 2012-11-15 00:28:00 +01:00
div64.h
dma-mapping.h ia64: dma_debug: add debug_dma_mapping_error support 2012-11-28 15:28:58 +01:00
dma.h
dmi.h firmware/dmi_scan: generalize for use by other archs 2014-01-23 16:36:57 -08:00
elf.h default SET_PERSONALITY() in linux/elf.h 2013-02-26 02:46:08 -05:00
emergency-restart.h
esi.h
fb.h
fpswa.h
ftrace.h [IA64] sanity in #include files. Move fnptr to types.h 2010-01-06 15:52:35 -08:00
futex.h Wrong asm register contraints in the futex implementation 2013-03-19 16:14:53 -07:00
gcc_intrin.h UAPI: (Scripted) Disintegrate arch/ia64/include/asm 2012-10-09 09:47:00 +01:00
gpio.h gpiolib/arches: Centralise bolierplate asm/gpio.h 2012-05-11 18:00:14 -06:00
hardirq.h [IA64] Move local_softirq_pending() definition 2010-10-19 13:31:11 +02:00
hpsim.h hpsim, initialize chip for assigned irqs 2012-03-08 12:26:30 -08:00
hugetlb.h mm/hugetlb: add more arch-defined huge_pte functions 2013-04-29 15:54:33 -07:00
hw_irq.h ia64: Remove unused check_irq_used() 2014-05-16 14:05:20 +02:00
idle.h [IA64] xen_domu_defconfig: fix build issues/warnings 2009-05-05 11:43:13 -07:00
intrinsics.h UAPI: (Scripted) Disintegrate arch/ia64/include/asm 2012-10-09 09:47:00 +01:00
io.h ia64: add early_memremap() alias for early_ioremap() 2013-09-05 13:29:28 +01:00
iommu_table.h ia64, iommu: Add a dummy iommu_table.h file in IA64. 2010-10-08 13:11:11 -07:00
iommu.h iommu: Remove group_mf 2012-06-25 13:48:30 +02:00
iosapic.h IA64: drivers: remove __dev* attributes. 2013-01-03 15:57:13 -08:00
irq_regs.h
irq_remapping.h iommu: dmar: Provide arch specific irq allocation 2014-05-16 14:05:19 +02:00
irq.h genirq: Make create/destroy_irq() ia64 private 2014-05-16 14:05:21 +02:00
irqflags.h [IA64] Fix include dependency in asm/irqflags.h 2013-06-17 13:39:52 -07:00
Kbuild locking/mcs: Allow architecture specific asm files to be used for contended case 2014-02-09 21:18:52 +01:00
kdebug.h
kexec.h Disintegrate asm/system.h for IA64 2012-03-28 18:30:02 +01:00
kmap_types.h kmap_types: make most arches use generic header file 2009-06-16 19:47:51 -07:00
kprobes.h [IA64] sanity in #include files. Move fnptr to types.h 2010-01-06 15:52:35 -08:00
kregs.h [IA64] Fix annoying IA64_TR_ALLOC_MAX message. 2008-10-17 13:47:53 -07:00
kvm_host.h kvm/x86: Convert iommu_flags to iommu_noncoherent 2013-10-30 19:02:13 +01:00
libata-portmap.h
linkage.h consolidate cond_syscall and SYSCALL_ALIAS declarations 2013-03-03 22:55:19 -05:00
local64.h arch: Implement local64_t 2010-06-09 11:12:36 +02:00
local.h
machvec_dig_vtd.h [IA64] Rename platform_name to ia64_platform_name 2012-07-25 11:47:16 -07:00
machvec_dig.h [IA64] Rename platform_name to ia64_platform_name 2012-07-25 11:47:16 -07:00
machvec_hpsim.h [IA64] Rename platform_name to ia64_platform_name 2012-07-25 11:47:16 -07:00
machvec_hpzx1_swiotlb.h [IA64] Rename platform_name to ia64_platform_name 2012-07-25 11:47:16 -07:00
machvec_hpzx1.h [IA64] Rename platform_name to ia64_platform_name 2012-07-25 11:47:16 -07:00
machvec_init.h [IA64] SN specific version of dma_get_required_mask() 2009-01-15 10:42:16 -08:00
machvec_sn2.h [IA64] Rename platform_name to ia64_platform_name 2012-07-25 11:47:16 -07:00
machvec_uv.h [IA64] Rename platform_name to ia64_platform_name 2012-07-25 11:47:16 -07:00
machvec.h ia64/xen: Remove Xen support for ia64 2013-12-10 16:11:07 -08:00
mc146818rtc.h
mca_asm.h Disintegrate asm/system.h for IA64 2012-03-28 18:30:02 +01:00
mca.h Fix initialization of CMCI/CMCP interrupts 2013-04-02 09:37:06 -07:00
meminit.h ia64/xen: Remove Xen support for ia64 2013-12-10 16:11:07 -08:00
mman.h UAPI: (Scripted) Disintegrate arch/ia64/include/asm 2012-10-09 09:47:00 +01:00
mmu_context.h cpumask: use mm_cpumask() wrapper: ia64 2009-03-16 14:12:48 +10:30
mmu.h
mmzone.h [IA64] removing redundant ifdef 2010-05-18 14:45:52 -07:00
module.h Make most arch asm/module.h files use asm-generic/module.h 2012-09-28 14:31:03 +09:30
msidef.h ia64: Move the macro definitions related to MSI to one header file. 2009-03-24 11:03:12 +02:00
mutex.h arch: Make __mutex_fastpath_lock_retval return whether fastpath succeeded or not 2013-06-26 12:10:55 +02:00
nodedata.h
numa.h Fix build error for numa_clear_node() under IA64 2013-04-02 09:39:48 -07:00
page.h Disintegrate asm/system.h for IA64 2012-03-28 18:30:02 +01:00
pal.h Fix common misspellings 2011-03-31 11:26:23 -03:00
param.h UAPI: (Scripted) Disintegrate arch/ia64/include/asm 2012-10-09 09:47:00 +01:00
paravirt_patch.h ia64/pv_op/binarypatch: add helper functions to support binary patching for paravirt_ops. 2009-03-26 11:02:31 -07:00
paravirt_privop.h [IA64] fix allmodconfig compilation breakage. 2009-04-20 09:46:29 -07:00
paravirt.h ia64/xen: Remove Xen support for ia64 2013-12-10 16:11:07 -08:00
parport.h IA64: drivers: remove __dev* attributes. 2013-01-03 15:57:13 -08:00
patch.h
pci.h PCI: Turn pcibios_penalize_isa_irq() into a weak function 2014-05-27 16:23:58 -06:00
percpu.h Merge branch 'for-35' of git://repo.or.cz/linux-kbuild 2010-06-01 08:55:52 -07:00
perfmon.h UAPI: (Scripted) Disintegrate arch/ia64/include/asm 2012-10-09 09:47:00 +01:00
pgalloc.h ia64: handle pgtable_page_ctor() fail 2013-11-15 09:32:17 +09:00
pgtable.h consolidate io_remap_pfn_range definitions 2013-06-29 12:46:35 +04:00
processor.h arch, locking: Ciao arch_mutex_cpu_relax() 2014-07-17 12:32:47 +02:00
ptrace.h new helper: current_user_stack_pointer() 2012-12-19 18:07:39 -05:00
pvclock-abi.h ia64/xen: Remove Xen support for ia64 2013-12-10 16:11:07 -08:00
rwsem.h rwsem: Move duplicate function prototypes to linux/rwsem.h 2011-01-27 12:30:39 +01:00
sal.h Disintegrate asm/system.h for IA64 2012-03-28 18:30:02 +01:00
scatterlist.h remove needless ISA_DMA_THRESHOLD 2010-08-07 18:15:50 +02:00
sections.h [IA64] Put the space for cpu0 per-cpu area into .data section 2008-09-29 16:39:19 -07:00
segment.h
serial.h
shmparam.h
siginfo.h UAPI: (Scripted) Disintegrate arch/ia64/include/asm 2012-10-09 09:47:00 +01:00
signal.h consolidate kernel-side struct sigaction declarations 2013-02-03 15:09:22 -05:00
smp.h IA64: drivers: remove __dev* attributes. 2013-01-03 15:57:13 -08:00
sparsemem.h
spinlock_types.h locking: Convert raw_rwlock to arch_rwlock 2009-12-14 23:55:32 +01:00
spinlock.h lockref: Implement lockref for Itanium 2013-09-04 17:18:56 -07:00
string.h
swiotlb.h swiotlb: Remove duplicate swiotlb_force extern declarations 2009-11-15 09:03:10 +01:00
switch_to.h cputime: Consolidate vtime handling on context switch 2012-08-20 13:05:28 +02:00
syscall.h [IA64] Remove COMPAT_IA32 support 2010-02-08 10:42:17 -08:00
termios.h UAPI: (Scripted) Disintegrate arch/ia64/include/asm 2012-10-09 09:47:00 +01:00
thread_info.h sched/idle, ia64: Switch from TS_POLLING to TIF_POLLING_NRFLAG 2014-05-08 09:16:55 +02:00
timex.h ia64/pv_ops/pv_time_ops: add sched_clock hook. 2009-03-26 10:50:42 -07:00
tlb.h mm: split 'tlb_flush_mmu()' into tlb flushing and memory freeing parts 2014-04-25 16:05:40 -07:00
tlbflush.h
topology.h mm: disable zone_reclaim_mode by default 2014-06-04 16:53:59 -07:00
types.h UAPI: (Scripted) Disintegrate arch/ia64/include/asm 2012-10-09 09:47:00 +01:00
uaccess.h
unaligned.h
uncached.h
unistd.h ia64: add renameat2 syscall 2014-05-20 10:59:38 +02:00
unwind.h
user.h
ustack.h UAPI: (Scripted) Disintegrate arch/ia64/include/asm 2012-10-09 09:47:00 +01:00
vga.h
xor.h