[GIT PULL] locking changes for v4.3

From: Ingo Molnar
Date: Wed Sep 02 2015 - 14:06:58 EST


Linus,

Please pull the latest locking-core-for-linus git tree from:

git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git locking-core-for-linus

# HEAD: d420acd816c07c7be31bd19d09cbcb16e5572fa6 jump_label/x86: Work around asm build bug on older/backported GCCs

Main changes in this cycle are:

- Extend atomic primitives with coherent logic op primitives (atomic_{or,and,xor}())
and deprecate the old partial APIs (atomic_{set,clear}_mask())

The old ops were incoherent with incompatible signatures across architectures
and with incomplete support. Now every architecture supports the primitives
consistently. (by Peter Zijlstra)

- Generic support for 'relaxed atomics':

- _acquire/release/relaxed() flavours of xchg(), cmpxchg() and {add,sub}_return()
- atomic_read_acquire()
- atomic_set_release()

This came out of porting qwrlock code to arm64.

(by Will Deacon)

- Clean up the fragile static_key APIs that were causing repeat bugs, by
introducing a new one:

DEFINE_STATIC_KEY_TRUE(name);
DEFINE_STATIC_KEY_FALSE(name);

Which define a key of different types with an initial true/false value.

Then allow:

static_branch_likely()
static_branch_unlikely()

to take a key of either type and emit the right instruction for the case.
To be able to know the 'type' of the static key we encode it in the jump
entry.

(by Peter Zijlstra)

- Static key self-tests. (by Jason Baron)

- qrwlock optimizations. (by Waiman Long)

- small futex enhancements. (by Davidlohr Bueso)

- ... and misc other changes

Thanks,

Ingo

------------------>
Andrey Konovalov (1):
locking, arch: use WRITE_ONCE()/READ_ONCE() in smp_store_release()/smp_load_acquire()

Chris Metcalf (1):
tile: Provide atomic_{or,xor,and}

Christian Borntraeger (1):
locking, compiler.h: Cast away attributes in the WRITE_ONCE() magic

Davidlohr Bueso (3):
futex: Enhance comments in futex_lock_pi() for blocking paths
futex: Fault/error injection capabilities
rtmutex: Delete scriptable tester

Heiko Carstens (1):
s390/uaccess, locking/static_keys: employ static_branch_likely()

Ingo Molnar (1):
locking/static_keys: Provide a selftest

Jason Baron (2):
jump_label: Provide a self-test
jump label, locking/static_keys: Update docs

Peter Zijlstra (37):
atomic: Prepare generic atomic implementation for logic ops
alpha: Provide atomic_{or,xor,and}
arc: Provide atomic_{or,xor,and}
arm: Provide atomic_{or,xor,and}
arm64: Provide atomic_{or,xor,and}
avr32: Provide atomic_{or,xor,and}
blackfin: Provide atomic_{or,xor,and}
hexagon: Provide atomic_{or,xor,and}
ia64: Provide atomic_{or,xor,and}
m32r: Provide atomic_{or,xor,and}
m68k: Provide atomic_{or,xor,and}
metag: Provide atomic_{or,xor,and}
mips: Provide atomic_{or,xor,and}
mn10300: Provide atomic_{or,xor,and}
parisc: Provide atomic_{or,xor,and}
powerpc: Provide atomic_{or,xor,and}
sh: Provide atomic_{or,xor,and}
sparc: Provide atomic_{or,xor,and}
xtensa: Provide atomic_{or,xor,and}
s390: Provide atomic_{or,xor,and}
x86: Provide atomic_{or,xor,and}
frv: Rewrite atomic implementation
h8300: Provide atomic_{or,xor,and}
atomic: Provide atomic_{or,xor,and}
atomic: Collapse all atomic_{set,clear}_mask definitions
atomic: Replace atomic_{set,clear}_mask() usage
atomic: Add simple atomic_t tests
locking: Clean up pvqspinlock warning
jump_label: Rename JUMP_LABEL_{EN,DIS}ABLE to JUMP_LABEL_{JMP,NOP}
jump_label, locking/static_keys: Rename JUMP_LABEL_TYPE_* and related helpers to the static_key* pattern
jump_label: Add jump_entry_key() helper
locking/static_keys: Add static_key_{en,dis}able() helpers
locking/static_keys: Rework update logic
locking/static_keys: Add a new static_key interface
locking/static_keys: Add selftest
x86, tsc, locking/static_keys: Employ static_branch_likely()
jump_label/x86: Work around asm build bug on older/backported GCCs

Waiman Long (4):
locking/qrwlock: Rename functions to queued_*()
locking/qrwlock: Better optimization for interrupt context readers
locking/qrwlock: Reduce reader/writer to reader lock transfer latency
locking/pvqspinlock: Only kick CPU at unlock time

