diff options
Diffstat (limited to 'arch/m68k/kernel')
-rw-r--r-- | arch/m68k/kernel/sys_m68k.c | 17 | ||||
-rw-r--r-- | arch/m68k/kernel/traps.c | 17 |
2 files changed, 14 insertions, 20 deletions
diff --git a/arch/m68k/kernel/sys_m68k.c b/arch/m68k/kernel/sys_m68k.c index e892f17ba3fa..7f54efaf60bb 100644 --- a/arch/m68k/kernel/sys_m68k.c +++ b/arch/m68k/kernel/sys_m68k.c | |||
@@ -30,23 +30,6 @@ | |||
30 | #include <asm/page.h> | 30 | #include <asm/page.h> |
31 | #include <asm/unistd.h> | 31 | #include <asm/unistd.h> |
32 | 32 | ||
33 | /* | ||
34 | * sys_pipe() is the normal C calling standard for creating | ||
35 | * a pipe. It's not the way unix traditionally does this, though. | ||
36 | */ | ||
37 | asmlinkage int sys_pipe(unsigned long __user * fildes) | ||
38 | { | ||
39 | int fd[2]; | ||
40 | int error; | ||
41 | |||
42 | error = do_pipe(fd); | ||
43 | if (!error) { | ||
44 | if (copy_to_user(fildes, fd, 2*sizeof(int))) | ||
45 | error = -EFAULT; | ||
46 | } | ||
47 | return error; | ||
48 | } | ||
49 | |||
50 | /* common code for old and new mmaps */ | 33 | /* common code for old and new mmaps */ |
51 | static inline long do_mmap2( | 34 | static inline long do_mmap2( |
52 | unsigned long addr, unsigned long len, | 35 | unsigned long addr, unsigned long len, |
diff --git a/arch/m68k/kernel/traps.c b/arch/m68k/kernel/traps.c index fd4858e2dd63..75b8340b254b 100644 --- a/arch/m68k/kernel/traps.c +++ b/arch/m68k/kernel/traps.c | |||
@@ -468,15 +468,26 @@ static inline void access_error040(struct frame *fp) | |||
468 | * (if do_page_fault didn't fix the mapping, | 468 | * (if do_page_fault didn't fix the mapping, |
469 | * the writeback won't do good) | 469 | * the writeback won't do good) |
470 | */ | 470 | */ |
471 | disable_wb: | ||
471 | #ifdef DEBUG | 472 | #ifdef DEBUG |
472 | printk(".. disabling wb2\n"); | 473 | printk(".. disabling wb2\n"); |
473 | #endif | 474 | #endif |
474 | if (fp->un.fmt7.wb2a == fp->un.fmt7.faddr) | 475 | if (fp->un.fmt7.wb2a == fp->un.fmt7.faddr) |
475 | fp->un.fmt7.wb2s &= ~WBV_040; | 476 | fp->un.fmt7.wb2s &= ~WBV_040; |
477 | if (fp->un.fmt7.wb3a == fp->un.fmt7.faddr) | ||
478 | fp->un.fmt7.wb3s &= ~WBV_040; | ||
476 | } | 479 | } |
477 | } else if (send_fault_sig(&fp->ptregs) > 0) { | 480 | } else { |
478 | printk("68040 access error, ssw=%x\n", ssw); | 481 | /* In case of a bus error we either kill the process or expect |
479 | trap_c(fp); | 482 | * the kernel to catch the fault, which then is also responsible |
483 | * for cleaning up the mess. | ||
484 | */ | ||
485 | current->thread.signo = SIGBUS; | ||
486 | current->thread.faddr = fp->un.fmt7.faddr; | ||
487 | if (send_fault_sig(&fp->ptregs) >= 0) | ||
488 | printk("68040 bus error (ssw=%x, faddr=%lx)\n", ssw, | ||
489 | fp->un.fmt7.faddr); | ||
490 | goto disable_wb; | ||
480 | } | 491 | } |
481 | 492 | ||
482 | do_040writebacks(fp); | 493 | do_040writebacks(fp); |