Skip to content

Commit

Permalink
[MIPS] Fix AP/SP to work in the reality of modern kernels.
Browse files Browse the repository at this point in the history
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
  • Loading branch information
Ralf Baechle committed Apr 27, 2007
1 parent de46c33 commit 7f5a771
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
5 changes: 1 addition & 4 deletions arch/mips/kernel/kspd.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
*/
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/sched.h>
#include <linux/unistd.h>
#include <linux/file.h>
#include <linux/fs.h>
Expand Down Expand Up @@ -198,7 +199,6 @@ void sp_work_handle_request(void)
int cmd;

char *vcwd;
mm_segment_t old_fs;
int size;

ret.retval = -1;
Expand Down Expand Up @@ -241,8 +241,6 @@ void sp_work_handle_request(void)
if ((ret.retval = sp_syscall(__NR_gettimeofday, (int)&tv,
(int)&tz, 0,0)) == 0)
ret.retval = tv.tv_sec;

ret.errno = errno;
break;

case MTSP_SYSCALL_EXIT:
Expand Down Expand Up @@ -279,7 +277,6 @@ void sp_work_handle_request(void)
if (cmd >= 0) {
ret.retval = sp_syscall(cmd, generic.arg0, generic.arg1,
generic.arg2, generic.arg3);
ret.errno = errno;
} else
printk(KERN_WARNING
"KSPD: Unknown SP syscall number %d\n", sc.cmd);
Expand Down
7 changes: 4 additions & 3 deletions arch/mips/kernel/rtlx.c
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ unsigned int rtlx_write_poll(int index)
return write_spacefree(chan->rt_read, chan->rt_write, chan->buffer_size);
}

ssize_t rtlx_read(int index, void __user *buff, size_t count, int user)
ssize_t rtlx_read(int index, void __user *buff, size_t count)
{
size_t lx_write, fl = 0L;
struct rtlx_channel *lx;
Expand Down Expand Up @@ -331,9 +331,10 @@ ssize_t rtlx_read(int index, void __user *buff, size_t count, int user)
return count;
}

ssize_t rtlx_write(int index, const void __user *buffer, size_t count, int user)
ssize_t rtlx_write(int index, const void __user *buffer, size_t count)
{
struct rtlx_channel *rt;
unsigned long failed;
size_t rt_read;
size_t fl;

Expand Down Expand Up @@ -363,7 +364,7 @@ ssize_t rtlx_write(int index, const void __user *buffer, size_t count, int user)
}

out:
count -= cailed;
count -= failed;

smp_wmb();
rt->rt_write = (rt->rt_write + count) % rt->buffer_size;
Expand Down

0 comments on commit 7f5a771

Please sign in to comment.