aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2015-02-10 16:51:06 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2015-02-10 16:51:06 -0500
commit98368ab436538103a557fc1f15f54afd8aab6712 (patch)
tree47d184f6117f96abf2f6f828db71b1d56b30313b
parentab0475df5ce45d80a9e5f056cbad3a58e4930206 (diff)
parenta01d37d914f98c430854bbae2402e6f51d9a8d0b (diff)
Merge tag 'microblaze-3.20-rc1' of git://git.monstr.eu/linux-2.6-microblaze
Pull Microblaze pupdates from Michal Simek: - Remove various compilation errors - Various code cleanup patches - Add missing MB versions/architectures for autodetection * tag 'microblaze-3.20-rc1' of git://git.monstr.eu/linux-2.6-microblaze: microblaze: Remove *.dtb files in make clean microblaze: whitespace fix microblaze/uaccess: fix sparse errors microblaze: intc: Reformat output microblaze: intc: Refactor DT sanity check microblaze: intc: Don't override error codes microblaze: Add target architecture microblaze: Add missing PVR version codes microblaze: Fix variable types to remove W=1 warning microblaze: Use unsigned type for limit comparison in cache.c microblaze: Use unsigned type for proper comparison in cpuinfo*.c microblaze: Use unsigned type for "for" loop because of comparison-kgdb.c microblaze: Change extern inline to static inline microblaze: Mark get_frame_size as static microblaze: Use unsigned return type in do_syscall_trace_enter microblaze: Declare microblaze_kgdb_break in header microblaze: Remove unused prom header from reset.c microblaze: Remove unused prom_parse.c microblaze: Wire-up execveat syscall microblaze: Use empty asm-generic/linkage.h
-rw-r--r--arch/microblaze/boot/Makefile3
-rw-r--r--arch/microblaze/boot/dts/Makefile2
-rw-r--r--arch/microblaze/include/asm/delay.h4
-rw-r--r--arch/microblaze/include/asm/kgdb.h3
-rw-r--r--arch/microblaze/include/asm/linkage.h16
-rw-r--r--arch/microblaze/include/asm/pgalloc.h14
-rw-r--r--arch/microblaze/include/asm/syscall.h2
-rw-r--r--arch/microblaze/include/asm/uaccess.h6
-rw-r--r--arch/microblaze/include/asm/unistd.h2
-rw-r--r--arch/microblaze/include/uapi/asm/unistd.h1
-rw-r--r--arch/microblaze/kernel/Makefile2
-rw-r--r--arch/microblaze/kernel/cpu/cache.c6
-rw-r--r--arch/microblaze/kernel/cpu/cpuinfo-pvr-full.c2
-rw-r--r--arch/microblaze/kernel/cpu/cpuinfo-static.c2
-rw-r--r--arch/microblaze/kernel/cpu/cpuinfo.c7
-rw-r--r--arch/microblaze/kernel/intc.c8
-rw-r--r--arch/microblaze/kernel/kgdb.c10
-rw-r--r--arch/microblaze/kernel/prom_parse.c35
-rw-r--r--arch/microblaze/kernel/ptrace.c4
-rw-r--r--arch/microblaze/kernel/reset.c1
-rw-r--r--arch/microblaze/kernel/signal.c4
-rw-r--r--arch/microblaze/kernel/syscall_table.S1
-rw-r--r--arch/microblaze/kernel/unwind.c2
23 files changed, 49 insertions, 88 deletions
diff --git a/arch/microblaze/boot/Makefile b/arch/microblaze/boot/Makefile
index 8e211cc28dac..91d2068da1b9 100644
--- a/arch/microblaze/boot/Makefile
+++ b/arch/microblaze/boot/Makefile
@@ -34,5 +34,4 @@ $(obj)/simpleImage.%: vmlinux FORCE
34 $(call if_changed,strip) 34 $(call if_changed,strip)
35 @echo 'Kernel: $@ is ready' ' (#'`cat .version`')' 35 @echo 'Kernel: $@ is ready' ' (#'`cat .version`')'
36 36
37 37clean-files += simpleImage.*.unstrip linux.bin.ub dts/*.dtb
38clean-files += simpleImage.*.unstrip linux.bin.ub
diff --git a/arch/microblaze/boot/dts/Makefile b/arch/microblaze/boot/dts/Makefile
index c4982d16e555..a3d2e42c3c97 100644
--- a/arch/microblaze/boot/dts/Makefile
+++ b/arch/microblaze/boot/dts/Makefile
@@ -16,5 +16,3 @@ quiet_cmd_cp = CP $< $@$2
16 16
17# Rule to build device tree blobs 17# Rule to build device tree blobs
18DTC_FLAGS := -p 1024 18DTC_FLAGS := -p 1024
19
20clean-files += *.dtb
diff --git a/arch/microblaze/include/asm/delay.h b/arch/microblaze/include/asm/delay.h
index 60cb39deb533..ea2a9cd9b159 100644
--- a/arch/microblaze/include/asm/delay.h
+++ b/arch/microblaze/include/asm/delay.h
@@ -15,7 +15,7 @@
15 15
16#include <linux/param.h> 16#include <linux/param.h>
17 17
18extern inline void __delay(unsigned long loops) 18static inline void __delay(unsigned long loops)
19{ 19{
20 asm volatile ("# __delay \n\t" \ 20 asm volatile ("# __delay \n\t" \
21 "1: addi %0, %0, -1\t\n" \ 21 "1: addi %0, %0, -1\t\n" \
@@ -43,7 +43,7 @@ extern inline void __delay(unsigned long loops)
43 43
44extern unsigned long loops_per_jiffy; 44extern unsigned long loops_per_jiffy;
45 45
46extern inline void __udelay(unsigned int x) 46static inline void __udelay(unsigned int x)
47{ 47{
48 48
49 unsigned long long tmp = 49 unsigned long long tmp =
diff --git a/arch/microblaze/include/asm/kgdb.h b/arch/microblaze/include/asm/kgdb.h
index 78b17d40b235..ad27acb2b15f 100644
--- a/arch/microblaze/include/asm/kgdb.h
+++ b/arch/microblaze/include/asm/kgdb.h
@@ -23,6 +23,9 @@ static inline void arch_kgdb_breakpoint(void)
23 __asm__ __volatile__("brki r16, 0x18;"); 23 __asm__ __volatile__("brki r16, 0x18;");
24} 24}
25 25
26struct pt_regs;
27asmlinkage void microblaze_kgdb_break(struct pt_regs *regs);
28
26#endif /* __ASSEMBLY__ */ 29#endif /* __ASSEMBLY__ */
27#endif /* __MICROBLAZE_KGDB_H__ */ 30#endif /* __MICROBLAZE_KGDB_H__ */
28#endif /* __KERNEL__ */ 31#endif /* __KERNEL__ */
diff --git a/arch/microblaze/include/asm/linkage.h b/arch/microblaze/include/asm/linkage.h
index 3a8e36d057eb..0540bbaad897 100644
--- a/arch/microblaze/include/asm/linkage.h
+++ b/arch/microblaze/include/asm/linkage.h
@@ -1,15 +1 @@
1/* #include <asm-generic/linkage.h>
2 * Copyright (C) 2006 Atmark Techno, Inc.
3 *
4 * This file is subject to the terms and conditions of the GNU General Public
5 * License. See the file "COPYING" in the main directory of this archive
6 * for more details.
7 */
8
9#ifndef _ASM_MICROBLAZE_LINKAGE_H
10#define _ASM_MICROBLAZE_LINKAGE_H
11
12#define __ALIGN .align 4
13#define __ALIGN_STR ".align 4"
14
15#endif /* _ASM_MICROBLAZE_LINKAGE_H */
diff --git a/arch/microblaze/include/asm/pgalloc.h b/arch/microblaze/include/asm/pgalloc.h
index 7fdf7fabc7d7..61436d69775c 100644
--- a/arch/microblaze/include/asm/pgalloc.h
+++ b/arch/microblaze/include/asm/pgalloc.h
@@ -60,7 +60,7 @@ extern unsigned long get_zero_page_fast(void);
60 60
61extern void __bad_pte(pmd_t *pmd); 61extern void __bad_pte(pmd_t *pmd);
62 62
63extern inline pgd_t *get_pgd_slow(void) 63static inline pgd_t *get_pgd_slow(void)
64{ 64{
65 pgd_t *ret; 65 pgd_t *ret;
66 66
@@ -70,7 +70,7 @@ extern inline pgd_t *get_pgd_slow(void)
70 return ret; 70 return ret;
71} 71}
72 72
73extern inline pgd_t *get_pgd_fast(void) 73static inline pgd_t *get_pgd_fast(void)
74{ 74{
75 unsigned long *ret; 75 unsigned long *ret;
76 76
@@ -84,14 +84,14 @@ extern inline pgd_t *get_pgd_fast(void)
84 return (pgd_t *)ret; 84 return (pgd_t *)ret;
85} 85}
86 86
87extern inline void free_pgd_fast(pgd_t *pgd) 87static inline void free_pgd_fast(pgd_t *pgd)
88{ 88{
89 *(unsigned long **)pgd = pgd_quicklist; 89 *(unsigned long **)pgd = pgd_quicklist;
90 pgd_quicklist = (unsigned long *) pgd; 90 pgd_quicklist = (unsigned long *) pgd;
91 pgtable_cache_size++; 91 pgtable_cache_size++;
92} 92}
93 93
94extern inline void free_pgd_slow(pgd_t *pgd) 94static inline void free_pgd_slow(pgd_t *pgd)
95{ 95{
96 free_page((unsigned long)pgd); 96 free_page((unsigned long)pgd);
97} 97}
@@ -146,19 +146,19 @@ static inline pte_t *pte_alloc_one_fast(struct mm_struct *mm,
146 return (pte_t *)ret; 146 return (pte_t *)ret;
147} 147}
148 148
149extern inline void pte_free_fast(pte_t *pte) 149static inline void pte_free_fast(pte_t *pte)
150{ 150{
151 *(unsigned long **)pte = pte_quicklist; 151 *(unsigned long **)pte = pte_quicklist;
152 pte_quicklist = (unsigned long *) pte; 152 pte_quicklist = (unsigned long *) pte;
153 pgtable_cache_size++; 153 pgtable_cache_size++;
154} 154}
155 155
156extern inline void pte_free_kernel(struct mm_struct *mm, pte_t *pte) 156static inline void pte_free_kernel(struct mm_struct *mm, pte_t *pte)
157{ 157{
158 free_page((unsigned long)pte); 158 free_page((unsigned long)pte);
159} 159}
160 160
161extern inline void pte_free_slow(struct page *ptepage) 161static inline void pte_free_slow(struct page *ptepage)
162{ 162{
163 __free_page(ptepage); 163 __free_page(ptepage);
164} 164}
diff --git a/arch/microblaze/include/asm/syscall.h b/arch/microblaze/include/asm/syscall.h
index 53cfaf34c343..04a5bece8168 100644
--- a/arch/microblaze/include/asm/syscall.h
+++ b/arch/microblaze/include/asm/syscall.h
@@ -97,7 +97,7 @@ static inline void syscall_set_arguments(struct task_struct *task,
97 microblaze_set_syscall_arg(regs, i++, *args++); 97 microblaze_set_syscall_arg(regs, i++, *args++);
98} 98}
99 99
100asmlinkage long do_syscall_trace_enter(struct pt_regs *regs); 100asmlinkage unsigned long do_syscall_trace_enter(struct pt_regs *regs);
101asmlinkage void do_syscall_trace_leave(struct pt_regs *regs); 101asmlinkage void do_syscall_trace_leave(struct pt_regs *regs);
102 102
103static inline int syscall_get_arch(void) 103static inline int syscall_get_arch(void)
diff --git a/arch/microblaze/include/asm/uaccess.h b/arch/microblaze/include/asm/uaccess.h
index 59a89a64a865..62942fd12672 100644
--- a/arch/microblaze/include/asm/uaccess.h
+++ b/arch/microblaze/include/asm/uaccess.h
@@ -220,7 +220,7 @@ extern long __user_bad(void);
220 } else { \ 220 } else { \
221 __gu_err = -EFAULT; \ 221 __gu_err = -EFAULT; \
222 } \ 222 } \
223 x = (typeof(*(ptr)))__gu_val; \ 223 x = (__force typeof(*(ptr)))__gu_val; \
224 __gu_err; \ 224 __gu_err; \
225}) 225})
226 226
@@ -242,7 +242,7 @@ extern long __user_bad(void);
242 default: \ 242 default: \
243 /* __gu_val = 0; __gu_err = -EINVAL;*/ __gu_err = __user_bad();\ 243 /* __gu_val = 0; __gu_err = -EINVAL;*/ __gu_err = __user_bad();\
244 } \ 244 } \
245 x = (__typeof__(*(ptr))) __gu_val; \ 245 x = (__force __typeof__(*(ptr))) __gu_val; \
246 __gu_err; \ 246 __gu_err; \
247}) 247})
248 248
@@ -306,7 +306,7 @@ extern long __user_bad(void);
306 306
307#define __put_user_check(x, ptr, size) \ 307#define __put_user_check(x, ptr, size) \
308({ \ 308({ \
309 typeof(*(ptr)) volatile __pu_val = x; \ 309 typeof(*(ptr)) volatile __pu_val = x; \
310 typeof(*(ptr)) __user *__pu_addr = (ptr); \ 310 typeof(*(ptr)) __user *__pu_addr = (ptr); \
311 int __pu_err = 0; \ 311 int __pu_err = 0; \
312 \ 312 \
diff --git a/arch/microblaze/include/asm/unistd.h b/arch/microblaze/include/asm/unistd.h
index 0a53362d5548..76ed17b56fea 100644
--- a/arch/microblaze/include/asm/unistd.h
+++ b/arch/microblaze/include/asm/unistd.h
@@ -38,6 +38,6 @@
38 38
39#endif /* __ASSEMBLY__ */ 39#endif /* __ASSEMBLY__ */
40 40
41#define __NR_syscalls 388 41#define __NR_syscalls 389
42 42
43#endif /* _ASM_MICROBLAZE_UNISTD_H */ 43#endif /* _ASM_MICROBLAZE_UNISTD_H */
diff --git a/arch/microblaze/include/uapi/asm/unistd.h b/arch/microblaze/include/uapi/asm/unistd.h
index c712677f8a2a..32850c73be09 100644
--- a/arch/microblaze/include/uapi/asm/unistd.h
+++ b/arch/microblaze/include/uapi/asm/unistd.h
@@ -403,5 +403,6 @@
403#define __NR_getrandom 385 403#define __NR_getrandom 385
404#define __NR_memfd_create 386 404#define __NR_memfd_create 386
405#define __NR_bpf 387 405#define __NR_bpf 387
406#define __NR_execveat 388
406 407
407#endif /* _UAPI_ASM_MICROBLAZE_UNISTD_H */ 408#endif /* _UAPI_ASM_MICROBLAZE_UNISTD_H */
diff --git a/arch/microblaze/kernel/Makefile b/arch/microblaze/kernel/Makefile
index 08d50cc55e7d..f08bacaf8a95 100644
--- a/arch/microblaze/kernel/Makefile
+++ b/arch/microblaze/kernel/Makefile
@@ -16,7 +16,7 @@ extra-y := head.o vmlinux.lds
16 16
17obj-y += dma.o exceptions.o \ 17obj-y += dma.o exceptions.o \
18 hw_exception_handler.o intc.o irq.o \ 18 hw_exception_handler.o intc.o irq.o \
19 platform.o process.o prom.o prom_parse.o ptrace.o \ 19 platform.o process.o prom.o ptrace.o \
20 reset.o setup.o signal.o sys_microblaze.o timer.o traps.o unwind.o 20 reset.o setup.o signal.o sys_microblaze.o timer.o traps.o unwind.o
21 21
22obj-y += cpu/ 22obj-y += cpu/
diff --git a/arch/microblaze/kernel/cpu/cache.c b/arch/microblaze/kernel/cpu/cache.c
index a6e44410672d..0bde47e4fa69 100644
--- a/arch/microblaze/kernel/cpu/cache.c
+++ b/arch/microblaze/kernel/cpu/cache.c
@@ -140,10 +140,10 @@ do { \
140/* It is used only first parameter for OP - for wic, wdc */ 140/* It is used only first parameter for OP - for wic, wdc */
141#define CACHE_RANGE_LOOP_1(start, end, line_length, op) \ 141#define CACHE_RANGE_LOOP_1(start, end, line_length, op) \
142do { \ 142do { \
143 int volatile temp = 0; \ 143 unsigned int volatile temp = 0; \
144 int align = ~(line_length - 1); \ 144 unsigned int align = ~(line_length - 1); \
145 end = ((end & align) == end) ? end - line_length : end & align; \ 145 end = ((end & align) == end) ? end - line_length : end & align; \
146 WARN_ON(end - start < 0); \ 146 WARN_ON(end < start); \
147 \ 147 \
148 __asm__ __volatile__ (" 1: " #op " %1, r0;" \ 148 __asm__ __volatile__ (" 1: " #op " %1, r0;" \
149 "cmpu %0, %1, %2;" \ 149 "cmpu %0, %1, %2;" \
diff --git a/arch/microblaze/kernel/cpu/cpuinfo-pvr-full.c b/arch/microblaze/kernel/cpu/cpuinfo-pvr-full.c
index 93c26cf50de5..a32daec96c12 100644
--- a/arch/microblaze/kernel/cpu/cpuinfo-pvr-full.c
+++ b/arch/microblaze/kernel/cpu/cpuinfo-pvr-full.c
@@ -33,7 +33,7 @@
33void set_cpuinfo_pvr_full(struct cpuinfo *ci, struct device_node *cpu) 33void set_cpuinfo_pvr_full(struct cpuinfo *ci, struct device_node *cpu)
34{ 34{
35 struct pvr_s pvr; 35 struct pvr_s pvr;
36 int temp; /* for saving temp value */ 36 u32 temp; /* for saving temp value */
37 get_pvr(&pvr); 37 get_pvr(&pvr);
38 38
39 CI(ver_code, VERSION); 39 CI(ver_code, VERSION);
diff --git a/arch/microblaze/kernel/cpu/cpuinfo-static.c b/arch/microblaze/kernel/cpu/cpuinfo-static.c
index 4854285b26e7..85dbda4a08a8 100644
--- a/arch/microblaze/kernel/cpu/cpuinfo-static.c
+++ b/arch/microblaze/kernel/cpu/cpuinfo-static.c
@@ -22,7 +22,7 @@ static const char cpu_ver_string[] = CONFIG_XILINX_MICROBLAZE0_HW_VER;
22 22
23void __init set_cpuinfo_static(struct cpuinfo *ci, struct device_node *cpu) 23void __init set_cpuinfo_static(struct cpuinfo *ci, struct device_node *cpu)
24{ 24{
25 int i = 0; 25 u32 i = 0;
26 26
27 ci->use_instr = 27 ci->use_instr =
28 (fcpu(cpu, "xlnx,use-barrel") ? PVR0_USE_BARREL_MASK : 0) | 28 (fcpu(cpu, "xlnx,use-barrel") ? PVR0_USE_BARREL_MASK : 0) |
diff --git a/arch/microblaze/kernel/cpu/cpuinfo.c b/arch/microblaze/kernel/cpu/cpuinfo.c
index 234acad79b9e..d1dd6e83d59b 100644
--- a/arch/microblaze/kernel/cpu/cpuinfo.c
+++ b/arch/microblaze/kernel/cpu/cpuinfo.c
@@ -41,8 +41,12 @@ const struct cpu_ver_key cpu_ver_lookup[] = {
41 {"8.40.a", 0x18}, 41 {"8.40.a", 0x18},
42 {"8.40.b", 0x19}, 42 {"8.40.b", 0x19},
43 {"8.50.a", 0x1a}, 43 {"8.50.a", 0x1a},
44 {"8.50.b", 0x1c},
45 {"8.50.c", 0x1e},
44 {"9.0", 0x1b}, 46 {"9.0", 0x1b},
45 {"9.1", 0x1d}, 47 {"9.1", 0x1d},
48 {"9.2", 0x1f},
49 {"9.3", 0x20},
46 {NULL, 0}, 50 {NULL, 0},
47}; 51};
48 52
@@ -61,11 +65,14 @@ const struct family_string_key family_string_lookup[] = {
61 {"spartan3adsp", 0xc}, 65 {"spartan3adsp", 0xc},
62 {"spartan6", 0xd}, 66 {"spartan6", 0xd},
63 {"virtex6", 0xe}, 67 {"virtex6", 0xe},
68 {"virtex7", 0xf},
64 /* FIXME There is no key code defined for spartan2 */ 69 /* FIXME There is no key code defined for spartan2 */
65 {"spartan2", 0xf0}, 70 {"spartan2", 0xf0},
66 {"kintex7", 0x10}, 71 {"kintex7", 0x10},
67 {"artix7", 0x11}, 72 {"artix7", 0x11},
68 {"zynq7000", 0x12}, 73 {"zynq7000", 0x12},
74 {"UltraScale Virtex", 0x13},
75 {"UltraScale Kintex", 0x14},
69 {NULL, 0}, 76 {NULL, 0},
70}; 77};
71 78
diff --git a/arch/microblaze/kernel/intc.c b/arch/microblaze/kernel/intc.c
index 15c7c12ea0e7..719feee1e043 100644
--- a/arch/microblaze/kernel/intc.c
+++ b/arch/microblaze/kernel/intc.c
@@ -148,17 +148,17 @@ static int __init xilinx_intc_of_init(struct device_node *intc,
148 ret = of_property_read_u32(intc, "xlnx,num-intr-inputs", &nr_irq); 148 ret = of_property_read_u32(intc, "xlnx,num-intr-inputs", &nr_irq);
149 if (ret < 0) { 149 if (ret < 0) {
150 pr_err("%s: unable to read xlnx,num-intr-inputs\n", __func__); 150 pr_err("%s: unable to read xlnx,num-intr-inputs\n", __func__);
151 return -EINVAL; 151 return ret;
152 } 152 }
153 153
154 ret = of_property_read_u32(intc, "xlnx,kind-of-intr", &intr_mask); 154 ret = of_property_read_u32(intc, "xlnx,kind-of-intr", &intr_mask);
155 if (ret < 0) { 155 if (ret < 0) {
156 pr_err("%s: unable to read xlnx,kind-of-intr\n", __func__); 156 pr_err("%s: unable to read xlnx,kind-of-intr\n", __func__);
157 return -EINVAL; 157 return ret;
158 } 158 }
159 159
160 if (intr_mask > (u32)((1ULL << nr_irq) - 1)) 160 if (intr_mask >> nr_irq)
161 pr_info(" ERROR: Mismatch in kind-of-intr param\n"); 161 pr_warn("%s: mismatch in kind-of-intr param\n", __func__);
162 162
163 pr_info("%s: num_irq=%d, edge=0x%x\n", 163 pr_info("%s: num_irq=%d, edge=0x%x\n",
164 intc->full_name, nr_irq, intr_mask); 164 intc->full_name, nr_irq, intr_mask);
diff --git a/arch/microblaze/kernel/kgdb.c b/arch/microblaze/kernel/kgdb.c
index 09a5e8286137..8736af5806ae 100644
--- a/arch/microblaze/kernel/kgdb.c
+++ b/arch/microblaze/kernel/kgdb.c
@@ -12,6 +12,7 @@
12#include <linux/io.h> 12#include <linux/io.h>
13#include <asm/cacheflush.h> 13#include <asm/cacheflush.h>
14#include <asm/asm-offsets.h> 14#include <asm/asm-offsets.h>
15#include <asm/kgdb.h>
15#include <asm/pvr.h> 16#include <asm/pvr.h>
16 17
17#define GDB_REG 0 18#define GDB_REG 0
@@ -35,9 +36,10 @@ struct pvr_s pvr;
35 36
36void pt_regs_to_gdb_regs(unsigned long *gdb_regs, struct pt_regs *regs) 37void pt_regs_to_gdb_regs(unsigned long *gdb_regs, struct pt_regs *regs)
37{ 38{
38 int i; 39 unsigned int i;
39 unsigned long *pt_regb = (unsigned long *)regs; 40 unsigned long *pt_regb = (unsigned long *)regs;
40 int temp; 41 int temp;
42
41 /* registers r0 - r31, pc, msr, ear, esr, fsr + do not save pt_mode */ 43 /* registers r0 - r31, pc, msr, ear, esr, fsr + do not save pt_mode */
42 for (i = 0; i < (sizeof(struct pt_regs) / 4) - 1; i++) 44 for (i = 0; i < (sizeof(struct pt_regs) / 4) - 1; i++)
43 gdb_regs[i] = pt_regb[i]; 45 gdb_regs[i] = pt_regb[i];
@@ -67,7 +69,7 @@ void pt_regs_to_gdb_regs(unsigned long *gdb_regs, struct pt_regs *regs)
67 69
68void gdb_regs_to_pt_regs(unsigned long *gdb_regs, struct pt_regs *regs) 70void gdb_regs_to_pt_regs(unsigned long *gdb_regs, struct pt_regs *regs)
69{ 71{
70 int i; 72 unsigned int i;
71 unsigned long *pt_regb = (unsigned long *)regs; 73 unsigned long *pt_regb = (unsigned long *)regs;
72 74
73 /* pt_regs and gdb_regs have the same 37 values. 75 /* pt_regs and gdb_regs have the same 37 values.
@@ -77,7 +79,7 @@ void gdb_regs_to_pt_regs(unsigned long *gdb_regs, struct pt_regs *regs)
77 pt_regb[i] = gdb_regs[i]; 79 pt_regb[i] = gdb_regs[i];
78} 80}
79 81
80void microblaze_kgdb_break(struct pt_regs *regs) 82asmlinkage void microblaze_kgdb_break(struct pt_regs *regs)
81{ 83{
82 if (kgdb_handle_exception(1, SIGTRAP, 0, regs) != 0) 84 if (kgdb_handle_exception(1, SIGTRAP, 0, regs) != 0)
83 return; 85 return;
@@ -91,7 +93,7 @@ void microblaze_kgdb_break(struct pt_regs *regs)
91/* untested */ 93/* untested */
92void sleeping_thread_to_gdb_regs(unsigned long *gdb_regs, struct task_struct *p) 94void sleeping_thread_to_gdb_regs(unsigned long *gdb_regs, struct task_struct *p)
93{ 95{
94 int i; 96 unsigned int i;
95 unsigned long *pt_regb = (unsigned long *)(p->thread.regs); 97 unsigned long *pt_regb = (unsigned long *)(p->thread.regs);
96 98
97 /* registers r0 - r31, pc, msr, ear, esr, fsr + do not save pt_mode */ 99 /* registers r0 - r31, pc, msr, ear, esr, fsr + do not save pt_mode */
diff --git a/arch/microblaze/kernel/prom_parse.c b/arch/microblaze/kernel/prom_parse.c
deleted file mode 100644
index 068762f55fd6..000000000000
--- a/arch/microblaze/kernel/prom_parse.c
+++ /dev/null
@@ -1,35 +0,0 @@
1#undef DEBUG
2
3#include <linux/export.h>
4#include <linux/kernel.h>
5#include <linux/string.h>
6#include <linux/ioport.h>
7#include <linux/etherdevice.h>
8#include <linux/of_address.h>
9#include <asm/prom.h>
10
11void of_parse_dma_window(struct device_node *dn, const void *dma_window_prop,
12 unsigned long *busno, unsigned long *phys, unsigned long *size)
13{
14 const u32 *dma_window;
15 u32 cells;
16 const unsigned char *prop;
17
18 dma_window = dma_window_prop;
19
20 /* busno is always one cell */
21 *busno = *(dma_window++);
22
23 prop = of_get_property(dn, "ibm,#dma-address-cells", NULL);
24 if (!prop)
25 prop = of_get_property(dn, "#address-cells", NULL);
26
27 cells = prop ? *(u32 *)prop : of_n_addr_cells(dn);
28 *phys = of_read_number(dma_window, cells);
29
30 dma_window += cells;
31
32 prop = of_get_property(dn, "ibm,#dma-size-cells", NULL);
33 cells = prop ? *(u32 *)prop : of_n_size_cells(dn);
34 *size = of_read_number(dma_window, cells);
35}
diff --git a/arch/microblaze/kernel/ptrace.c b/arch/microblaze/kernel/ptrace.c
index bb10637ce688..8cfa98cadf3d 100644
--- a/arch/microblaze/kernel/ptrace.c
+++ b/arch/microblaze/kernel/ptrace.c
@@ -132,9 +132,9 @@ long arch_ptrace(struct task_struct *child, long request,
132 return rval; 132 return rval;
133} 133}
134 134
135asmlinkage long do_syscall_trace_enter(struct pt_regs *regs) 135asmlinkage unsigned long do_syscall_trace_enter(struct pt_regs *regs)
136{ 136{
137 long ret = 0; 137 unsigned long ret = 0;
138 138
139 secure_computing_strict(regs->r12); 139 secure_computing_strict(regs->r12);
140 140
diff --git a/arch/microblaze/kernel/reset.c b/arch/microblaze/kernel/reset.c
index fbe58c6554a8..bab4c8330ef4 100644
--- a/arch/microblaze/kernel/reset.c
+++ b/arch/microblaze/kernel/reset.c
@@ -9,7 +9,6 @@
9 9
10#include <linux/init.h> 10#include <linux/init.h>
11#include <linux/of_platform.h> 11#include <linux/of_platform.h>
12#include <asm/prom.h>
13 12
14/* Trigger specific functions */ 13/* Trigger specific functions */
15#ifdef CONFIG_GPIOLIB 14#ifdef CONFIG_GPIOLIB
diff --git a/arch/microblaze/kernel/signal.c b/arch/microblaze/kernel/signal.c
index 8955a3829cf0..235706055b7f 100644
--- a/arch/microblaze/kernel/signal.c
+++ b/arch/microblaze/kernel/signal.c
@@ -158,7 +158,7 @@ static int setup_rt_frame(struct ksignal *ksig, sigset_t *set,
158{ 158{
159 struct rt_sigframe __user *frame; 159 struct rt_sigframe __user *frame;
160 int err = 0, sig = ksig->sig; 160 int err = 0, sig = ksig->sig;
161 int signal; 161 unsigned long signal;
162 unsigned long address = 0; 162 unsigned long address = 0;
163#ifdef CONFIG_MMU 163#ifdef CONFIG_MMU
164 pmd_t *pmdp; 164 pmd_t *pmdp;
@@ -174,7 +174,7 @@ static int setup_rt_frame(struct ksignal *ksig, sigset_t *set,
174 && current_thread_info()->exec_domain->signal_invmap 174 && current_thread_info()->exec_domain->signal_invmap
175 && sig < 32 175 && sig < 32
176 ? current_thread_info()->exec_domain->signal_invmap[sig] 176 ? current_thread_info()->exec_domain->signal_invmap[sig]
177 : sig; 177 : (unsigned long)sig;
178 178
179 if (ksig->ka.sa.sa_flags & SA_SIGINFO) 179 if (ksig->ka.sa.sa_flags & SA_SIGINFO)
180 err |= copy_siginfo_to_user(&frame->info, &ksig->info); 180 err |= copy_siginfo_to_user(&frame->info, &ksig->info);
diff --git a/arch/microblaze/kernel/syscall_table.S b/arch/microblaze/kernel/syscall_table.S
index 0166e890486c..29c8568ec55c 100644
--- a/arch/microblaze/kernel/syscall_table.S
+++ b/arch/microblaze/kernel/syscall_table.S
@@ -388,3 +388,4 @@ ENTRY(sys_call_table)
388 .long sys_getrandom /* 385 */ 388 .long sys_getrandom /* 385 */
389 .long sys_memfd_create 389 .long sys_memfd_create
390 .long sys_bpf 390 .long sys_bpf
391 .long sys_execveat
diff --git a/arch/microblaze/kernel/unwind.c b/arch/microblaze/kernel/unwind.c
index 1f7b8d449668..61c04eed14d5 100644
--- a/arch/microblaze/kernel/unwind.c
+++ b/arch/microblaze/kernel/unwind.c
@@ -59,7 +59,7 @@ struct stack_trace;
59 * 59 *
60 * Return - Number of stack bytes the instruction reserves or reclaims 60 * Return - Number of stack bytes the instruction reserves or reclaims
61 */ 61 */
62inline long get_frame_size(unsigned long instr) 62static inline long get_frame_size(unsigned long instr)
63{ 63{
64 return abs((s16)(instr & 0xFFFF)); 64 return abs((s16)(instr & 0xFFFF));
65} 65}