diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-08-29 16:34:48 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-08-29 16:34:48 -0400 |
commit | c42a2634d8495a764e918a8c4252c100ef23b369 (patch) | |
tree | c3003ae880afb1a98c4554311aa068656cc7bf37 /arch/sh | |
parent | f9557a4477140d2aa6845d310edbdeff735c80e1 (diff) | |
parent | 21d41f2b312231536cf981c960c83cc4493c0293 (diff) |
Merge branch 'sh-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-3.x
* 'sh-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-3.x:
sh: fix the compile error in setup-sh7757.c
serial: sh-sci: report CTS as active for get_mctrl
sh: Add unaligned memory access for PC relative intructions
sh: Fix unaligned memory access for branches without delay slots
sh: Fix up fallout from cpuidle changes.
serial: sh-sci: console Runtime PM support
sh: Fix conflicting definitions of ptrace_triggered
serial: sh-sci: fix DMA build by including dma-mapping.h
serial: sh-sci: Fix up default regtype probing.
sh: intc: enable both edges GPIO interrupts on sh7372
shwdt: fix usage of mod_timer
clocksource: sh_cmt: wait for CMCNT on init V2
Diffstat (limited to 'arch/sh')
-rw-r--r-- | arch/sh/include/asm/ptrace.h | 2 | ||||
-rw-r--r-- | arch/sh/kernel/cpu/sh4a/setup-sh7757.c | 1 | ||||
-rw-r--r-- | arch/sh/kernel/idle.c | 2 | ||||
-rw-r--r-- | arch/sh/kernel/traps_32.c | 37 |
4 files changed, 40 insertions, 2 deletions
diff --git a/arch/sh/include/asm/ptrace.h b/arch/sh/include/asm/ptrace.h index b97baf81a87b..2d3679b2447f 100644 --- a/arch/sh/include/asm/ptrace.h +++ b/arch/sh/include/asm/ptrace.h | |||
@@ -123,7 +123,7 @@ static inline unsigned long regs_get_kernel_stack_nth(struct pt_regs *regs, | |||
123 | struct perf_event; | 123 | struct perf_event; |
124 | struct perf_sample_data; | 124 | struct perf_sample_data; |
125 | 125 | ||
126 | extern void ptrace_triggered(struct perf_event *bp, int nmi, | 126 | extern void ptrace_triggered(struct perf_event *bp, |
127 | struct perf_sample_data *data, struct pt_regs *regs); | 127 | struct perf_sample_data *data, struct pt_regs *regs); |
128 | 128 | ||
129 | #define task_pt_regs(task) \ | 129 | #define task_pt_regs(task) \ |
diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7757.c b/arch/sh/kernel/cpu/sh4a/setup-sh7757.c index e915deafac89..05559295d2ca 100644 --- a/arch/sh/kernel/cpu/sh4a/setup-sh7757.c +++ b/arch/sh/kernel/cpu/sh4a/setup-sh7757.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/serial_sci.h> | 15 | #include <linux/serial_sci.h> |
16 | #include <linux/io.h> | 16 | #include <linux/io.h> |
17 | #include <linux/mm.h> | 17 | #include <linux/mm.h> |
18 | #include <linux/dma-mapping.h> | ||
18 | #include <linux/sh_timer.h> | 19 | #include <linux/sh_timer.h> |
19 | #include <linux/sh_dma.h> | 20 | #include <linux/sh_dma.h> |
20 | 21 | ||
diff --git a/arch/sh/kernel/idle.c b/arch/sh/kernel/idle.c index 32114e0941ae..db4ecd731a00 100644 --- a/arch/sh/kernel/idle.c +++ b/arch/sh/kernel/idle.c | |||
@@ -22,7 +22,7 @@ | |||
22 | #include <linux/atomic.h> | 22 | #include <linux/atomic.h> |
23 | #include <asm/smp.h> | 23 | #include <asm/smp.h> |
24 | 24 | ||
25 | static void (*pm_idle)(void); | 25 | void (*pm_idle)(void); |
26 | 26 | ||
27 | static int hlt_counter; | 27 | static int hlt_counter; |
28 | 28 | ||
diff --git a/arch/sh/kernel/traps_32.c b/arch/sh/kernel/traps_32.c index d9006f8ffc14..7bbef95c9d1b 100644 --- a/arch/sh/kernel/traps_32.c +++ b/arch/sh/kernel/traps_32.c | |||
@@ -316,6 +316,35 @@ static int handle_unaligned_ins(insn_size_t instruction, struct pt_regs *regs, | |||
316 | break; | 316 | break; |
317 | } | 317 | } |
318 | break; | 318 | break; |
319 | |||
320 | case 9: /* mov.w @(disp,PC),Rn */ | ||
321 | srcu = (unsigned char __user *)regs->pc; | ||
322 | srcu += 4; | ||
323 | srcu += (instruction & 0x00FF) << 1; | ||
324 | dst = (unsigned char *)rn; | ||
325 | *(unsigned long *)dst = 0; | ||
326 | |||
327 | #if !defined(__LITTLE_ENDIAN__) | ||
328 | dst += 2; | ||
329 | #endif | ||
330 | |||
331 | if (ma->from(dst, srcu, 2)) | ||
332 | goto fetch_fault; | ||
333 | sign_extend(2, dst); | ||
334 | ret = 0; | ||
335 | break; | ||
336 | |||
337 | case 0xd: /* mov.l @(disp,PC),Rn */ | ||
338 | srcu = (unsigned char __user *)(regs->pc & ~0x3); | ||
339 | srcu += 4; | ||
340 | srcu += (instruction & 0x00FF) << 2; | ||
341 | dst = (unsigned char *)rn; | ||
342 | *(unsigned long *)dst = 0; | ||
343 | |||
344 | if (ma->from(dst, srcu, 4)) | ||
345 | goto fetch_fault; | ||
346 | ret = 0; | ||
347 | break; | ||
319 | } | 348 | } |
320 | return ret; | 349 | return ret; |
321 | 350 | ||
@@ -466,6 +495,7 @@ int handle_unaligned_access(insn_size_t instruction, struct pt_regs *regs, | |||
466 | case 0x0500: /* mov.w @(disp,Rm),R0 */ | 495 | case 0x0500: /* mov.w @(disp,Rm),R0 */ |
467 | goto simple; | 496 | goto simple; |
468 | case 0x0B00: /* bf lab - no delayslot*/ | 497 | case 0x0B00: /* bf lab - no delayslot*/ |
498 | ret = 0; | ||
469 | break; | 499 | break; |
470 | case 0x0F00: /* bf/s lab */ | 500 | case 0x0F00: /* bf/s lab */ |
471 | ret = handle_delayslot(regs, instruction, ma); | 501 | ret = handle_delayslot(regs, instruction, ma); |
@@ -479,6 +509,7 @@ int handle_unaligned_access(insn_size_t instruction, struct pt_regs *regs, | |||
479 | } | 509 | } |
480 | break; | 510 | break; |
481 | case 0x0900: /* bt lab - no delayslot */ | 511 | case 0x0900: /* bt lab - no delayslot */ |
512 | ret = 0; | ||
482 | break; | 513 | break; |
483 | case 0x0D00: /* bt/s lab */ | 514 | case 0x0D00: /* bt/s lab */ |
484 | ret = handle_delayslot(regs, instruction, ma); | 515 | ret = handle_delayslot(regs, instruction, ma); |
@@ -494,6 +525,9 @@ int handle_unaligned_access(insn_size_t instruction, struct pt_regs *regs, | |||
494 | } | 525 | } |
495 | break; | 526 | break; |
496 | 527 | ||
528 | case 0x9000: /* mov.w @(disp,Rm),Rn */ | ||
529 | goto simple; | ||
530 | |||
497 | case 0xA000: /* bra label */ | 531 | case 0xA000: /* bra label */ |
498 | ret = handle_delayslot(regs, instruction, ma); | 532 | ret = handle_delayslot(regs, instruction, ma); |
499 | if (ret==0) | 533 | if (ret==0) |
@@ -507,6 +541,9 @@ int handle_unaligned_access(insn_size_t instruction, struct pt_regs *regs, | |||
507 | regs->pc += SH_PC_12BIT_OFFSET(instruction); | 541 | regs->pc += SH_PC_12BIT_OFFSET(instruction); |
508 | } | 542 | } |
509 | break; | 543 | break; |
544 | |||
545 | case 0xD000: /* mov.l @(disp,Rm),Rn */ | ||
546 | goto simple; | ||
510 | } | 547 | } |
511 | return ret; | 548 | return ret; |
512 | 549 | ||