aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/microblaze/Makefile8
-rw-r--r--arch/microblaze/include/asm/cache.h5
-rw-r--r--arch/microblaze/include/asm/entry.h4
-rw-r--r--arch/microblaze/include/asm/exceptions.h3
-rw-r--r--arch/microblaze/include/asm/processor.h21
-rw-r--r--arch/microblaze/include/asm/ptrace.h4
-rw-r--r--arch/microblaze/include/asm/unistd.h4
-rw-r--r--arch/microblaze/kernel/asm-offsets.c2
-rw-r--r--arch/microblaze/kernel/cpu/cache.c3
-rw-r--r--arch/microblaze/kernel/cpu/cpuinfo-pvr-full.c9
-rw-r--r--arch/microblaze/kernel/cpu/cpuinfo.c2
-rw-r--r--arch/microblaze/kernel/cpu/mb.c4
-rw-r--r--arch/microblaze/kernel/early_printk.c2
-rw-r--r--arch/microblaze/kernel/process.c20
-rw-r--r--arch/microblaze/kernel/signal.c14
-rw-r--r--arch/microblaze/kernel/syscall_table.S2
-rw-r--r--arch/microblaze/kernel/timer.c2
-rw-r--r--arch/microblaze/kernel/traps.c2
18 files changed, 60 insertions, 51 deletions
diff --git a/arch/microblaze/Makefile b/arch/microblaze/Makefile
index 0dcbb9832974..aaadfa701da3 100644
--- a/arch/microblaze/Makefile
+++ b/arch/microblaze/Makefile
@@ -26,21 +26,19 @@ ifeq (,$(findstring spartan2,$(CONFIG_XILINX_MICROBLAZE0_FAMILY)))
26endif 26endif
27CPUFLAGS-$(CONFIG_XILINX_MICROBLAZE0_USE_DIV) += -mno-xl-soft-div 27CPUFLAGS-$(CONFIG_XILINX_MICROBLAZE0_USE_DIV) += -mno-xl-soft-div
28CPUFLAGS-$(CONFIG_XILINX_MICROBLAZE0_USE_BARREL) += -mxl-barrel-shift 28CPUFLAGS-$(CONFIG_XILINX_MICROBLAZE0_USE_BARREL) += -mxl-barrel-shift
29CPUFLAGS-$(CONFIG_XILINX_MICROBLAZE0_USE_PCMP) += -mxl-pattern-compare 29CPUFLAGS-$(CONFIG_XILINX_MICROBLAZE0_USE_PCMP_INSTR) += -mxl-pattern-compare
30 30
31CPUFLAGS-1 += $(call cc-option,-mcpu=v$(CPU_VER)) 31CPUFLAGS-1 += $(call cc-option,-mcpu=v$(CPU_VER))
32 32
33# The various CONFIG_XILINX cpu features options are integers 0/1/2... 33# The various CONFIG_XILINX cpu features options are integers 0/1/2...
34# rather than bools y/n 34# rather than bools y/n
35CFLAGS += $(CPUFLAGS-1)
36CFLAGS += $(CPUFLAGS-2)
37 35
38# r31 holds current when in kernel mode 36# r31 holds current when in kernel mode
39CFLAGS += -ffixed-r31 37CFLAGS_KERNEL += -ffixed-r31 $(CPUFLAGS-1) $(CPUFLAGS-2)
40 38
41LDFLAGS_BLOB := --format binary --oformat elf32-microblaze 39LDFLAGS_BLOB := --format binary --oformat elf32-microblaze
42 40
43LIBGCC := $(shell $(CC) $(CFLAGS) -print-libgcc-file-name) 41LIBGCC := $(shell $(CC) $(CFLAGS_KERNEL) -print-libgcc-file-name)
44 42
45head-y := arch/microblaze/kernel/head.o 43head-y := arch/microblaze/kernel/head.o
46libs-y += arch/microblaze/lib/ $(LIBGCC) 44libs-y += arch/microblaze/lib/ $(LIBGCC)
diff --git a/arch/microblaze/include/asm/cache.h b/arch/microblaze/include/asm/cache.h
index c4c64b43c074..c209c47509d5 100644
--- a/arch/microblaze/include/asm/cache.h
+++ b/arch/microblaze/include/asm/cache.h
@@ -37,9 +37,4 @@ void _invalidate_dcache(unsigned int addr);
37#define __disable_dcache() _disable_dcache() 37#define __disable_dcache() _disable_dcache()
38#define __invalidate_dcache(addr) _invalidate_dcache(addr) 38#define __invalidate_dcache(addr) _invalidate_dcache(addr)
39 39
40/* FIXME - I don't think this is right */
41#ifdef CONFIG_XILINX_UNCACHED_SHADOW
42#define UNCACHED_SHADOW_MASK (CONFIG_XILINX_ERAM_SIZE)
43#endif
44
45#endif /* _ASM_MICROBLAZE_CACHE_H */ 40#endif /* _ASM_MICROBLAZE_CACHE_H */
diff --git a/arch/microblaze/include/asm/entry.h b/arch/microblaze/include/asm/entry.h
index 7f57e42ee467..e4c3aef884df 100644
--- a/arch/microblaze/include/asm/entry.h
+++ b/arch/microblaze/include/asm/entry.h
@@ -29,7 +29,9 @@ DECLARE_PER_CPU(unsigned int, KM); /* Kernel/user mode */
29DECLARE_PER_CPU(unsigned int, ENTRY_SP); /* Saved SP on kernel entry */ 29DECLARE_PER_CPU(unsigned int, ENTRY_SP); /* Saved SP on kernel entry */
30DECLARE_PER_CPU(unsigned int, R11_SAVE); /* Temp variable for entry */ 30DECLARE_PER_CPU(unsigned int, R11_SAVE); /* Temp variable for entry */
31DECLARE_PER_CPU(unsigned int, CURRENT_SAVE); /* Saved current pointer */ 31DECLARE_PER_CPU(unsigned int, CURRENT_SAVE); /* Saved current pointer */
32DECLARE_PER_CPU(unsigned int, SYSCALL_SAVE); /* Saved syscall number */
33# endif /* __ASSEMBLY__ */ 32# endif /* __ASSEMBLY__ */
34 33
34/* noMMU hasn't any space for args */
35# define STATE_SAVE_ARG_SPACE (0)
36
35#endif /* _ASM_MICROBLAZE_ENTRY_H */ 37#endif /* _ASM_MICROBLAZE_ENTRY_H */
diff --git a/arch/microblaze/include/asm/exceptions.h b/arch/microblaze/include/asm/exceptions.h
index 4cdd2159f470..24ca540e77c0 100644
--- a/arch/microblaze/include/asm/exceptions.h
+++ b/arch/microblaze/include/asm/exceptions.h
@@ -61,6 +61,9 @@
61asmlinkage void full_exception(struct pt_regs *regs, unsigned int type, 61asmlinkage void full_exception(struct pt_regs *regs, unsigned int type,
62 int fsr, int addr); 62 int fsr, int addr);
63 63
64void die(const char *str, struct pt_regs *fp, long err);
65void _exception(int signr, struct pt_regs *regs, int code, unsigned long addr);
66
64#if defined(CONFIG_XMON) 67#if defined(CONFIG_XMON)
65extern void xmon(struct pt_regs *regs); 68extern void xmon(struct pt_regs *regs);
66extern int xmon_bpt(struct pt_regs *regs); 69extern int xmon_bpt(struct pt_regs *regs);
diff --git a/arch/microblaze/include/asm/processor.h b/arch/microblaze/include/asm/processor.h
index d8e15434ba21..9329029d2614 100644
--- a/arch/microblaze/include/asm/processor.h
+++ b/arch/microblaze/include/asm/processor.h
@@ -15,6 +15,8 @@
15#include <asm/setup.h> 15#include <asm/setup.h>
16#include <asm/registers.h> 16#include <asm/registers.h>
17#include <asm/segment.h> 17#include <asm/segment.h>
18#include <asm/entry.h>
19#include <asm/current.h>
18 20
19# ifndef __ASSEMBLY__ 21# ifndef __ASSEMBLY__
20/* from kernel/cpu/mb.c */ 22/* from kernel/cpu/mb.c */
@@ -26,6 +28,12 @@ extern const struct seq_operations cpuinfo_op;
26 28
27# endif /* __ASSEMBLY__ */ 29# endif /* __ASSEMBLY__ */
28 30
31#define task_pt_regs(tsk) \
32 (((struct pt_regs *)(THREAD_SIZE + task_stack_page(tsk))) - 1)
33
34/* Do necessary setup to start up a newly executed thread. */
35void start_thread(struct pt_regs *regs, unsigned long pc, unsigned long usp);
36
29/* 37/*
30 * User space process size: memory size 38 * User space process size: memory size
31 * 39 *
@@ -55,16 +63,6 @@ struct task_struct;
55struct thread_struct { }; 63struct thread_struct { };
56# define INIT_THREAD { } 64# define INIT_THREAD { }
57 65
58/* Do necessary setup to start up a newly executed thread. */
59static inline void start_thread(struct pt_regs *regs,
60 unsigned long pc,
61 unsigned long usp)
62{
63 regs->pc = pc;
64 regs->r1 = usp;
65 regs->kernel_mode = 0;
66}
67
68/* Free all resources held by a thread. */ 66/* Free all resources held by a thread. */
69static inline void release_thread(struct task_struct *dead_task) 67static inline void release_thread(struct task_struct *dead_task)
70{ 68{
@@ -84,9 +82,6 @@ extern unsigned long get_wchan(struct task_struct *p);
84 */ 82 */
85extern int kernel_thread(int (*fn)(void *), void *arg, unsigned long flags); 83extern int kernel_thread(int (*fn)(void *), void *arg, unsigned long flags);
86 84
87# define task_pt_regs(tsk) \
88 (((struct pt_regs *)(THREAD_SIZE + task_stack_page(tsk))) - 1)
89
90# define KSTK_EIP(tsk) (0) 85# define KSTK_EIP(tsk) (0)
91# define KSTK_ESP(tsk) (0) 86# define KSTK_ESP(tsk) (0)
92 87
diff --git a/arch/microblaze/include/asm/ptrace.h b/arch/microblaze/include/asm/ptrace.h
index f1f03486428a..55015bce5e47 100644
--- a/arch/microblaze/include/asm/ptrace.h
+++ b/arch/microblaze/include/asm/ptrace.h
@@ -52,10 +52,10 @@ struct pt_regs {
52 microblaze_reg_t ear; 52 microblaze_reg_t ear;
53 microblaze_reg_t esr; 53 microblaze_reg_t esr;
54 microblaze_reg_t fsr; 54 microblaze_reg_t fsr;
55 int kernel_mode; 55 int pt_mode;
56}; 56};
57 57
58#define kernel_mode(regs) ((regs)->kernel_mode) 58#define kernel_mode(regs) ((regs)->pt_mode)
59#define user_mode(regs) (!kernel_mode(regs)) 59#define user_mode(regs) (!kernel_mode(regs))
60 60
61#define instruction_pointer(regs) ((regs)->pc) 61#define instruction_pointer(regs) ((regs)->pc)
diff --git a/arch/microblaze/include/asm/unistd.h b/arch/microblaze/include/asm/unistd.h
index d9d3903fde3f..b5e2f5fa5c53 100644
--- a/arch/microblaze/include/asm/unistd.h
+++ b/arch/microblaze/include/asm/unistd.h
@@ -378,8 +378,10 @@
378#define __NR_sendmsg 360 /* new */ 378#define __NR_sendmsg 360 /* new */
379#define __NR_recvmsg 361 /* new */ 379#define __NR_recvmsg 361 /* new */
380#define __NR_accept04 362 /* new */ 380#define __NR_accept04 362 /* new */
381#define __NR_preadv 363 /* new */
382#define __NR_pwritev 364 /* new */
381 383
382#define __NR_syscalls 363 384#define __NR_syscalls 365
383 385
384#ifdef __KERNEL__ 386#ifdef __KERNEL__
385#ifndef __ASSEMBLY__ 387#ifndef __ASSEMBLY__
diff --git a/arch/microblaze/kernel/asm-offsets.c b/arch/microblaze/kernel/asm-offsets.c
index 38e1a2e8ad0c..aabd9e9423a6 100644
--- a/arch/microblaze/kernel/asm-offsets.c
+++ b/arch/microblaze/kernel/asm-offsets.c
@@ -57,7 +57,7 @@ int main(int argc, char *argv[])
57 DEFINE(PT_R29, offsetof(struct pt_regs, r29)); 57 DEFINE(PT_R29, offsetof(struct pt_regs, r29));
58 DEFINE(PT_R30, offsetof(struct pt_regs, r30)); 58 DEFINE(PT_R30, offsetof(struct pt_regs, r30));
59 DEFINE(PT_R31, offsetof(struct pt_regs, r31)); 59 DEFINE(PT_R31, offsetof(struct pt_regs, r31));
60 DEFINE(PT_MODE, offsetof(struct pt_regs, kernel_mode)); 60 DEFINE(PT_MODE, offsetof(struct pt_regs, pt_mode));
61 BLANK(); 61 BLANK();
62 62
63 /* Magic offsets for PTRACE PEEK/POKE etc */ 63 /* Magic offsets for PTRACE PEEK/POKE etc */
diff --git a/arch/microblaze/kernel/cpu/cache.c b/arch/microblaze/kernel/cpu/cache.c
index be9fecca4f91..af866a450125 100644
--- a/arch/microblaze/kernel/cpu/cache.c
+++ b/arch/microblaze/kernel/cpu/cache.c
@@ -100,7 +100,6 @@ void _enable_dcache(void)
100 100
101void _disable_dcache(void) 101void _disable_dcache(void)
102{ 102{
103 if (cpuinfo.use_dcache) {
104#if CONFIG_XILINX_MICROBLAZE0_USE_MSR_INSTR 103#if CONFIG_XILINX_MICROBLAZE0_USE_MSR_INSTR
105 __asm__ __volatile__ (" \ 104 __asm__ __volatile__ (" \
106 msrclr r0, %0; \ 105 msrclr r0, %0; \
@@ -119,12 +118,10 @@ void _disable_dcache(void)
119 : "i" (MSR_DCE) \ 118 : "i" (MSR_DCE) \
120 : "memory", "r12"); 119 : "memory", "r12");
121#endif 120#endif
122 }
123} 121}
124 122
125void _invalidate_dcache(unsigned int addr) 123void _invalidate_dcache(unsigned int addr)
126{ 124{
127 if (cpuinfo.use_dcache)
128 __asm__ __volatile__ (" \ 125 __asm__ __volatile__ (" \
129 wdc %0, r0" \ 126 wdc %0, r0" \
130 : \ 127 : \
diff --git a/arch/microblaze/kernel/cpu/cpuinfo-pvr-full.c b/arch/microblaze/kernel/cpu/cpuinfo-pvr-full.c
index cf7424a6bb87..153f57c57b6d 100644
--- a/arch/microblaze/kernel/cpu/cpuinfo-pvr-full.c
+++ b/arch/microblaze/kernel/cpu/cpuinfo-pvr-full.c
@@ -30,6 +30,13 @@ void set_cpuinfo_pvr_full(struct cpuinfo *ci, struct device_node *cpu)
30 int temp; /* for saving temp value */ 30 int temp; /* for saving temp value */
31 get_pvr(&pvr); 31 get_pvr(&pvr);
32 32
33 CI(ver_code, VERSION);
34 if (!ci->ver_code) {
35 printk(KERN_ERR "ERROR: MB has broken PVR regs "
36 "-> use DTS setting\n");
37 return;
38 }
39
33 temp = PVR_USE_BARREL(pvr) | PVR_USE_MSR_INSTR(pvr) |\ 40 temp = PVR_USE_BARREL(pvr) | PVR_USE_MSR_INSTR(pvr) |\
34 PVR_USE_PCMP_INSTR(pvr) | PVR_USE_DIV(pvr); 41 PVR_USE_PCMP_INSTR(pvr) | PVR_USE_DIV(pvr);
35 if (ci->use_instr != temp) 42 if (ci->use_instr != temp)
@@ -60,8 +67,6 @@ void set_cpuinfo_pvr_full(struct cpuinfo *ci, struct device_node *cpu)
60 67
61 CI(mmu, USE_MMU); 68 CI(mmu, USE_MMU);
62 69
63 CI(ver_code, VERSION);
64
65 CI(use_icache, USE_ICACHE); 70 CI(use_icache, USE_ICACHE);
66 CI(icache_tagbits, ICACHE_ADDR_TAG_BITS); 71 CI(icache_tagbits, ICACHE_ADDR_TAG_BITS);
67 CI(icache_write, ICACHE_ALLOW_WR); 72 CI(icache_write, ICACHE_ALLOW_WR);
diff --git a/arch/microblaze/kernel/cpu/cpuinfo.c b/arch/microblaze/kernel/cpu/cpuinfo.c
index 4a740dfcf6da..a10bea119b94 100644
--- a/arch/microblaze/kernel/cpu/cpuinfo.c
+++ b/arch/microblaze/kernel/cpu/cpuinfo.c
@@ -71,7 +71,7 @@ void __init setup_cpuinfo(void)
71 __func__); 71 __func__);
72 set_cpuinfo_static(&cpuinfo, cpu); 72 set_cpuinfo_static(&cpuinfo, cpu);
73 break; 73 break;
74/* FIXME I found weird behavior with MB 7.00.a/b 74/* FIXME I found weird behavior with MB 7.00.a/b 7.10.a
75 * please do not use FULL PVR with MMU */ 75 * please do not use FULL PVR with MMU */
76 case 1: 76 case 1:
77 printk(KERN_INFO "%s: Using full CPU PVR support\n", 77 printk(KERN_INFO "%s: Using full CPU PVR support\n",
diff --git a/arch/microblaze/kernel/cpu/mb.c b/arch/microblaze/kernel/cpu/mb.c
index 3b6212bdc8dc..4dcfccdbc364 100644
--- a/arch/microblaze/kernel/cpu/mb.c
+++ b/arch/microblaze/kernel/cpu/mb.c
@@ -115,8 +115,8 @@ static int show_cpuinfo(struct seq_file *m, void *v)
115 cpuinfo.hw_debug ? "yes" : "no"); 115 cpuinfo.hw_debug ? "yes" : "no");
116 116
117 count += seq_printf(m, 117 count += seq_printf(m,
118 "PVR-USR1:\t%x\n" 118 "PVR-USR1:\t%02x\n"
119 "PVR-USR2:\t%x\n", 119 "PVR-USR2:\t%08x\n",
120 cpuinfo.pvr_user1, 120 cpuinfo.pvr_user1,
121 cpuinfo.pvr_user2); 121 cpuinfo.pvr_user2);
122 122
diff --git a/arch/microblaze/kernel/early_printk.c b/arch/microblaze/kernel/early_printk.c
index 62cc78993f44..4b0f0fdb9ca0 100644
--- a/arch/microblaze/kernel/early_printk.c
+++ b/arch/microblaze/kernel/early_printk.c
@@ -36,7 +36,7 @@ static void early_printk_putc(char c)
36 36
37 unsigned retries = 10000; 37 unsigned retries = 10000;
38 /* read status bit - 0x8 offset */ 38 /* read status bit - 0x8 offset */
39 while (retries-- && (in_be32(base_addr + 8) & (1 << 3))) 39 while (--retries && (in_be32(base_addr + 8) & (1 << 3)))
40 ; 40 ;
41 41
42 /* Only attempt the iowrite if we didn't timeout */ 42 /* Only attempt the iowrite if we didn't timeout */
diff --git a/arch/microblaze/kernel/process.c b/arch/microblaze/kernel/process.c
index 436f26ccbfa9..07d4fa339eda 100644
--- a/arch/microblaze/kernel/process.c
+++ b/arch/microblaze/kernel/process.c
@@ -18,7 +18,7 @@
18 18
19void show_regs(struct pt_regs *regs) 19void show_regs(struct pt_regs *regs)
20{ 20{
21 printk(KERN_INFO " Registers dump: mode=%X\r\n", regs->kernel_mode); 21 printk(KERN_INFO " Registers dump: mode=%X\r\n", regs->pt_mode);
22 printk(KERN_INFO " r1=%08lX, r2=%08lX, r3=%08lX, r4=%08lX\n", 22 printk(KERN_INFO " r1=%08lX, r2=%08lX, r3=%08lX, r4=%08lX\n",
23 regs->r1, regs->r2, regs->r3, regs->r4); 23 regs->r1, regs->r2, regs->r3, regs->r4);
24 printk(KERN_INFO " r5=%08lX, r6=%08lX, r7=%08lX, r8=%08lX\n", 24 printk(KERN_INFO " r5=%08lX, r6=%08lX, r7=%08lX, r8=%08lX\n",
@@ -37,8 +37,6 @@ void show_regs(struct pt_regs *regs)
37 regs->r29, regs->r30, regs->r31, regs->pc); 37 regs->r29, regs->r30, regs->r31, regs->pc);
38 printk(KERN_INFO " msr=%08lX, ear=%08lX, esr=%08lX, fsr=%08lX\n", 38 printk(KERN_INFO " msr=%08lX, ear=%08lX, esr=%08lX, fsr=%08lX\n",
39 regs->msr, regs->ear, regs->esr, regs->fsr); 39 regs->msr, regs->ear, regs->esr, regs->fsr);
40 while (1)
41 ;
42} 40}
43 41
44void (*pm_idle)(void); 42void (*pm_idle)(void);
@@ -163,7 +161,6 @@ static void kernel_thread_helper(int (*fn)(void *), void *arg)
163int kernel_thread(int (*fn)(void *), void *arg, unsigned long flags) 161int kernel_thread(int (*fn)(void *), void *arg, unsigned long flags)
164{ 162{
165 struct pt_regs regs; 163 struct pt_regs regs;
166 int ret;
167 164
168 memset(&regs, 0, sizeof(regs)); 165 memset(&regs, 0, sizeof(regs));
169 /* store them in non-volatile registers */ 166 /* store them in non-volatile registers */
@@ -171,12 +168,10 @@ int kernel_thread(int (*fn)(void *), void *arg, unsigned long flags)
171 regs.r6 = (unsigned long)arg; 168 regs.r6 = (unsigned long)arg;
172 local_save_flags(regs.msr); 169 local_save_flags(regs.msr);
173 regs.pc = (unsigned long)kernel_thread_helper; 170 regs.pc = (unsigned long)kernel_thread_helper;
174 regs.kernel_mode = 1; 171 regs.pt_mode = 1;
175 172
176 ret = do_fork(flags | CLONE_VM | CLONE_UNTRACED, 0, 173 return do_fork(flags | CLONE_VM | CLONE_UNTRACED, 0,
177 &regs, 0, NULL, NULL); 174 &regs, 0, NULL, NULL);
178
179 return ret;
180} 175}
181 176
182unsigned long get_wchan(struct task_struct *p) 177unsigned long get_wchan(struct task_struct *p)
@@ -184,3 +179,12 @@ unsigned long get_wchan(struct task_struct *p)
184/* TBD (used by procfs) */ 179/* TBD (used by procfs) */
185 return 0; 180 return 0;
186} 181}
182
183/* Set up a thread for executing a new program */
184void start_thread(struct pt_regs *regs, unsigned long pc, unsigned long usp)
185{
186 set_fs(USER_DS);
187 regs->pc = pc;
188 regs->r1 = usp;
189 regs->pt_mode = 0;
190}
diff --git a/arch/microblaze/kernel/signal.c b/arch/microblaze/kernel/signal.c
index 3889cf45fa71..40d36931e363 100644
--- a/arch/microblaze/kernel/signal.c
+++ b/arch/microblaze/kernel/signal.c
@@ -178,7 +178,9 @@ restore_sigcontext(struct pt_regs *regs, struct sigcontext *sc, int *rval_p)
178 178
179asmlinkage int sys_sigreturn(struct pt_regs *regs) 179asmlinkage int sys_sigreturn(struct pt_regs *regs)
180{ 180{
181 struct sigframe *frame = (struct sigframe *)regs->r1; 181 struct sigframe *frame =
182 (struct sigframe *)(regs->r1 + STATE_SAVE_ARG_SPACE);
183
182 sigset_t set; 184 sigset_t set;
183 int rval; 185 int rval;
184 186
@@ -209,7 +211,9 @@ badframe:
209 211
210asmlinkage int sys_rt_sigreturn(struct pt_regs *regs) 212asmlinkage int sys_rt_sigreturn(struct pt_regs *regs)
211{ 213{
212 struct rt_sigframe *frame = (struct rt_sigframe *)regs->r1; 214 struct rt_sigframe *frame =
215 (struct rt_sigframe *)(regs->r1 + STATE_SAVE_ARG_SPACE);
216
213 sigset_t set; 217 sigset_t set;
214 stack_t st; 218 stack_t st;
215 int rval; 219 int rval;
@@ -336,7 +340,8 @@ static void setup_frame(int sig, struct k_sigaction *ka,
336 goto give_sigsegv; 340 goto give_sigsegv;
337 341
338 /* Set up registers for signal handler */ 342 /* Set up registers for signal handler */
339 regs->r1 = (unsigned long) frame; 343 regs->r1 = (unsigned long) frame - STATE_SAVE_ARG_SPACE;
344
340 /* Signal handler args: */ 345 /* Signal handler args: */
341 regs->r5 = signal; /* Arg 0: signum */ 346 regs->r5 = signal; /* Arg 0: signum */
342 regs->r6 = (unsigned long) &frame->sc; /* arg 1: sigcontext */ 347 regs->r6 = (unsigned long) &frame->sc; /* arg 1: sigcontext */
@@ -414,7 +419,8 @@ static void setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
414 goto give_sigsegv; 419 goto give_sigsegv;
415 420
416 /* Set up registers for signal handler */ 421 /* Set up registers for signal handler */
417 regs->r1 = (unsigned long) frame; 422 regs->r1 = (unsigned long) frame - STATE_SAVE_ARG_SPACE;
423
418 /* Signal handler args: */ 424 /* Signal handler args: */
419 regs->r5 = signal; /* arg 0: signum */ 425 regs->r5 = signal; /* arg 0: signum */
420 regs->r6 = (unsigned long) &frame->info; /* arg 1: siginfo */ 426 regs->r6 = (unsigned long) &frame->info; /* arg 1: siginfo */
diff --git a/arch/microblaze/kernel/syscall_table.S b/arch/microblaze/kernel/syscall_table.S
index 529b0dbf4fe9..3bb42ec924c2 100644
--- a/arch/microblaze/kernel/syscall_table.S
+++ b/arch/microblaze/kernel/syscall_table.S
@@ -363,3 +363,5 @@ ENTRY(sys_call_table)
363 .long sys_sendmsg /* 360 */ 363 .long sys_sendmsg /* 360 */
364 .long sys_recvmsg 364 .long sys_recvmsg
365 .long sys_ni_syscall 365 .long sys_ni_syscall
366 .long sys_ni_syscall
367 .long sys_ni_syscall
diff --git a/arch/microblaze/kernel/timer.c b/arch/microblaze/kernel/timer.c
index 05a497eefd78..bdfa2f9f0c81 100644
--- a/arch/microblaze/kernel/timer.c
+++ b/arch/microblaze/kernel/timer.c
@@ -176,7 +176,7 @@ static __init void microblaze_clockevent_init(void)
176 clockevents_register_device(&clockevent_microblaze_timer); 176 clockevents_register_device(&clockevent_microblaze_timer);
177} 177}
178 178
179static cycle_t microblaze_read(void) 179static cycle_t microblaze_read(struct clocksource *cs)
180{ 180{
181 /* reading actual value of timer 1 */ 181 /* reading actual value of timer 1 */
182 return (cycle_t) (in_be32(TIMER_BASE + TCR1)); 182 return (cycle_t) (in_be32(TIMER_BASE + TCR1));
diff --git a/arch/microblaze/kernel/traps.c b/arch/microblaze/kernel/traps.c
index fbdc533c61e3..293ef486013a 100644
--- a/arch/microblaze/kernel/traps.c
+++ b/arch/microblaze/kernel/traps.c
@@ -34,7 +34,7 @@ static int kstack_depth_to_print = 24;
34 34
35static int __init kstack_setup(char *s) 35static int __init kstack_setup(char *s)
36{ 36{
37 kstack_depth_to_print = strict_strtoul(s, 0, 0); 37 kstack_depth_to_print = strict_strtoul(s, 0, NULL);
38 38
39 return 1; 39 return 1;
40} 40}