aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-m68knommu
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2006-12-06 23:37:29 -0500
committerLinus Torvalds <torvalds@woody.osdl.org>2006-12-07 11:39:37 -0500
commitf5738ceed46782aea7663d62cb6398eb05fc4ce0 (patch)
tree156ebf498bc1d892d6f9e33d2751869417e30eb4 /include/asm-m68knommu
parent28ec24e23229ae3d333f8d7f0e6b31fa8ea7bf46 (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-m68knommu')
-rw-r--r--include/asm-m68knommu/unistd.h150
1 files changed, 0 insertions, 150 deletions
diff --git a/include/asm-m68knommu/unistd.h b/include/asm-m68knommu/unistd.h
index ebaf03197114..82e03195f325 100644
--- a/include/asm-m68knommu/unistd.h
+++ b/include/asm-m68knommu/unistd.h
@@ -318,156 +318,6 @@
318#ifdef __KERNEL__ 318#ifdef __KERNEL__
319 319
320#define NR_syscalls 311 320#define NR_syscalls 311
321#include <linux/err.h>
322
323/* user-visible error numbers are in the range -1 - -MAX_ERRNO: see
324 <asm-m68k/errno.h> */
325
326#define __syscall_return(type, res) \
327do { \
328 if ((unsigned long)(res) >= (unsigned long)(-MAX_ERRNO)) { \
329 /* avoid using res which is declared to be in register d0; \
330 errno might expand to a function call and clobber it. */ \
331 int __err = -(res); \
332 errno = __err; \
333 res = -1; \
334 } \
335 return (type) (res); \
336} while (0)
337
338#define _syscall0(type, name) \
339type name(void) \
340{ \
341 long __res; \
342 __asm__ __volatile__ ("movel %1, %%d0\n\t" \
343 "trap #0\n\t" \
344 "movel %%d0, %0" \
345 : "=g" (__res) \
346 : "i" (__NR_##name) \
347 : "cc", "%d0"); \
348 if ((unsigned long)(__res) >= (unsigned long)(-125)) { \
349 errno = -__res; \
350 __res = -1; \
351 } \
352 return (type)__res; \
353}
354
355#define _syscall1(type, name, atype, a) \
356type name(atype a) \
357{ \
358 long __res; \
359 __asm__ __volatile__ ("movel %2, %%d1\n\t" \
360 "movel %1, %%d0\n\t" \
361 "trap #0\n\t" \
362 "movel %%d0, %0" \
363 : "=g" (__res) \
364 : "i" (__NR_##name), \
365 "g" ((long)a) \
366 : "cc", "%d0", "%d1"); \
367 if ((unsigned long)(__res) >= (unsigned long)(-125)) { \
368 errno = -__res; \
369 __res = -1; \
370 } \
371 return (type)__res; \
372}
373
374#define _syscall2(type, name, atype, a, btype, b) \
375type name(atype a, btype b) \
376{ \
377 long __res; \
378 __asm__ __volatile__ ("movel %3, %%d2\n\t" \
379 "movel %2, %%d1\n\t" \
380 "movel %1, %%d0\n\t" \
381 "trap #0\n\t" \
382 "movel %%d0, %0" \
383 : "=g" (__res) \
384 : "i" (__NR_##name), \
385 "a" ((long)a), \
386 "g" ((long)b) \
387 : "cc", "%d0", "%d1", "%d2"); \
388 if ((unsigned long)(__res) >= (unsigned long)(-125)) { \
389 errno = -__res; \
390 __res = -1; \
391 } \
392 return (type)__res; \
393}
394
395#define _syscall3(type, name, atype, a, btype, b, ctype, c) \
396type name(atype a, btype b, ctype c) \
397{ \
398 long __res; \
399 __asm__ __volatile__ ("movel %4, %%d3\n\t" \
400 "movel %3, %%d2\n\t" \
401 "movel %2, %%d1\n\t" \
402 "movel %1, %%d0\n\t" \
403 "trap #0\n\t" \
404 "movel %%d0, %0" \
405 : "=g" (__res) \
406 : "i" (__NR_##name), \
407 "a" ((long)a), \
408 "a" ((long)b), \
409 "g" ((long)c) \
410 : "cc", "%d0", "%d1", "%d2", "%d3"); \
411 if ((unsigned long)(__res) >= (unsigned long)(-125)) { \
412 errno = -__res; \
413 __res = -1; \
414 } \
415 return (type)__res; \
416}
417
418#define _syscall4(type, name, atype, a, btype, b, ctype, c, dtype, d) \
419type name(atype a, btype b, ctype c, dtype d) \
420{ \
421 long __res; \
422 __asm__ __volatile__ ("movel %5, %%d4\n\t" \
423 "movel %4, %%d3\n\t" \
424 "movel %3, %%d2\n\t" \
425 "movel %2, %%d1\n\t" \
426 "movel %1, %%d0\n\t" \
427 "trap #0\n\t" \
428 "movel %%d0, %0" \
429 : "=g" (__res) \
430 : "i" (__NR_##name), \
431 "a" ((long)a), \
432 "a" ((long)b), \
433 "a" ((long)c), \
434 "g" ((long)d) \
435 : "cc", "%d0", "%d1", "%d2", "%d3", \
436 "%d4"); \
437 if ((unsigned long)(__res) >= (unsigned long)(-125)) { \
438 errno = -__res; \
439 __res = -1; \
440 } \
441 return (type)__res; \
442}
443
444#define _syscall5(type, name, atype, a, btype, b, ctype, c, dtype, d, etype, e) \
445type name(atype a, btype b, ctype c, dtype d, etype e) \
446{ \
447 long __res; \
448 __asm__ __volatile__ ("movel %6, %%d5\n\t" \
449 "movel %5, %%d4\n\t" \
450 "movel %4, %%d3\n\t" \
451 "movel %3, %%d2\n\t" \
452 "movel %2, %%d1\n\t" \
453 "movel %1, %%d0\n\t" \
454 "trap #0\n\t" \
455 "movel %%d0, %0" \
456 : "=g" (__res) \
457 : "i" (__NR_##name), \
458 "a" ((long)a), \
459 "a" ((long)b), \
460 "a" ((long)c), \
461 "a" ((long)d), \
462 "g" ((long)e) \
463 : "cc", "%d0", "%d1", "%d2", "%d3", \
464 "%d4", "%d5"); \
465 if ((unsigned long)(__res) >= (unsigned long)(-125)) { \
466 errno = -__res; \
467 __res = -1; \
468 } \
469 return (type)__res; \
470}
471 321
472#define __ARCH_WANT_IPC_PARSE_VERSION 322#define __ARCH_WANT_IPC_PARSE_VERSION
473#define __ARCH_WANT_OLD_READDIR 323#define __ARCH_WANT_OLD_READDIR