From: Greg Kroah-Hartman Date: Tue, 7 Jan 2020 18:20:51 +0000 (+0100) Subject: 4.9-stable patches X-Git-Tag: v4.14.163~10 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=35296b84121f25dfee2092158ad262c6f9189a73;p=thirdparty%2Fkernel%2Fstable-queue.git 4.9-stable patches added patches: locking-x86-remove-the-unused-atomic_inc_short-methd.patch --- diff --git a/queue-4.4/locking-x86-remove-the-unused-atomic_inc_short-methd.patch b/queue-4.4/locking-x86-remove-the-unused-atomic_inc_short-methd.patch new file mode 100644 index 00000000000..48b487785cd --- /dev/null +++ b/queue-4.4/locking-x86-remove-the-unused-atomic_inc_short-methd.patch @@ -0,0 +1,65 @@ +From 31b35f6b4d5285a311e10753f4eb17304326b211 Mon Sep 17 00:00:00 2001 +From: Dmitry Vyukov +Date: Fri, 26 May 2017 19:29:00 +0200 +Subject: locking/x86: Remove the unused atomic_inc_short() methd + +From: Dmitry Vyukov + +commit 31b35f6b4d5285a311e10753f4eb17304326b211 upstream. + +It is completely unused and implemented only on x86. +Remove it. + +Suggested-by: Mark Rutland +Signed-off-by: Dmitry Vyukov +Signed-off-by: Peter Zijlstra (Intel) +Cc: Andrew Morton +Cc: Andrey Ryabinin +Cc: H. Peter Anvin +Cc: Linus Torvalds +Cc: Peter Zijlstra +Cc: Thomas Gleixner +Link: http://lkml.kernel.org/r/20170526172900.91058-1-dvyukov@google.com +Signed-off-by: Ingo Molnar +Cc: Ben Hutchings +Signed-off-by: Greg Kroah-Hartman + +--- + arch/tile/lib/atomic_asm_32.S | 3 +-- + arch/x86/include/asm/atomic.h | 13 ------------- + 2 files changed, 1 insertion(+), 15 deletions(-) + +--- a/arch/tile/lib/atomic_asm_32.S ++++ b/arch/tile/lib/atomic_asm_32.S +@@ -24,8 +24,7 @@ + * has an opportunity to return -EFAULT to the user if needed. + * The 64-bit routines just return a "long long" with the value, + * since they are only used from kernel space and don't expect to fault. +- * Support for 16-bit ops is included in the framework but we don't provide +- * any (x86_64 has an atomic_inc_short(), so we might want to some day). ++ * Support for 16-bit ops is included in the framework but we don't provide any. + * + * Note that the caller is advised to issue a suitable L1 or L2 + * prefetch on the address being manipulated to avoid extra stalls. +--- a/arch/x86/include/asm/atomic.h ++++ b/arch/x86/include/asm/atomic.h +@@ -220,19 +220,6 @@ static __always_inline int __atomic_add_ + return c; + } + +-/** +- * atomic_inc_short - increment of a short integer +- * @v: pointer to type int +- * +- * Atomically adds 1 to @v +- * Returns the new value of @u +- */ +-static __always_inline short int atomic_inc_short(short int *v) +-{ +- asm(LOCK_PREFIX "addw $1, %0" : "+m" (*v)); +- return *v; +-} +- + #ifdef CONFIG_X86_32 + # include + #else diff --git a/queue-4.4/series b/queue-4.4/series index e439028b261..f0592a98769 100644 --- a/queue-4.4/series +++ b/queue-4.4/series @@ -30,3 +30,4 @@ ath9k_htc-modify-byte-order-for-an-error-message.patch ath9k_htc-discard-undersized-packets.patch net-add-annotations-on-hh-hh_len-lockless-accesses.patch s390-smp-fix-physical-to-logical-cpu-map-for-smt.patch +locking-x86-remove-the-unused-atomic_inc_short-methd.patch diff --git a/queue-4.9/locking-x86-remove-the-unused-atomic_inc_short-methd.patch b/queue-4.9/locking-x86-remove-the-unused-atomic_inc_short-methd.patch new file mode 100644 index 00000000000..b6e13e2f994 --- /dev/null +++ b/queue-4.9/locking-x86-remove-the-unused-atomic_inc_short-methd.patch @@ -0,0 +1,65 @@ +From 31b35f6b4d5285a311e10753f4eb17304326b211 Mon Sep 17 00:00:00 2001 +From: Dmitry Vyukov +Date: Fri, 26 May 2017 19:29:00 +0200 +Subject: locking/x86: Remove the unused atomic_inc_short() methd + +From: Dmitry Vyukov + +commit 31b35f6b4d5285a311e10753f4eb17304326b211 upstream. + +It is completely unused and implemented only on x86. +Remove it. + +Suggested-by: Mark Rutland +Signed-off-by: Dmitry Vyukov +Signed-off-by: Peter Zijlstra (Intel) +Cc: Andrew Morton +Cc: Andrey Ryabinin +Cc: H. Peter Anvin +Cc: Linus Torvalds +Cc: Peter Zijlstra +Cc: Thomas Gleixner +Link: http://lkml.kernel.org/r/20170526172900.91058-1-dvyukov@google.com +Signed-off-by: Ingo Molnar +Cc: Ben Hutchings +Signed-off-by: Greg Kroah-Hartman + +--- + arch/tile/lib/atomic_asm_32.S | 3 +-- + arch/x86/include/asm/atomic.h | 13 ------------- + 2 files changed, 1 insertion(+), 15 deletions(-) + +--- a/arch/tile/lib/atomic_asm_32.S ++++ b/arch/tile/lib/atomic_asm_32.S +@@ -24,8 +24,7 @@ + * has an opportunity to return -EFAULT to the user if needed. + * The 64-bit routines just return a "long long" with the value, + * since they are only used from kernel space and don't expect to fault. +- * Support for 16-bit ops is included in the framework but we don't provide +- * any (x86_64 has an atomic_inc_short(), so we might want to some day). ++ * Support for 16-bit ops is included in the framework but we don't provide any. + * + * Note that the caller is advised to issue a suitable L1 or L2 + * prefetch on the address being manipulated to avoid extra stalls. +--- a/arch/x86/include/asm/atomic.h ++++ b/arch/x86/include/asm/atomic.h +@@ -249,19 +249,6 @@ static __always_inline int __atomic_add_ + return c; + } + +-/** +- * atomic_inc_short - increment of a short integer +- * @v: pointer to type int +- * +- * Atomically adds 1 to @v +- * Returns the new value of @u +- */ +-static __always_inline short int atomic_inc_short(short int *v) +-{ +- asm(LOCK_PREFIX "addw $1, %0" : "+m" (*v)); +- return *v; +-} +- + #ifdef CONFIG_X86_32 + # include + #else diff --git a/queue-4.9/series b/queue-4.9/series index 43e6138adaf..1739061b3dc 100644 --- a/queue-4.9/series +++ b/queue-4.9/series @@ -51,3 +51,4 @@ ath9k_htc-discard-undersized-packets.patch net-add-annotations-on-hh-hh_len-lockless-accesses.patch s390-smp-fix-physical-to-logical-cpu-map-for-smt.patch xen-blkback-avoid-unmapping-unmapped-grant-pages.patch +locking-x86-remove-the-unused-atomic_inc_short-methd.patch