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-sh64 | |
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-sh64')
-rw-r--r-- | include/asm-sh64/unistd.h | 142 |
1 files changed, 0 insertions, 142 deletions
diff --git a/include/asm-sh64/unistd.h b/include/asm-sh64/unistd.h index ee7828b27ad1..1f38a7aacaaf 100644 --- a/include/asm-sh64/unistd.h +++ b/include/asm-sh64/unistd.h | |||
@@ -347,148 +347,6 @@ | |||
347 | #ifdef __KERNEL__ | 347 | #ifdef __KERNEL__ |
348 | 348 | ||
349 | #define NR_syscalls 321 | 349 | #define NR_syscalls 321 |
350 | #include <linux/err.h> | ||
351 | |||
352 | /* user-visible error numbers are in the range -1 - -MAX_ERRNO: | ||
353 | * see <asm-sh64/errno.h> */ | ||
354 | |||
355 | #define __syscall_return(type, res) \ | ||
356 | do { \ | ||
357 | /* Note: when returning from kernel the return value is in r9 \ | ||
358 | ** This prevents conflicts between return value and arg1 \ | ||
359 | ** when dispatching signal handler, in other words makes \ | ||
360 | ** life easier in the system call epilogue (see entry.S) \ | ||
361 | */ \ | ||
362 | register unsigned long __sr2 __asm__ ("r2") = res; \ | ||
363 | if ((unsigned long)(res) >= (unsigned long)(-MAX_ERRNO)) { \ | ||
364 | errno = -(res); \ | ||
365 | __sr2 = -1; \ | ||
366 | } \ | ||
367 | return (type) (__sr2); \ | ||
368 | } while (0) | ||
369 | |||
370 | /* XXX - _foo needs to be __foo, while __NR_bar could be _NR_bar. */ | ||
371 | |||
372 | #define _syscall0(type,name) \ | ||
373 | type name(void) \ | ||
374 | { \ | ||
375 | register unsigned long __sc0 __asm__ ("r9") = ((0x10 << 16) | __NR_##name); \ | ||
376 | __asm__ __volatile__ ("trapa %1 !\t\t\t" #name "()" \ | ||
377 | : "=r" (__sc0) \ | ||
378 | : "r" (__sc0) ); \ | ||
379 | __syscall_return(type,__sc0); \ | ||
380 | } | ||
381 | |||
382 | /* | ||
383 | * The apparent spurious "dummy" assembler comment is *needed*, | ||
384 | * as without it, the compiler treats the arg<n> variables | ||
385 | * as no longer live just before the asm. The compiler can | ||
386 | * then optimize the storage into any registers it wishes. | ||
387 | * The additional dummy statement forces the compiler to put | ||
388 | * the arguments into the correct registers before the TRAPA. | ||
389 | */ | ||
390 | #define _syscall1(type,name,type1,arg1) \ | ||
391 | type name(type1 arg1) \ | ||
392 | { \ | ||
393 | register unsigned long __sc0 __asm__ ("r9") = ((0x11 << 16) | __NR_##name); \ | ||
394 | register unsigned long __sc2 __asm__ ("r2") = (unsigned long) arg1; \ | ||
395 | __asm__ __volatile__ ("trapa %1 !\t\t\t" #name "(%2)" \ | ||
396 | : "=r" (__sc0) \ | ||
397 | : "r" (__sc0), "r" (__sc2)); \ | ||
398 | __asm__ __volatile__ ("!dummy %0 %1" \ | ||
399 | : \ | ||
400 | : "r" (__sc0), "r" (__sc2)); \ | ||
401 | __syscall_return(type,__sc0); \ | ||
402 | } | ||
403 | |||
404 | #define _syscall2(type,name,type1,arg1,type2,arg2) \ | ||
405 | type name(type1 arg1,type2 arg2) \ | ||
406 | { \ | ||
407 | register unsigned long __sc0 __asm__ ("r9") = ((0x12 << 16) | __NR_##name); \ | ||
408 | register unsigned long __sc2 __asm__ ("r2") = (unsigned long) arg1; \ | ||
409 | register unsigned long __sc3 __asm__ ("r3") = (unsigned long) arg2; \ | ||
410 | __asm__ __volatile__ ("trapa %1 !\t\t\t" #name "(%2,%3)" \ | ||
411 | : "=r" (__sc0) \ | ||
412 | : "r" (__sc0), "r" (__sc2), "r" (__sc3) ); \ | ||
413 | __asm__ __volatile__ ("!dummy %0 %1 %2" \ | ||
414 | : \ | ||
415 | : "r" (__sc0), "r" (__sc2), "r" (__sc3) ); \ | ||
416 | __syscall_return(type,__sc0); \ | ||
417 | } | ||
418 | |||
419 | #define _syscall3(type,name,type1,arg1,type2,arg2,type3,arg3) \ | ||
420 | type name(type1 arg1,type2 arg2,type3 arg3) \ | ||
421 | { \ | ||
422 | register unsigned long __sc0 __asm__ ("r9") = ((0x13 << 16) | __NR_##name); \ | ||
423 | register unsigned long __sc2 __asm__ ("r2") = (unsigned long) arg1; \ | ||
424 | register unsigned long __sc3 __asm__ ("r3") = (unsigned long) arg2; \ | ||
425 | register unsigned long __sc4 __asm__ ("r4") = (unsigned long) arg3; \ | ||
426 | __asm__ __volatile__ ("trapa %1 !\t\t\t" #name "(%2,%3,%4)" \ | ||
427 | : "=r" (__sc0) \ | ||
428 | : "r" (__sc0), "r" (__sc2), "r" (__sc3), "r" (__sc4) ); \ | ||
429 | __asm__ __volatile__ ("!dummy %0 %1 %2 %3" \ | ||
430 | : \ | ||
431 | : "r" (__sc0), "r" (__sc2), "r" (__sc3), "r" (__sc4) ); \ | ||
432 | __syscall_return(type,__sc0); \ | ||
433 | } | ||
434 | |||
435 | #define _syscall4(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4) \ | ||
436 | type name (type1 arg1, type2 arg2, type3 arg3, type4 arg4) \ | ||
437 | { \ | ||
438 | register unsigned long __sc0 __asm__ ("r9") = ((0x14 << 16) | __NR_##name); \ | ||
439 | register unsigned long __sc2 __asm__ ("r2") = (unsigned long) arg1; \ | ||
440 | register unsigned long __sc3 __asm__ ("r3") = (unsigned long) arg2; \ | ||
441 | register unsigned long __sc4 __asm__ ("r4") = (unsigned long) arg3; \ | ||
442 | register unsigned long __sc5 __asm__ ("r5") = (unsigned long) arg4; \ | ||
443 | __asm__ __volatile__ ("trapa %1 !\t\t\t" #name "(%2,%3,%4,%5)" \ | ||
444 | : "=r" (__sc0) \ | ||
445 | : "r" (__sc0), "r" (__sc2), "r" (__sc3), "r" (__sc4), "r" (__sc5) );\ | ||
446 | __asm__ __volatile__ ("!dummy %0 %1 %2 %3 %4" \ | ||
447 | : \ | ||
448 | : "r" (__sc0), "r" (__sc2), "r" (__sc3), "r" (__sc4), "r" (__sc5) );\ | ||
449 | __syscall_return(type,__sc0); \ | ||
450 | } | ||
451 | |||
452 | #define _syscall5(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4,type5,arg5) \ | ||
453 | type name (type1 arg1, type2 arg2, type3 arg3, type4 arg4, type5 arg5) \ | ||
454 | { \ | ||
455 | register unsigned long __sc0 __asm__ ("r9") = ((0x15 << 16) | __NR_##name); \ | ||
456 | register unsigned long __sc2 __asm__ ("r2") = (unsigned long) arg1; \ | ||
457 | register unsigned long __sc3 __asm__ ("r3") = (unsigned long) arg2; \ | ||
458 | register unsigned long __sc4 __asm__ ("r4") = (unsigned long) arg3; \ | ||
459 | register unsigned long __sc5 __asm__ ("r5") = (unsigned long) arg4; \ | ||
460 | register unsigned long __sc6 __asm__ ("r6") = (unsigned long) arg5; \ | ||
461 | __asm__ __volatile__ ("trapa %1 !\t\t\t" #name "(%2,%3,%4,%5,%6)" \ | ||
462 | : "=r" (__sc0) \ | ||
463 | : "r" (__sc0), "r" (__sc2), "r" (__sc3), "r" (__sc4), "r" (__sc5), \ | ||
464 | "r" (__sc6)); \ | ||
465 | __asm__ __volatile__ ("!dummy %0 %1 %2 %3 %4 %5" \ | ||
466 | : \ | ||
467 | : "r" (__sc0), "r" (__sc2), "r" (__sc3), "r" (__sc4), "r" (__sc5), \ | ||
468 | "r" (__sc6)); \ | ||
469 | __syscall_return(type,__sc0); \ | ||
470 | } | ||
471 | |||
472 | #define _syscall6(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4,type5,arg5, type6, arg6) \ | ||
473 | type name (type1 arg1, type2 arg2, type3 arg3, type4 arg4, type5 arg5, type6 arg6) \ | ||
474 | { \ | ||
475 | register unsigned long __sc0 __asm__ ("r9") = ((0x16 << 16) | __NR_##name); \ | ||
476 | register unsigned long __sc2 __asm__ ("r2") = (unsigned long) arg1; \ | ||
477 | register unsigned long __sc3 __asm__ ("r3") = (unsigned long) arg2; \ | ||
478 | register unsigned long __sc4 __asm__ ("r4") = (unsigned long) arg3; \ | ||
479 | register unsigned long __sc5 __asm__ ("r5") = (unsigned long) arg4; \ | ||
480 | register unsigned long __sc6 __asm__ ("r6") = (unsigned long) arg5; \ | ||
481 | register unsigned long __sc7 __asm__ ("r7") = (unsigned long) arg6; \ | ||
482 | __asm__ __volatile__ ("trapa %1 !\t\t\t" #name "(%2,%3,%4,%5,%6,%7)" \ | ||
483 | : "=r" (__sc0) \ | ||
484 | : "r" (__sc0), "r" (__sc2), "r" (__sc3), "r" (__sc4), "r" (__sc5), \ | ||
485 | "r" (__sc6), "r" (__sc7)); \ | ||
486 | __asm__ __volatile__ ("!dummy %0 %1 %2 %3 %4 %5 %6" \ | ||
487 | : \ | ||
488 | : "r" (__sc0), "r" (__sc2), "r" (__sc3), "r" (__sc4), "r" (__sc5), \ | ||
489 | "r" (__sc6), "r" (__sc7)); \ | ||
490 | __syscall_return(type,__sc0); \ | ||
491 | } | ||
492 | 350 | ||
493 | #define __ARCH_WANT_IPC_PARSE_VERSION | 351 | #define __ARCH_WANT_IPC_PARSE_VERSION |
494 | #define __ARCH_WANT_OLD_READDIR | 352 | #define __ARCH_WANT_OLD_READDIR |