]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
Merge remote-tracking branch 'nios2/for-next'
authorStephen Rothwell <sfr@canb.auug.org.au>
Wed, 4 Nov 2015 23:32:24 +0000 (10:32 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 4 Nov 2015 23:32:24 +0000 (10:32 +1100)
arch/nios2/include/asm/cmpxchg.h
arch/nios2/kernel/setup.c

index 85938711542d89182369105c670ca785ad3f3fb9..a7978f14d157c20bc8c33697076fad55b8e57434 100644 (file)
@@ -9,53 +9,6 @@
 #ifndef _ASM_NIOS2_CMPXCHG_H
 #define _ASM_NIOS2_CMPXCHG_H
 
-#include <linux/irqflags.h>
-
-#define xchg(ptr, x)   \
-       ((__typeof__(*(ptr)))__xchg((unsigned long)(x), (ptr), sizeof(*(ptr))))
-
-struct __xchg_dummy { unsigned long a[100]; };
-#define __xg(x)                ((volatile struct __xchg_dummy *)(x))
-
-static inline unsigned long __xchg(unsigned long x, volatile void *ptr,
-                                       int size)
-{
-       unsigned long tmp, flags;
-
-       local_irq_save(flags);
-
-       switch (size) {
-       case 1:
-               __asm__ __volatile__(
-                       "ldb    %0, %2\n"
-                       "stb    %1, %2\n"
-                       : "=&r" (tmp)
-                       : "r" (x), "m" (*__xg(ptr))
-                       : "memory");
-               break;
-       case 2:
-               __asm__ __volatile__(
-                       "ldh    %0, %2\n"
-                       "sth    %1, %2\n"
-                       : "=&r" (tmp)
-                       : "r" (x), "m" (*__xg(ptr))
-                       : "memory");
-               break;
-       case 4:
-               __asm__ __volatile__(
-                       "ldw    %0, %2\n"
-                       "stw    %1, %2\n"
-                       : "=&r" (tmp)
-                       : "r" (x), "m" (*__xg(ptr))
-                       : "memory");
-               break;
-       }
-
-       local_irq_restore(flags);
-       return tmp;
-}
-
 #include <asm-generic/cmpxchg.h>
-#include <asm-generic/cmpxchg-local.h>
 
 #endif /* _ASM_NIOS2_CMPXCHG_H */
index b101a43d3c5a05ed70fa6a1bcbdb1e7aab537495..a4ff86d58d5cd74c5319e1042622dd2a58345291 100644 (file)
@@ -104,7 +104,7 @@ asmlinkage void __init nios2_boot_init(unsigned r4, unsigned r5, unsigned r6,
                                       unsigned r7)
 {
        unsigned dtb_passed = 0;
-       char cmdline_passed[COMMAND_LINE_SIZE] = { 0, };
+       char cmdline_passed[COMMAND_LINE_SIZE] __maybe_unused = { 0, };
 
 #if defined(CONFIG_NIOS2_PASS_CMDLINE)
        if (r4 == 0x534f494e) { /* r4 is magic NIOS */