Will Deacon (10):
locking/Documentation: Clarify failed cmpxchg() memory ordering semantics
locking/pvqspinlock: Order pv_unhash() after cmpxchg() on unlock slowpath
locking/atomics: Add _{acquire|release|relaxed}() variants of some atomic operations
locking, asm-generic: Rework atomic-long.h to avoid bulk code duplication
locking, asm-generic: Add _{relaxed|acquire|release}() variants for 'atomic_long_t'
locking/lockref: Remove homebrew cmpxchg64_relaxed() macro definition
locking/qrwlock: Implement queue_write_unlock() using smp_store_release()
locking/qrwlock: Make use of _{acquire|release|relaxed}() atomics
locking, include/llist: Use linux/atomic.h instead of asm/cmpxchg.h
locking, ARM, atomics: Define our SMP atomics in terms of _relaxed() operations

kbuild test robot (2):
futex: Make should_fail_futex() static
locking/static_keys: Make verify_keys() static



Documentation/atomic_ops.txt | 4 +-
Documentation/fault-injection/fault-injection.txt | 11 +
Documentation/memory-barriers.txt | 6 +-
Documentation/static-keys.txt | 99 ++---
arch/Kconfig | 6 +
arch/alpha/include/asm/atomic.h | 42 ++-
arch/arc/include/asm/atomic.h | 8 +-
arch/arm/include/asm/atomic.h | 51 +--
arch/arm/include/asm/barrier.h | 4 +-
arch/arm/include/asm/cmpxchg.h | 47 +--
arch/arm/include/asm/jump_label.h | 25 +-
arch/arm/kernel/jump_label.c | 2 +-
arch/arm64/include/asm/atomic.h | 14 +
arch/arm64/include/asm/barrier.h | 4 +-
arch/arm64/include/asm/jump_label.h | 18 +-
arch/arm64/kernel/jump_label.c | 2 +-
arch/avr32/include/asm/atomic.h | 12 +
arch/blackfin/include/asm/atomic.h | 16 +-
arch/blackfin/kernel/bfin_ksyms.c | 7 +-
arch/blackfin/mach-bf561/atomic.S | 30 +-
arch/blackfin/mach-common/smp.c | 2 +-
arch/frv/include/asm/atomic.h | 107 +++---
arch/frv/include/asm/atomic_defs.h | 172 +++++++++
arch/frv/include/asm/bitops.h | 99 +----
arch/frv/kernel/dma.c | 6 +-
arch/frv/kernel/frv_ksyms.c | 5 -
arch/frv/lib/Makefile | 2 +-
arch/frv/lib/atomic-lib.c | 7 +
arch/frv/lib/atomic-ops.S | 110 ------
arch/frv/lib/atomic64-ops.S | 94 -----
arch/h8300/include/asm/atomic.h | 137 ++-----
arch/hexagon/include/asm/atomic.h | 4 +
arch/ia64/include/asm/atomic.h | 24 +-
arch/ia64/include/asm/barrier.h | 4 +-
arch/m32r/include/asm/atomic.h | 45 +--
arch/m32r/kernel/smp.c | 4 +-
arch/m68k/include/asm/atomic.h | 14 +-
arch/metag/include/asm/atomic_lnkget.h | 38 +-
arch/metag/include/asm/atomic_lock1.h | 23 +-
arch/metag/include/asm/barrier.h | 4 +-
arch/mips/include/asm/atomic.h | 7 +
arch/mips/include/asm/barrier.h | 4 +-
arch/mips/include/asm/jump_label.h | 19 +-
arch/mips/kernel/jump_label.c | 2 +-
arch/mn10300/include/asm/atomic.h | 71 +---
arch/mn10300/mm/tlb-smp.c | 2 +-
arch/parisc/configs/c8000_defconfig | 1 -
arch/parisc/configs/generic-32bit_defconfig | 1 -
arch/parisc/include/asm/atomic.h | 7 +
arch/powerpc/include/asm/atomic.h | 7 +
arch/powerpc/include/asm/barrier.h | 4 +-
arch/powerpc/include/asm/jump_label.h | 19 +-
arch/powerpc/kernel/jump_label.c | 2 +-
arch/powerpc/kernel/misc_32.S | 19 -
arch/s390/include/asm/atomic.h | 41 +-
arch/s390/include/asm/barrier.h | 4 +-
arch/s390/include/asm/jump_label.h | 19 +-
arch/s390/kernel/jump_label.c | 2 +-
arch/s390/kernel/time.c | 4 +-
arch/s390/kvm/interrupt.c | 30 +-
arch/s390/kvm/kvm-s390.c | 32 +-
arch/s390/lib/uaccess.c | 12 +-
arch/sh/include/asm/atomic-grb.h | 43 +--
arch/sh/include/asm/atomic-irq.h | 21 +-
arch/sh/include/asm/atomic-llsc.h | 31 +-
arch/sparc/include/asm/atomic_32.h | 4 +-
arch/sparc/include/asm/atomic_64.h | 4 +
arch/sparc/include/asm/barrier_64.h | 4 +-
arch/sparc/include/asm/jump_label.h | 35 +-
arch/sparc/kernel/jump_label.c | 2 +-
arch/sparc/lib/atomic32.c | 22 +-
arch/sparc/lib/atomic_64.S | 6 +
arch/sparc/lib/ksyms.c | 3 +
arch/tile/include/asm/atomic_32.h | 28 ++
arch/tile/include/asm/atomic_64.h | 40 ++
arch/tile/lib/atomic_32.c | 23 ++
arch/tile/lib/atomic_asm_32.S | 4 +
arch/x86/include/asm/atomic.h | 25 +-
arch/x86/include/asm/atomic64_32.h | 14 +
arch/x86/include/asm/atomic64_64.h | 15 +
arch/x86/include/asm/barrier.h | 8 +-
arch/x86/include/asm/jump_label.h | 23 +-
arch/x86/include/asm/qrwlock.h | 10 -
arch/x86/kernel/jump_label.c | 2 +-
arch/x86/kernel/tsc.c | 22 +-
arch/xtensa/configs/iss_defconfig | 1 -
arch/xtensa/include/asm/atomic.h | 73 +---
drivers/gpu/drm/i915/i915_drv.c | 2 +-
drivers/gpu/drm/i915/i915_gem.c | 2 +-
drivers/gpu/drm/i915/i915_irq.c | 4 +-
drivers/s390/scsi/zfcp_aux.c | 2 +-
drivers/s390/scsi/zfcp_erp.c | 62 +--
drivers/s390/scsi/zfcp_fc.c | 8 +-
drivers/s390/scsi/zfcp_fsf.c | 26 +-
drivers/s390/scsi/zfcp_qdio.c | 14 +-
include/asm-generic/atomic-long.h | 263 +++++--------
include/asm-generic/atomic.h | 11 +-
include/asm-generic/atomic64.h | 4 +
include/asm-generic/barrier.h | 4 +-
include/asm-generic/qrwlock.h | 78 ++--
include/linux/atomic.h | 361 +++++++++++++++++-
include/linux/compiler.h | 7 +-
include/linux/jump_label.h | 261 ++++++++++---
include/linux/llist.h | 2 +-
kernel/futex.c | 100 ++++-
kernel/jump_label.c | 158 +++++---
kernel/locking/Makefile | 1 -
kernel/locking/qrwlock.c | 47 ++-
kernel/locking/qspinlock.c | 6 +-
kernel/locking/qspinlock_paravirt.h | 102 +++--
kernel/locking/rtmutex-tester.c | 420 ---------------------
kernel/locking/rtmutex.c | 2 +-
kernel/locking/rtmutex_common.h | 22 --
kernel/sched/core.c | 6 +-
lib/Kconfig.debug | 22 +-
lib/Makefile | 2 +
lib/atomic64.c | 3 +
lib/atomic64_test.c | 68 ++--
lib/lockref.c | 8 -
lib/test_static_key_base.c | 68 ++++
lib/test_static_keys.c | 225 +++++++++++
scripts/rt-tester/check-all.sh | 21 --
scripts/rt-tester/rt-tester.py | 218 -----------
scripts/rt-tester/t2-l1-2rt-sameprio.tst | 94 -----
scripts/rt-tester/t2-l1-pi.tst | 77 ----
scripts/rt-tester/t2-l1-signal.tst | 72 ----
scripts/rt-tester/t2-l2-2rt-deadlock.tst | 84 -----
scripts/rt-tester/t3-l1-pi-1rt.tst | 87 -----
scripts/rt-tester/t3-l1-pi-2rt.tst | 88 -----
scripts/rt-tester/t3-l1-pi-3rt.tst | 87 -----
scripts/rt-tester/t3-l1-pi-signal.tst | 93 -----
scripts/rt-tester/t3-l1-pi-steal.tst | 91 -----
scripts/rt-tester/t3-l2-pi.tst | 87 -----
scripts/rt-tester/t4-l2-pi-deboost.tst | 118 ------
.../rt-tester/t5-l4-pi-boost-deboost-setsched.tst | 178 ---------
scripts/rt-tester/t5-l4-pi-boost-deboost.tst | 138 -------
tools/testing/selftests/Makefile | 1 +
tools/testing/selftests/static_keys/Makefile | 8 +
.../selftests/static_keys/test_static_keys.sh | 16 +
139 files changed, 2425 insertions(+), 3585 deletions(-)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/