android_kernel_xiaomi_sm8350/include/asm-mips
Ingo Molnar fb1c8f93d8 [PATCH] spinlock consolidation
This patch (written by me and also containing many suggestions of Arjan van
de Ven) does a major cleanup of the spinlock code.  It does the following
things:

 - consolidates and enhances the spinlock/rwlock debugging code

 - simplifies the asm/spinlock.h files

 - encapsulates the raw spinlock type and moves generic spinlock
   features (such as ->break_lock) into the generic code.

 - cleans up the spinlock code hierarchy to get rid of the spaghetti.

Most notably there's now only a single variant of the debugging code,
located in lib/spinlock_debug.c.  (previously we had one SMP debugging
variant per architecture, plus a separate generic one for UP builds)

Also, i've enhanced the rwlock debugging facility, it will now track
write-owners.  There is new spinlock-owner/CPU-tracking on SMP builds too.
All locks have lockup detection now, which will work for both soft and hard
spin/rwlock lockups.

The arch-level include files now only contain the minimally necessary
subset of the spinlock code - all the rest that can be generalized now
lives in the generic headers:

 include/asm-i386/spinlock_types.h       |   16
 include/asm-x86_64/spinlock_types.h     |   16

I have also split up the various spinlock variants into separate files,
making it easier to see which does what. The new layout is:

   SMP                         |  UP
   ----------------------------|-----------------------------------
   asm/spinlock_types_smp.h    |  linux/spinlock_types_up.h
   linux/spinlock_types.h      |  linux/spinlock_types.h
   asm/spinlock_smp.h          |  linux/spinlock_up.h
   linux/spinlock_api_smp.h    |  linux/spinlock_api_up.h
   linux/spinlock.h            |  linux/spinlock.h

/*
 * here's the role of the various spinlock/rwlock related include files:
 *
 * on SMP builds:
 *
 *  asm/spinlock_types.h: contains the raw_spinlock_t/raw_rwlock_t and the
 *                        initializers
 *
 *  linux/spinlock_types.h:
 *                        defines the generic type and initializers
 *
 *  asm/spinlock.h:       contains the __raw_spin_*()/etc. lowlevel
 *                        implementations, mostly inline assembly code
 *
 *   (also included on UP-debug builds:)
 *
 *  linux/spinlock_api_smp.h:
 *                        contains the prototypes for the _spin_*() APIs.
 *
 *  linux/spinlock.h:     builds the final spin_*() APIs.
 *
 * on UP builds:
 *
 *  linux/spinlock_type_up.h:
 *                        contains the generic, simplified UP spinlock type.
 *                        (which is an empty structure on non-debug builds)
 *
 *  linux/spinlock_types.h:
 *                        defines the generic type and initializers
 *
 *  linux/spinlock_up.h:
 *                        contains the __raw_spin_*()/etc. version of UP
 *                        builds. (which are NOPs on non-debug, non-preempt
 *                        builds)
 *
 *   (included on UP-non-debug builds:)
 *
 *  linux/spinlock_api_up.h:
 *                        builds the _spin_*() APIs.
 *
 *  linux/spinlock.h:     builds the final spin_*() APIs.
 */

All SMP and UP architectures are converted by this patch.

arm, i386, ia64, ppc, ppc64, s390/s390x, x64 was build-tested via
crosscompilers.  m32r, mips, sh, sparc, have not been tested yet, but should
be mostly fine.

