diff options
author | Arnd Bergmann <arnd@arndb.de> | 2006-12-06 23:37:29 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.osdl.org> | 2006-12-07 11:39:37 -0500 |
commit | f5738ceed46782aea7663d62cb6398eb05fc4ce0 (patch) | |
tree | 156ebf498bc1d892d6f9e33d2751869417e30eb4 /include/asm-sh | |
parent | 28ec24e23229ae3d333f8d7f0e6b31fa8ea7bf46 (diff) |
[PATCH] remove kernel syscalls
The last thing we agreed on was to remove the macros entirely for 2.6.19,
on all architectures. Unfortunately, I think nobody actually _did_ that,
so they are still there.
[akpm@osdl.org: x86_64 fix]
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Greg Schafer <gschafer@zip.com.au>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/asm-sh')
-rw-r--r-- | include/asm-sh/unistd.h | 137 |
1 files changed, 0 insertions, 137 deletions
diff --git a/include/asm-sh/unistd.h b/include/asm-sh/unistd.h index 0cae1d248761..f982073dc6c6 100644 --- a/include/asm-sh/unistd.h +++ b/include/asm-sh/unistd.h | |||
@@ -332,143 +332,6 @@ | |||
332 | 332 | ||
333 | #ifdef __KERNEL__ | 333 | #ifdef __KERNEL__ |
334 | 334 | ||
335 | #include <linux/err.h> | ||
336 | |||
337 | /* user-visible error numbers are in the range -1 - -MAX_ERRNO: | ||
338 | * see <asm-sh/errno.h> */ | ||
339 | |||
340 | #define __syscall_return(type, res) \ | ||
341 | do { \ | ||
342 | if ((unsigned long)(res) >= (unsigned long)(-MAX_ERRNO)) { \ | ||
343 | /* Avoid using "res" which is declared to be in register r0; \ | ||
344 | errno might expand to a function call and clobber it. */ \ | ||
345 | int __err = -(res); \ | ||
346 | errno = __err; \ | ||
347 | res = -1; \ | ||
348 | } \ | ||
349 | return (type) (res); \ | ||
350 | } while (0) | ||
351 | |||
352 | #if defined(__sh2__) || defined(__SH2E__) || defined(__SH2A__) | ||
353 | #define SYSCALL_ARG0 "trapa #0x20" | ||
354 | #define SYSCALL_ARG1 "trapa #0x21" | ||
355 | #define SYSCALL_ARG2 "trapa #0x22" | ||
356 | #define SYSCALL_ARG3 "trapa #0x23" | ||
357 | #define SYSCALL_ARG4 "trapa #0x24" | ||
358 | #define SYSCALL_ARG5 "trapa #0x25" | ||
359 | #define SYSCALL_ARG6 "trapa #0x26" | ||
360 | #else | ||
361 | #define SYSCALL_ARG0 "trapa #0x10" | ||
362 | #define SYSCALL_ARG1 "trapa #0x11" | ||
363 | #define SYSCALL_ARG2 "trapa #0x12" | ||
364 | #define SYSCALL_ARG3 "trapa #0x13" | ||
365 | #define SYSCALL_ARG4 "trapa #0x14" | ||
366 | #define SYSCALL_ARG5 "trapa #0x15" | ||
367 | #define SYSCALL_ARG6 "trapa #0x16" | ||
368 | #endif | ||
369 | |||
370 | /* XXX - _foo needs to be __foo, while __NR_bar could be _NR_bar. */ | ||
371 | #define _syscall0(type,name) \ | ||
372 | type name(void) \ | ||
373 | { \ | ||
374 | register long __sc0 __asm__ ("r3") = __NR_##name; \ | ||
375 | __asm__ __volatile__ (SYSCALL_ARG0 \ | ||
376 | : "=z" (__sc0) \ | ||
377 | : "0" (__sc0) \ | ||
378 | : "memory" ); \ | ||
379 | __syscall_return(type,__sc0); \ | ||
380 | } | ||
381 | |||
382 | #define _syscall1(type,name,type1,arg1) \ | ||
383 | type name(type1 arg1) \ | ||
384 | { \ | ||
385 | register long __sc0 __asm__ ("r3") = __NR_##name; \ | ||
386 | register long __sc4 __asm__ ("r4") = (long) arg1; \ | ||
387 | __asm__ __volatile__ (SYSCALL_ARG1 \ | ||
388 | : "=z" (__sc0) \ | ||
389 | : "0" (__sc0), "r" (__sc4) \ | ||
390 | : "memory"); \ | ||
391 | __syscall_return(type,__sc0); \ | ||
392 | } | ||
393 | |||
394 | #define _syscall2(type,name,type1,arg1,type2,arg2) \ | ||
395 | type name(type1 arg1,type2 arg2) \ | ||
396 | { \ | ||
397 | register long __sc0 __asm__ ("r3") = __NR_##name; \ | ||
398 | register long __sc4 __asm__ ("r4") = (long) arg1; \ | ||
399 | register long __sc5 __asm__ ("r5") = (long) arg2; \ | ||
400 | __asm__ __volatile__ (SYSCALL_ARG2 \ | ||
401 | : "=z" (__sc0) \ | ||
402 | : "0" (__sc0), "r" (__sc4), "r" (__sc5) \ | ||
403 | : "memory"); \ | ||
404 | __syscall_return(type,__sc0); \ | ||
405 | } | ||
406 | |||
407 | #define _syscall3(type,name,type1,arg1,type2,arg2,type3,arg3) \ | ||
408 | type name(type1 arg1,type2 arg2,type3 arg3) \ | ||
409 | { \ | ||
410 | register long __sc0 __asm__ ("r3") = __NR_##name; \ | ||
411 | register long __sc4 __asm__ ("r4") = (long) arg1; \ | ||
412 | register long __sc5 __asm__ ("r5") = (long) arg2; \ | ||
413 | register long __sc6 __asm__ ("r6") = (long) arg3; \ | ||
414 | __asm__ __volatile__ (SYSCALL_ARG3 \ | ||
415 | : "=z" (__sc0) \ | ||
416 | : "0" (__sc0), "r" (__sc4), "r" (__sc5), "r" (__sc6) \ | ||
417 | : "memory"); \ | ||
418 | __syscall_return(type,__sc0); \ | ||
419 | } | ||
420 | |||
421 | #define _syscall4(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4) \ | ||
422 | type name (type1 arg1, type2 arg2, type3 arg3, type4 arg4) \ | ||
423 | { \ | ||
424 | register long __sc0 __asm__ ("r3") = __NR_##name; \ | ||
425 | register long __sc4 __asm__ ("r4") = (long) arg1; \ | ||
426 | register long __sc5 __asm__ ("r5") = (long) arg2; \ | ||
427 | register long __sc6 __asm__ ("r6") = (long) arg3; \ | ||
428 | register long __sc7 __asm__ ("r7") = (long) arg4; \ | ||
429 | __asm__ __volatile__ (SYSCALL_ARG4 \ | ||
430 | : "=z" (__sc0) \ | ||
431 | : "0" (__sc0), "r" (__sc4), "r" (__sc5), "r" (__sc6), \ | ||
432 | "r" (__sc7) \ | ||
433 | : "memory" ); \ | ||
434 | __syscall_return(type,__sc0); \ | ||
435 | } | ||
436 | |||
437 | #define _syscall5(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4,type5,arg5) \ | ||
438 | type name (type1 arg1, type2 arg2, type3 arg3, type4 arg4, type5 arg5) \ | ||
439 | { \ | ||
440 | register long __sc3 __asm__ ("r3") = __NR_##name; \ | ||
441 | register long __sc4 __asm__ ("r4") = (long) arg1; \ | ||
442 | register long __sc5 __asm__ ("r5") = (long) arg2; \ | ||
443 | register long __sc6 __asm__ ("r6") = (long) arg3; \ | ||
444 | register long __sc7 __asm__ ("r7") = (long) arg4; \ | ||
445 | register long __sc0 __asm__ ("r0") = (long) arg5; \ | ||
446 | __asm__ __volatile__ (SYSCALL_ARG5 \ | ||
447 | : "=z" (__sc0) \ | ||
448 | : "0" (__sc0), "r" (__sc4), "r" (__sc5), "r" (__sc6), "r" (__sc7), \ | ||
449 | "r" (__sc3) \ | ||
450 | : "memory" ); \ | ||
451 | __syscall_return(type,__sc0); \ | ||
452 | } | ||
453 | |||
454 | #define _syscall6(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4,type5,arg5,type6,arg6) \ | ||
455 | type name (type1 arg1, type2 arg2, type3 arg3, type4 arg4, type5 arg5, type6 arg6) \ | ||
456 | { \ | ||
457 | register long __sc3 __asm__ ("r3") = __NR_##name; \ | ||
458 | register long __sc4 __asm__ ("r4") = (long) arg1; \ | ||
459 | register long __sc5 __asm__ ("r5") = (long) arg2; \ | ||
460 | register long __sc6 __asm__ ("r6") = (long) arg3; \ | ||
461 | register long __sc7 __asm__ ("r7") = (long) arg4; \ | ||
462 | register long __sc0 __asm__ ("r0") = (long) arg5; \ | ||
463 | register long __sc1 __asm__ ("r1") = (long) arg6; \ | ||
464 | __asm__ __volatile__ (SYSCALL_ARG6 \ | ||
465 | : "=z" (__sc0) \ | ||
466 | : "0" (__sc0), "r" (__sc4), "r" (__sc5), "r" (__sc6), "r" (__sc7), \ | ||
467 | "r" (__sc3), "r" (__sc1) \ | ||
468 | : "memory" ); \ | ||
469 | __syscall_return(type,__sc0); \ | ||
470 | } | ||
471 | |||
472 | #define __ARCH_WANT_IPC_PARSE_VERSION | 335 | #define __ARCH_WANT_IPC_PARSE_VERSION |
473 | #define __ARCH_WANT_OLD_READDIR | 336 | #define __ARCH_WANT_OLD_READDIR |
474 | #define __ARCH_WANT_OLD_STAT | 337 | #define __ARCH_WANT_OLD_STAT |