aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2017-03-18 18:50:39 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2017-03-18 18:50:39 -0400
commit93afaa4513bb08e69a3d6988ab4c3bf6c7cf07d3 (patch)
treed17f6721e000eeeac1c62779ee8c127f008ac7e3
parent3e51f893de98296ba64a88d93a94d17e3df5de0b (diff)
parent363dad58e4a0f72dce0bf12d361d617239a80317 (diff)
Merge tag 'openrisc-for-linus' of git://github.com/openrisc/linux
Pull OpenRISC fixes from Stafford Horne: "OpenRISC fixes for build issues that were exposed by kbuild robots after 4.11 merge. All from allmodconfig builds. This includes: - bug in the handling of 8-byte get_user() calls - module build failure due to multile missing symbol exports" * tag 'openrisc-for-linus' of git://github.com/openrisc/linux: openrisc: Export symbols needed by modules openrisc: fix issue handling 8 byte get_user calls openrisc: xchg: fix `computed is not used` warning
-rw-r--r--arch/openrisc/include/asm/cmpxchg.h8
-rw-r--r--arch/openrisc/include/asm/uaccess.h2
-rw-r--r--arch/openrisc/kernel/or32_ksyms.c4
-rw-r--r--arch/openrisc/kernel/process.c1
4 files changed, 12 insertions, 3 deletions
diff --git a/arch/openrisc/include/asm/cmpxchg.h b/arch/openrisc/include/asm/cmpxchg.h
index 5fcb9ac72693..f0a5d8b844d6 100644
--- a/arch/openrisc/include/asm/cmpxchg.h
+++ b/arch/openrisc/include/asm/cmpxchg.h
@@ -77,7 +77,11 @@ static inline unsigned long __xchg(unsigned long val, volatile void *ptr,
77 return val; 77 return val;
78} 78}
79 79
80#define xchg(ptr, with) \ 80#define xchg(ptr, with) \
81 ((typeof(*(ptr)))__xchg((unsigned long)(with), (ptr), sizeof(*(ptr)))) 81 ({ \
82 (__typeof__(*(ptr))) __xchg((unsigned long)(with), \
83 (ptr), \
84 sizeof(*(ptr))); \
85 })
82 86
83#endif /* __ASM_OPENRISC_CMPXCHG_H */ 87#endif /* __ASM_OPENRISC_CMPXCHG_H */
diff --git a/arch/openrisc/include/asm/uaccess.h b/arch/openrisc/include/asm/uaccess.h
index 140faa16685a..1311e6b13991 100644
--- a/arch/openrisc/include/asm/uaccess.h
+++ b/arch/openrisc/include/asm/uaccess.h
@@ -211,7 +211,7 @@ do { \
211 case 1: __get_user_asm(x, ptr, retval, "l.lbz"); break; \ 211 case 1: __get_user_asm(x, ptr, retval, "l.lbz"); break; \
212 case 2: __get_user_asm(x, ptr, retval, "l.lhz"); break; \ 212 case 2: __get_user_asm(x, ptr, retval, "l.lhz"); break; \
213 case 4: __get_user_asm(x, ptr, retval, "l.lwz"); break; \ 213 case 4: __get_user_asm(x, ptr, retval, "l.lwz"); break; \
214 case 8: __get_user_asm2(x, ptr, retval); \ 214 case 8: __get_user_asm2(x, ptr, retval); break; \
215 default: (x) = __get_user_bad(); \ 215 default: (x) = __get_user_bad(); \
216 } \ 216 } \
217} while (0) 217} while (0)
diff --git a/arch/openrisc/kernel/or32_ksyms.c b/arch/openrisc/kernel/or32_ksyms.c
index 5c4695d13542..ee3e604959e1 100644
--- a/arch/openrisc/kernel/or32_ksyms.c
+++ b/arch/openrisc/kernel/or32_ksyms.c
@@ -30,6 +30,7 @@
30#include <asm/hardirq.h> 30#include <asm/hardirq.h>
31#include <asm/delay.h> 31#include <asm/delay.h>
32#include <asm/pgalloc.h> 32#include <asm/pgalloc.h>
33#include <asm/pgtable.h>
33 34
34#define DECLARE_EXPORT(name) extern void name(void); EXPORT_SYMBOL(name) 35#define DECLARE_EXPORT(name) extern void name(void); EXPORT_SYMBOL(name)
35 36
@@ -42,6 +43,9 @@ DECLARE_EXPORT(__muldi3);
42DECLARE_EXPORT(__ashrdi3); 43DECLARE_EXPORT(__ashrdi3);
43DECLARE_EXPORT(__ashldi3); 44DECLARE_EXPORT(__ashldi3);
44DECLARE_EXPORT(__lshrdi3); 45DECLARE_EXPORT(__lshrdi3);
46DECLARE_EXPORT(__ucmpdi2);
45 47
48EXPORT_SYMBOL(empty_zero_page);
46EXPORT_SYMBOL(__copy_tofrom_user); 49EXPORT_SYMBOL(__copy_tofrom_user);
50EXPORT_SYMBOL(__clear_user);
47EXPORT_SYMBOL(memset); 51EXPORT_SYMBOL(memset);
diff --git a/arch/openrisc/kernel/process.c b/arch/openrisc/kernel/process.c
index 828a29110459..f8da545854f9 100644
--- a/arch/openrisc/kernel/process.c
+++ b/arch/openrisc/kernel/process.c
@@ -90,6 +90,7 @@ void arch_cpu_idle(void)
90} 90}
91 91
92void (*pm_power_off) (void) = machine_power_off; 92void (*pm_power_off) (void) = machine_power_off;
93EXPORT_SYMBOL(pm_power_off);
93 94
94/* 95/*
95 * When a process does an "exec", machine state like FPU and debug 96 * When a process does an "exec", machine state like FPU and debug