Patch "sparc32: Add cmpxchg64()." has been added to the 4.14-stable tree
Subsystems (2)
This is a note to let you know that I've just added the patch titled
sparc32: Add cmpxchg64().
to the 4.14-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
sparc32-add-cmpxchg64.patch
and it can be found in the queue-4.14 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From
23198ddffb6cddb5d5824230af4dd4b46e4046a4Mon Sep 17 00:00:00 2001
From: "David S. Miller" <[email protected]>
Date: Wed, 27 Sep 2017 22:38:19 -0700
Subject: sparc32: Add cmpxchg64().
From: David S. Miller <[email protected]>
commit 23198ddffb6cddb5d5824230af4dd4b46e4046a4 upstream.
This fixes the build with i40e driver enabled.
--- arch/sparc/include/asm/cmpxchg_32.h | 3 +++ arch/sparc/lib/atomic32.c | 14 ++++++++++++++ 2 files changed, 17 insertions(+)
arch/sparc/include/asm/cmpxchg_32.h +3 -0
@@ -63,6 +63,9 @@ __cmpxchg(volatile void *ptr, unsigned l (unsigned long)_n_, sizeof(*(ptr))); \ }) +u64 __cmpxchg_u64 (u64 *ptr,u64 old,u64 new); +#define cmpxchg64 (ptr, old, new) __cmpxchg_u64(ptr, old, new) +#include <asm-generic/cmpxchg-local.h> /*
arch/sparc/lib/atomic32.c +14 -0
@@ -173,6 +173,20 @@ unsigned long __cmpxchg_u32(volatile u32 }EXPORT_SYMBOL (__cmpxchg_u32); +u64 __cmpxchg_u64 (u64 *ptr,u64 old,u64 new) +{ +unsigned long flags; +u64 prev; + +spin_lock_irqsave (ATOMIC_HASH (ptr), flags); +if ((prev = *ptr) == old) + *ptr = new; +spin_unlock_irqrestore (ATOMIC_HASH (ptr), flags); + +return prev; +} +EXPORT_SYMBOL (__cmpxchg_u64); +unsigned long __xchg_u32 (volatile u32 *ptr,u32 new) {unsigned long flags;
Patches currently in stable-queue which might be from [email protected] are
queue-4.14/sparc64-mmu_context-add-missing-include-files.patch queue-4.14/sparc32-add-cmpxchg64.patch