diff options
author | Steve French <sfrench@us.ibm.com> | 2009-04-30 11:36:52 -0400 |
---|---|---|
committer | Steve French <sfrench@us.ibm.com> | 2009-04-30 11:36:52 -0400 |
commit | 912bc6ae3de99c7bada4577d4341ace4ee59b5be (patch) | |
tree | 28fd1a4bb9e4b05aa833285b46df169f12c0e24d /arch/microblaze/kernel | |
parent | d37dc42ab6f040b8f0f2962ab219c5b2accf748d (diff) | |
parent | 091438dd5668396328a3419abcbc6591159eb8d1 (diff) |
Merge branch 'master' of /pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'arch/microblaze/kernel')
-rw-r--r-- | arch/microblaze/kernel/asm-offsets.c | 2 | ||||
-rw-r--r-- | arch/microblaze/kernel/cpu/cache.c | 3 | ||||
-rw-r--r-- | arch/microblaze/kernel/cpu/cpuinfo-pvr-full.c | 9 | ||||
-rw-r--r-- | arch/microblaze/kernel/cpu/cpuinfo.c | 2 | ||||
-rw-r--r-- | arch/microblaze/kernel/cpu/mb.c | 4 | ||||
-rw-r--r-- | arch/microblaze/kernel/early_printk.c | 2 | ||||
-rw-r--r-- | arch/microblaze/kernel/process.c | 20 | ||||
-rw-r--r-- | arch/microblaze/kernel/signal.c | 14 | ||||
-rw-r--r-- | arch/microblaze/kernel/syscall_table.S | 2 | ||||
-rw-r--r-- | arch/microblaze/kernel/timer.c | 2 | ||||
-rw-r--r-- | arch/microblaze/kernel/traps.c | 2 |
11 files changed, 38 insertions, 24 deletions
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 | ||
101 | void _disable_dcache(void) | 101 | void _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 | ||
125 | void _invalidate_dcache(unsigned int addr) | 123 | void _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 | ||
19 | void show_regs(struct pt_regs *regs) | 19 | void 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 | ||
44 | void (*pm_idle)(void); | 42 | void (*pm_idle)(void); |
@@ -163,7 +161,6 @@ static void kernel_thread_helper(int (*fn)(void *), void *arg) | |||
163 | int kernel_thread(int (*fn)(void *), void *arg, unsigned long flags) | 161 | int 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(®s, 0, sizeof(regs)); | 165 | memset(®s, 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 | ®s, 0, NULL, NULL); | 174 | ®s, 0, NULL, NULL); |
178 | |||
179 | return ret; | ||
180 | } | 175 | } |
181 | 176 | ||
182 | unsigned long get_wchan(struct task_struct *p) | 177 | unsigned 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 */ | ||
184 | void 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 | ||
179 | asmlinkage int sys_sigreturn(struct pt_regs *regs) | 179 | asmlinkage 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 | ||
210 | asmlinkage int sys_rt_sigreturn(struct pt_regs *regs) | 212 | asmlinkage 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 | ||
179 | static cycle_t microblaze_read(void) | 179 | static 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 | ||
35 | static int __init kstack_setup(char *s) | 35 | static 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 | } |