From: Greg Kroah-Hartman Date: Mon, 20 Nov 2017 15:16:55 +0000 (+0100) Subject: 4.14-stable patches X-Git-Tag: v3.18.83~3 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=909389382621ef03d8e10fc1546aa957749bbbd6;p=thirdparty%2Fkernel%2Fstable-queue.git 4.14-stable patches added patches: sparc32-add-cmpxchg64.patch sparc64-mmu_context-add-missing-include-files.patch --- diff --git a/queue-4.14/series b/queue-4.14/series index 7385813f041..5f6d1efc1e7 100644 --- a/queue-4.14/series +++ b/queue-4.14/series @@ -29,3 +29,5 @@ staging-greybus-spilib-fix-use-after-free-after-deregistration.patch staging-vboxvideo-fix-reporting-invalid-suggested-offset-properties.patch staging-rtl8188eu-revert-4-commits-breaking-arp.patch spi-fix-use-after-free-at-controller-deregistration.patch +sparc32-add-cmpxchg64.patch +sparc64-mmu_context-add-missing-include-files.patch diff --git a/queue-4.14/sparc32-add-cmpxchg64.patch b/queue-4.14/sparc32-add-cmpxchg64.patch new file mode 100644 index 00000000000..67829a81227 --- /dev/null +++ b/queue-4.14/sparc32-add-cmpxchg64.patch @@ -0,0 +1,55 @@ +From 23198ddffb6cddb5d5824230af4dd4b46e4046a4 Mon Sep 17 00:00:00 2001 +From: "David S. Miller" +Date: Wed, 27 Sep 2017 22:38:19 -0700 +Subject: sparc32: Add cmpxchg64(). + +From: David S. Miller + +commit 23198ddffb6cddb5d5824230af4dd4b46e4046a4 upstream. + +This fixes the build with i40e driver enabled. + +Reported-by: Guenter Roeck +Signed-off-by: David S. Miller +Signed-off-by: Greg Kroah-Hartman + +--- + arch/sparc/include/asm/cmpxchg_32.h | 3 +++ + arch/sparc/lib/atomic32.c | 14 ++++++++++++++ + 2 files changed, 17 insertions(+) + +--- a/arch/sparc/include/asm/cmpxchg_32.h ++++ b/arch/sparc/include/asm/cmpxchg_32.h +@@ -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 + + /* +--- a/arch/sparc/lib/atomic32.c ++++ b/arch/sparc/lib/atomic32.c +@@ -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; diff --git a/queue-4.14/sparc64-mmu_context-add-missing-include-files.patch b/queue-4.14/sparc64-mmu_context-add-missing-include-files.patch new file mode 100644 index 00000000000..34c54db1a4c --- /dev/null +++ b/queue-4.14/sparc64-mmu_context-add-missing-include-files.patch @@ -0,0 +1,46 @@ +From 01c3f0a42a2a0ff0c3fed80a1a25f2641ae72554 Mon Sep 17 00:00:00 2001 +From: Guenter Roeck +Date: Sun, 10 Sep 2017 13:44:47 -0700 +Subject: sparc64: mmu_context: Add missing include files + +From: Guenter Roeck + +commit 01c3f0a42a2a0ff0c3fed80a1a25f2641ae72554 upstream. + +Fix the following build errors. + +In file included from arch/sparc/include/asm/mmu_context.h:4:0, + from include/linux/mmu_context.h:4, + from drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h:29, + from drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c:23: +arch/sparc/include/asm/mmu_context_64.h:22:37: error: + unknown type name 'per_cpu_secondary_mm' + +arch/sparc/include/asm/mmu_context_64.h: In function 'switch_mm': +arch/sparc/include/asm/mmu_context_64.h:79:2: error: + implicit declaration of function 'smp_processor_id' + +Fixes: 70539bd79500 ("drm/amd: Update MEC HQD loading code for KFD") +Signed-off-by: Guenter Roeck +Acked-by: Oded Gabbay +Signed-off-by: David S. Miller +Signed-off-by: Greg Kroah-Hartman + +--- + arch/sparc/include/asm/mmu_context_64.h | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/arch/sparc/include/asm/mmu_context_64.h ++++ b/arch/sparc/include/asm/mmu_context_64.h +@@ -8,9 +8,11 @@ + + #include + #include ++#include + + #include + #include ++#include + + static inline void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk) + {