diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-07-31 23:41:53 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-07-31 23:41:53 -0400 |
commit | d6dd9e93c7531fa31370e27d053a3940d8d662fb (patch) | |
tree | afab573031b3f0b9bbe5e417a890f7cae09a7224 /arch/mips/kernel/kspd.c | |
parent | dd9cd6d4351076c78bb8c0f9146d1904b481fdbb (diff) | |
parent | b4b2917cc8babe8eaf4bc133bca31b11ed7dac13 (diff) |
Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus
* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus: (50 commits)
[MIPS] Add smp_call_function_single()
[MIPS] thread_info.h: kmalloc + memset conversion to kzalloc
[MIPS] Kexec: Fix several 64-bit bugs.
[MIPS] Kexec: Fix several warnings.
[MIPS] DDB5477: Remove support
[MIPS] Fulong: Remove unneeded header file
[MIPS] Cobalt: Enable UART on RaQ1
[MIPS] Remove unused GROUP_TOSHIBA_NAMES
[MIPS] remove some duplicate includes
[MIPS] Oprofile: Fix rm9000 performance counter handler
[MIPS] Use -Werror on subdirectories which build cleanly.
[MIPS] Yosemite: Fix warning.
[MIPS] PMON: Fix cpustart declaration.
[MIPS] Yosemite: Only build ll_ht_smp_irq_handler() if HYPERTRANSPORT.
[MIPS] Yosemite: Fix build error due to undeclared titan_mailbox_irq().
[MIPS] Yosemite: Don't declare titan_mailbox_irq() as asmlinkage.
[MIPS] Yosemite: Fix warnings in i2c-yoesmite by deleting the unused code.
[MIPS] Delete unused arch/mips/gt64120/common/
[MIPS] Fix build warning in unaligned load/store emulator.
[MIPS] IP32: Don't ignore request_irq's return value.
...
Diffstat (limited to 'arch/mips/kernel/kspd.c')
-rw-r--r-- | arch/mips/kernel/kspd.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/arch/mips/kernel/kspd.c b/arch/mips/kernel/kspd.c index c6580018c94b..cb9a14a1ca5b 100644 --- a/arch/mips/kernel/kspd.c +++ b/arch/mips/kernel/kspd.c | |||
@@ -89,7 +89,7 @@ static int sp_stopping = 0; | |||
89 | #define MTSP_O_EXCL 0x0800 | 89 | #define MTSP_O_EXCL 0x0800 |
90 | #define MTSP_O_BINARY 0x8000 | 90 | #define MTSP_O_BINARY 0x8000 |
91 | 91 | ||
92 | #define SP_VPE 1 | 92 | extern int tclimit; |
93 | 93 | ||
94 | struct apsp_table { | 94 | struct apsp_table { |
95 | int sp; | 95 | int sp; |
@@ -225,8 +225,8 @@ void sp_work_handle_request(void) | |||
225 | /* Run the syscall at the priviledge of the user who loaded the | 225 | /* Run the syscall at the priviledge of the user who loaded the |
226 | SP program */ | 226 | SP program */ |
227 | 227 | ||
228 | if (vpe_getuid(SP_VPE)) | 228 | if (vpe_getuid(tclimit)) |
229 | sp_setfsuidgid( vpe_getuid(SP_VPE), vpe_getgid(SP_VPE)); | 229 | sp_setfsuidgid(vpe_getuid(tclimit), vpe_getgid(tclimit)); |
230 | 230 | ||
231 | switch (sc.cmd) { | 231 | switch (sc.cmd) { |
232 | /* needs the flags argument translating from SDE kit to | 232 | /* needs the flags argument translating from SDE kit to |
@@ -245,7 +245,7 @@ void sp_work_handle_request(void) | |||
245 | 245 | ||
246 | case MTSP_SYSCALL_EXIT: | 246 | case MTSP_SYSCALL_EXIT: |
247 | list_for_each_entry(n, &kspd_notifylist, list) | 247 | list_for_each_entry(n, &kspd_notifylist, list) |
248 | n->kspd_sp_exit(SP_VPE); | 248 | n->kspd_sp_exit(tclimit); |
249 | sp_stopping = 1; | 249 | sp_stopping = 1; |
250 | 250 | ||
251 | printk(KERN_DEBUG "KSPD got exit syscall from SP exitcode %d\n", | 251 | printk(KERN_DEBUG "KSPD got exit syscall from SP exitcode %d\n", |
@@ -255,7 +255,7 @@ void sp_work_handle_request(void) | |||
255 | case MTSP_SYSCALL_OPEN: | 255 | case MTSP_SYSCALL_OPEN: |
256 | generic.arg1 = translate_open_flags(generic.arg1); | 256 | generic.arg1 = translate_open_flags(generic.arg1); |
257 | 257 | ||
258 | vcwd = vpe_getcwd(SP_VPE); | 258 | vcwd = vpe_getcwd(tclimit); |
259 | 259 | ||
260 | /* change to the cwd of the process that loaded the SP program */ | 260 | /* change to the cwd of the process that loaded the SP program */ |
261 | old_fs = get_fs(); | 261 | old_fs = get_fs(); |
@@ -283,7 +283,7 @@ void sp_work_handle_request(void) | |||
283 | break; | 283 | break; |
284 | } /* switch */ | 284 | } /* switch */ |
285 | 285 | ||
286 | if (vpe_getuid(SP_VPE)) | 286 | if (vpe_getuid(tclimit)) |
287 | sp_setfsuidgid( 0, 0); | 287 | sp_setfsuidgid( 0, 0); |
288 | 288 | ||
289 | old_fs = get_fs(); | 289 | old_fs = get_fs(); |
@@ -364,10 +364,9 @@ static void startwork(int vpe) | |||
364 | } | 364 | } |
365 | 365 | ||
366 | INIT_WORK(&work, sp_work); | 366 | INIT_WORK(&work, sp_work); |
367 | queue_work(workqueue, &work); | 367 | } |
368 | } else | ||
369 | queue_work(workqueue, &work); | ||
370 | 368 | ||
369 | queue_work(workqueue, &work); | ||
371 | } | 370 | } |
372 | 371 | ||
373 | static void stopwork(int vpe) | 372 | static void stopwork(int vpe) |
@@ -389,7 +388,7 @@ static int kspd_module_init(void) | |||
389 | 388 | ||
390 | notify.start = startwork; | 389 | notify.start = startwork; |
391 | notify.stop = stopwork; | 390 | notify.stop = stopwork; |
392 | vpe_notify(SP_VPE, ¬ify); | 391 | vpe_notify(tclimit, ¬ify); |
393 | 392 | ||
394 | return 0; | 393 | return 0; |
395 | } | 394 | } |