From: Grant Grundler <grundler@parisc-linux.org>

  Booted and lightly tested on a500-44 (64-bit, SMP kernel, dual CPU).
  Builds 32-bit SMP kernel (not booted or tested).  I did not try to build
  non-SMP kernels.  That should be trivial to fix up later if necessary.

  I converted bit ops atomic_hash lock to raw_spinlock_t.  Doing so avoids
  some ugly nesting of linux/*.h and asm/*.h files.  Those particular locks
  are well tested and contained entirely inside arch specific code.  I do NOT
  expect any new issues to arise with them.

 If someone does ever need to use debug/metrics with them, then they will
  need to unravel this hairball between spinlocks, atomic ops, and bit ops
  that exist only because parisc has exactly one atomic instruction: LDCW
  (load and clear word).

From: "Luck, Tony" <tony.luck@intel.com>

   ia64 fix

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Arjan van de Ven <arjanv@infradead.org>
Signed-off-by: Grant Grundler <grundler@parisc-linux.org>
Cc: Matthew Wilcox <willy@debian.org>
Signed-off-by: Hirokazu Takata <takata@linux-m32r.org>
Signed-off-by: Mikael Pettersson <mikpe@csd.uu.se>
Signed-off-by: Benoit Boissinot <benoit.boissinot@ens-lyon.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-09-10 10:06:21 -07:00
..
arc
cobalt
ddb5xxx [PATCH] mips: nuke trailing whitespace 2005-09-05 00:06:07 -07:00
dec [PATCH] mips: clean up 32/64-bit configuration 2005-09-05 00:06:06 -07:00
galileo-boards
gcc
ip32 [PATCH] mips: nuke trailing whitespace 2005-09-05 00:06:07 -07:00
it8172
jmr3927
lasat [PATCH] mips: nuke trailing whitespace 2005-09-05 00:06:07 -07:00
mach-atlas
mach-au1x00 [PATCH] mips: nuke trailing whitespace 2005-09-05 00:06:07 -07:00
mach-db1x00 [PATCH] mips: nuke trailing whitespace 2005-09-05 00:06:07 -07:00
mach-ddb5074
mach-dec
mach-ev64120
mach-ev96100
mach-generic [PATCH] mips: clean up 32/64-bit configuration 2005-09-05 00:06:06 -07:00
mach-ip22 [PATCH] mips: clean up 32/64-bit configuration 2005-09-05 00:06:06 -07:00
mach-ip27
mach-ip32 [PATCH] mips: clean up 32/64-bit configuration 2005-09-05 00:06:06 -07:00
mach-ja
mach-jazz [PATCH] mips: nuke trailing whitespace 2005-09-05 00:06:07 -07:00
mach-jmr3927/asm
mach-lasat
mach-mips
mach-ocelot
mach-ocelot3
mach-pb1x00 [PATCH] mips: nuke trailing whitespace 2005-09-05 00:06:07 -07:00
mach-qemu [PATCH] mips: add support for Qemu system architecture 2005-09-05 00:06:04 -07:00
mach-rm200
mach-sibyte
mach-yosemite
mips-boards
pci
sgi [PATCH] mips: nuke trailing whitespace 2005-09-05 00:06:07 -07:00
sibyte [PATCH] mips: nuke trailing whitespace 2005-09-05 00:06:07 -07:00
sn
tx4927 [PATCH] mips: nuke trailing whitespace 2005-09-05 00:06:07 -07:00
vr41xx [PATCH] mips: add TANBAC TB0287 support 2005-09-09 13:57:30 -07:00
xtalk
8253pit.h
a.out.h [PATCH] mips: clean up 32/64-bit configuration 2005-09-05 00:06:06 -07:00
addrspace.h [PATCH] mips: clean up 32/64-bit configuration 2005-09-05 00:06:06 -07:00
asm.h
asmmacro-32.h kbuild: mips use generic asm-offsets.h support 2005-09-09 22:32:31 +02:00
asmmacro-64.h kbuild: mips use generic asm-offsets.h support 2005-09-09 22:32:31 +02:00
asmmacro.h [PATCH] mips: nuke trailing whitespace 2005-09-05 00:06:07 -07:00
atomic.h [PATCH] mips: clean up 32/64-bit configuration 2005-09-05 00:06:06 -07:00
auxvec.h [PATCH] auxiliary vector cleanups 2005-09-07 16:57:21 -07:00
bcache.h
bitops.h [PATCH] mips: nuke trailing whitespace 2005-09-05 00:06:07 -07:00
bootinfo.h
branch.h
break.h
bug.h [PATCH] remove all kernel BUGs 2005-05-01 08:59:01 -07:00
bugs.h [PATCH] mips: clean up 32/64-bit configuration 2005-09-05 00:06:06 -07:00
byteorder.h
cache.h
cachectl.h
cacheflush.h
cacheops.h
checksum.h [PATCH] mips: clean up 32/64-bit configuration 2005-09-05 00:06:06 -07:00
compat.h [PATCH] compat: be more consistent about [ug]id_t 2005-09-07 16:57:19 -07:00
compiler.h
cpu-features.h [PATCH] mips: clean up 32/64-bit configuration 2005-09-05 00:06:06 -07:00
cpu-info.h
cpu.h
cputime.h
current.h
ddb5074.h
debug.h
delay.h [PATCH] mips: clean up 32/64-bit configuration 2005-09-05 00:06:06 -07:00
div64.h
dma-mapping.h
dma.h
ds1286.h
elf.h [PATCH] mips: clean up 32/64-bit configuration 2005-09-05 00:06:06 -07:00
emergency-restart.h [PATCH] Add emergency_restart() 2005-07-26 14:35:41 -07:00
errno.h [PATCH] add EOWNERDEAD and ENOTRECOVERABLE version 2 2005-05-01 08:59:06 -07:00
fcntl.h [PATCH] Clean up struct flock64 definitions 2005-09-07 16:57:38 -07:00
fixmap.h
floppy.h
fpregdef.h [PATCH] mips: nuke trailing whitespace 2005-09-05 00:06:07 -07:00
fpu_emulator.h
fpu.h [PATCH] mips: nuke trailing whitespace 2005-09-05 00:06:07 -07:00
futex.h [PATCH] FUTEX_WAKE_OP: pthread_cond_signal() speedup 2005-09-07 16:57:17 -07:00
gdb-stub.h
gfx.h
gt64120.h
gt64240.h
hardirq.h
hazards.h
highmem.h
hw_irq.h
i8259.h
ide.h
inst.h
interrupt.h
inventory.h
io.h
ioctl.h
ioctls.h
ipc.h
ipcbuf.h
irq_cpu.h
irq.h [PATCH] remove unnecessary handle_IRQ_event() prototypes 2005-09-09 13:57:33 -07:00
isadep.h
it8712.h
jazz.h
jazzdma.h
kmap_types.h
linkage.h
local.h [PATCH] mips: clean up 32/64-bit configuration 2005-09-05 00:06:06 -07:00
m48t35.h
m48t37.h
marvell.h
mc146818-time.h
mc146818rtc.h
mipsprom.h
mipsregs.h
mman.h
mmu_context.h [PATCH] mips: clean up 32/64-bit configuration 2005-09-05 00:06:06 -07:00
mmu.h
mmzone.h [PATCH] mips: add MIPS-specific support for flatmem/discontigmem 2005-06-25 16:24:25 -07:00
module.h [PATCH] mips: clean up 32/64-bit configuration 2005-09-05 00:06:06 -07:00
msc01_ic.h
msgbuf.h [PATCH] mips: clean up 32/64-bit configuration 2005-09-05 00:06:06 -07:00
namei.h
nile4.h
numnodes.h
paccess.h [PATCH] mips: clean up 32/64-bit configuration 2005-09-05 00:06:06 -07:00
page.h [PATCH] mm: consolidate get_order 2005-09-05 00:05:39 -07:00
param.h
parport.h
pci.h [PATCH] mips: add pcibios_bus_to_resource 2005-09-05 00:06:08 -07:00
percpu.h
pgalloc.h [PATCH] mips: clean up 32/64-bit configuration 2005-09-05 00:06:06 -07:00
pgtable-32.h [PATCH] freepgt: arch FIRST_USER_ADDRESS 0 2005-04-19 13:29:23 -07:00
pgtable-64.h [PATCH] freepgt: arch FIRST_USER_ADDRESS 0 2005-04-19 13:29:23 -07:00
pgtable-bits.h
pgtable.h [PATCH] mips: clean up 32/64-bit configuration 2005-09-05 00:06:06 -07:00
pmon.h
poll.h
posix_types.h
prctl.h
prefetch.h
processor.h [PATCH] mips: clean up 32/64-bit configuration 2005-09-05 00:06:06 -07:00
ptrace.h [PATCH] mips: clean up 32/64-bit configuration 2005-09-05 00:06:06 -07:00
qemu.h [PATCH] mips: add support for Qemu system architecture 2005-09-05 00:06:04 -07:00
r4kcache.h [PATCH] mips: nuke trailing whitespace 2005-09-05 00:06:07 -07:00
reboot.h
reg.h [PATCH] mips: fix build warnings 2005-09-05 00:06:08 -07:00
regdef.h
resource.h [PATCH] mips: clean up 32/64-bit configuration 2005-09-05 00:06:06 -07:00
riscos-syscall.h
rtc.h [PATCH] mips: nuke trailing whitespace 2005-09-05 00:06:07 -07:00
scatterlist.h
sections.h
segment.h
semaphore.h
sembuf.h
serial.h [PATCH] Serial: Split 8250 port table (part 2) 2005-06-29 18:45:19 +01:00
setup.h
sgialib.h
sgiarcs.h [PATCH] mips: clean up 32/64-bit configuration 2005-09-05 00:06:06 -07:00
sgidefs.h
shmbuf.h
shmparam.h
sigcontext.h [PATCH] mips: nuke trailing whitespace 2005-09-05 00:06:07 -07:00
siginfo.h [PATCH] mips: clean up 32/64-bit configuration 2005-09-05 00:06:06 -07:00
signal.h [PATCH] asm/signal.h unification 2005-05-04 07:33:15 -07:00
sim.h kbuild: mips use generic asm-offsets.h support 2005-09-09 22:32:31 +02:00
smp.h [PATCH] smp_processor_id() cleanup 2005-06-21 18:46:13 -07:00
sni.h
socket.h [PATCH] mips: nuke trailing whitespace 2005-09-05 00:06:07 -07:00
sockios.h
spinlock_types.h [PATCH] spinlock consolidation 2005-09-10 10:06:21 -07:00
spinlock.h [PATCH] spinlock consolidation 2005-09-10 10:06:21 -07:00
stackframe.h kbuild: mips use generic asm-offsets.h support 2005-09-09 22:32:31 +02:00
stat.h
statfs.h [PATCH] mips: nuke trailing whitespace 2005-09-05 00:06:07 -07:00
string.h [PATCH] mips: clean up 32/64-bit configuration 2005-09-05 00:06:06 -07:00
suspend.h
sysmips.h
system.h [PATCH] mips: clean up 32/64-bit configuration 2005-09-05 00:06:06 -07:00
termbits.h
termios.h
thread_info.h [PATCH] mips: clean up 32/64-bit configuration 2005-09-05 00:06:06 -07:00
time.h
timex.h
titan_dep.h [PATCH] mips: nuke trailing whitespace 2005-09-05 00:06:07 -07:00
tlb.h
tlbdebug.h
tlbflush.h
topology.h
traps.h
tx3912.h
types.h [PATCH] mips: clean up 32/64-bit configuration 2005-09-05 00:06:06 -07:00
uaccess.h [PATCH] remove verify_area(): remove verify_area() from various uaccess.h headers 2005-09-07 16:57:35 -07:00
ucontext.h
unaligned.h
unistd.h [PATCH] mips: clean up 32/64-bit configuration 2005-09-05 00:06:06 -07:00
user.h
vga.h
war.h [PATCH] mips: nuke trailing whitespace 2005-09-05 00:06:07 -07:00
watch.h
wbflush.h
xor.h
xxs1500.h [PATCH] mips: nuke trailing whitespace 2005-09-05 00:06:07 -07:00