diff options
Diffstat (limited to 'include/asm-h8300/unistd.h')
-rw-r--r-- | include/asm-h8300/unistd.h | 166 |
1 files changed, 0 insertions, 166 deletions
diff --git a/include/asm-h8300/unistd.h b/include/asm-h8300/unistd.h index 747788d629ae..7ddd414f8d16 100644 --- a/include/asm-h8300/unistd.h +++ b/include/asm-h8300/unistd.h | |||
@@ -295,172 +295,6 @@ | |||
295 | #ifdef __KERNEL__ | 295 | #ifdef __KERNEL__ |
296 | 296 | ||
297 | #define NR_syscalls 289 | 297 | #define NR_syscalls 289 |
298 | #include <linux/err.h> | ||
299 | |||
300 | /* user-visible error numbers are in the range -1 - -MAX_ERRNO: see | ||
301 | <asm-m68k/errno.h> */ | ||
302 | |||
303 | #define __syscall_return(type, res) \ | ||
304 | do { \ | ||
305 | if ((unsigned long)(res) >= (unsigned long)(-MAX_ERRNO)) { \ | ||
306 | /* avoid using res which is declared to be in register d0; \ | ||
307 | errno might expand to a function call and clobber it. */ \ | ||
308 | int __err = -(res); \ | ||
309 | errno = __err; \ | ||
310 | res = -1; \ | ||
311 | } \ | ||
312 | return (type) (res); \ | ||
313 | } while (0) | ||
314 | |||
315 | #define _syscall0(type, name) \ | ||
316 | type name(void) \ | ||
317 | { \ | ||
318 | register long __res __asm__("er0"); \ | ||
319 | __asm__ __volatile__ ("mov.l %1,er0\n\t" \ | ||
320 | "trapa #0\n\t" \ | ||
321 | : "=r" (__res) \ | ||
322 | : "g" (__NR_##name) \ | ||
323 | : "cc", "memory"); \ | ||
324 | __syscall_return(type, __res); \ | ||
325 | } | ||
326 | |||
327 | #define _syscall1(type, name, atype, a) \ | ||
328 | type name(atype a) \ | ||
329 | { \ | ||
330 | register long __res __asm__("er0"); \ | ||
331 | register long _a __asm__("er1"); \ | ||
332 | _a = (long)a; \ | ||
333 | __asm__ __volatile__ ("mov.l %1,er0\n\t" \ | ||
334 | "trapa #0\n\t" \ | ||
335 | : "=r" (__res) \ | ||
336 | : "g" (__NR_##name), \ | ||
337 | "g" (_a) \ | ||
338 | : "cc", "memory"); \ | ||
339 | __syscall_return(type, __res); \ | ||
340 | } | ||
341 | |||
342 | #define _syscall2(type, name, atype, a, btype, b) \ | ||
343 | type name(atype a, btype b) \ | ||
344 | { \ | ||
345 | register long __res __asm__("er0"); \ | ||
346 | register long _a __asm__("er1"); \ | ||
347 | register long _b __asm__("er2"); \ | ||
348 | _a = (long)a; \ | ||
349 | _b = (long)b; \ | ||
350 | __asm__ __volatile__ ("mov.l %1,er0\n\t" \ | ||
351 | "trapa #0\n\t" \ | ||
352 | : "=r" (__res) \ | ||
353 | : "g" (__NR_##name), \ | ||
354 | "g" (_a), \ | ||
355 | "g" (_b) \ | ||
356 | : "cc", "memory"); \ | ||
357 | __syscall_return(type, __res); \ | ||
358 | } | ||
359 | |||
360 | #define _syscall3(type, name, atype, a, btype, b, ctype, c) \ | ||
361 | type name(atype a, btype b, ctype c) \ | ||
362 | { \ | ||
363 | register long __res __asm__("er0"); \ | ||
364 | register long _a __asm__("er1"); \ | ||
365 | register long _b __asm__("er2"); \ | ||
366 | register long _c __asm__("er3"); \ | ||
367 | _a = (long)a; \ | ||
368 | _b = (long)b; \ | ||
369 | _c = (long)c; \ | ||
370 | __asm__ __volatile__ ("mov.l %1,er0\n\t" \ | ||
371 | "trapa #0\n\t" \ | ||
372 | : "=r" (__res) \ | ||
373 | : "g" (__NR_##name), \ | ||
374 | "g" (_a), \ | ||
375 | "g" (_b), \ | ||
376 | "g" (_c) \ | ||
377 | : "cc", "memory"); \ | ||
378 | __syscall_return(type, __res); \ | ||
379 | } | ||
380 | |||
381 | #define _syscall4(type, name, atype, a, btype, b, \ | ||
382 | ctype, c, dtype, d) \ | ||
383 | type name(atype a, btype b, ctype c, dtype d) \ | ||
384 | { \ | ||
385 | register long __res __asm__("er0"); \ | ||
386 | register long _a __asm__("er1"); \ | ||
387 | register long _b __asm__("er2"); \ | ||
388 | register long _c __asm__("er3"); \ | ||
389 | register long _d __asm__("er4"); \ | ||
390 | _a = (long)a; \ | ||
391 | _b = (long)b; \ | ||
392 | _c = (long)c; \ | ||
393 | _d = (long)d; \ | ||
394 | __asm__ __volatile__ ("mov.l %1,er0\n\t" \ | ||
395 | "trapa #0\n\t" \ | ||
396 | : "=r" (__res) \ | ||
397 | : "g" (__NR_##name), \ | ||
398 | "g" (_a), \ | ||
399 | "g" (_b), \ | ||
400 | "g" (_c), \ | ||
401 | "g" (_d) \ | ||
402 | : "cc", "memory"); \ | ||
403 | __syscall_return(type, __res); \ | ||
404 | } | ||
405 | |||
406 | #define _syscall5(type, name, atype, a, btype, b, \ | ||
407 | ctype, c, dtype, d, etype, e) \ | ||
408 | type name(atype a, btype b, ctype c, dtype d, etype e) \ | ||
409 | { \ | ||
410 | register long __res __asm__("er0"); \ | ||
411 | register long _a __asm__("er1"); \ | ||
412 | register long _b __asm__("er2"); \ | ||
413 | register long _c __asm__("er3"); \ | ||
414 | register long _d __asm__("er4"); \ | ||
415 | register long _e __asm__("er5"); \ | ||
416 | _a = (long)a; \ | ||
417 | _b = (long)b; \ | ||
418 | _c = (long)c; \ | ||
419 | _d = (long)d; \ | ||
420 | _e = (long)e; \ | ||
421 | __asm__ __volatile__ ("mov.l %1,er0\n\t" \ | ||
422 | "trapa #0\n\t" \ | ||
423 | : "=r" (__res) \ | ||
424 | : "g" (__NR_##name), \ | ||
425 | "g" (_a), \ | ||
426 | "g" (_b), \ | ||
427 | "g" (_c), \ | ||
428 | "g" (_d), \ | ||
429 | "g" (_e) \ | ||
430 | : "cc", "memory"); \ | ||
431 | __syscall_return(type, __res); \ | ||
432 | } | ||
433 | |||
434 | #define _syscall6(type, name, atype, a, btype, b, \ | ||
435 | ctype, c, dtype, d, etype, e, ftype, f) \ | ||
436 | type name(atype a, btype b, ctype c, dtype d, etype e, ftype f) \ | ||
437 | { \ | ||
438 | register long __res __asm__("er0"); \ | ||
439 | register long _a __asm__("er1"); \ | ||
440 | register long _b __asm__("er2"); \ | ||
441 | register long _c __asm__("er3"); \ | ||
442 | register long _d __asm__("er4"); \ | ||
443 | register long _e __asm__("er5"); \ | ||
444 | register long _f __asm__("er6"); \ | ||
445 | _a = (long)a; \ | ||
446 | _b = (long)b; \ | ||
447 | _c = (long)c; \ | ||
448 | _d = (long)d; \ | ||
449 | _e = (long)e; \ | ||
450 | _f = (long)f; \ | ||
451 | __asm__ __volatile__ ("mov.l %1,er0\n\t" \ | ||
452 | "trapa #0\n\t" \ | ||
453 | : "=r" (__res) \ | ||
454 | : "g" (__NR_##name), \ | ||
455 | "g" (_a), \ | ||
456 | "g" (_b), \ | ||
457 | "g" (_c), \ | ||
458 | "g" (_d), \ | ||
459 | "g" (_e) \ | ||
460 | "g" (_f) \ | ||
461 | : "cc", "memory"); \ | ||
462 | __syscall_return(type, __res); \ | ||
463 | } | ||
464 | 298 | ||
465 | #define __ARCH_WANT_IPC_PARSE_VERSION | 299 | #define __ARCH_WANT_IPC_PARSE_VERSION |
466 | #define __ARCH_WANT_OLD_READDIR | 300 | #define __ARCH_WANT_OLD_READDIR |