| .. | .. |
|---|
| 1 | +/* SPDX-License-Identifier: GPL-2.0-or-later */ |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * This file contains the table of syscall-handling functions. |
|---|
| 3 | 4 | * Copyright (C) 1995-1996 Gary Thomas (gdt@linuxppc.org) |
|---|
| .. | .. |
|---|
| 7 | 8 | * |
|---|
| 8 | 9 | * Adapted for iSeries by Mike Corrigan (mikejc@us.ibm.com) |
|---|
| 9 | 10 | * PPC64 updates by Dave Engebretsen (engebret@us.ibm.com) |
|---|
| 10 | | - * |
|---|
| 11 | | - * This program is free software; you can redistribute it and/or |
|---|
| 12 | | - * modify it under the terms of the GNU General Public License |
|---|
| 13 | | - * as published by the Free Software Foundation; either version |
|---|
| 14 | | - * 2 of the License, or (at your option) any later version. |
|---|
| 15 | 11 | */ |
|---|
| 16 | 12 | |
|---|
| 17 | 13 | #include <asm/ppc_asm.h> |
|---|
| 18 | | - |
|---|
| 19 | | -#ifdef CONFIG_PPC64 |
|---|
| 20 | | -#define SYSCALL(func) .8byte DOTSYM(sys_##func),DOTSYM(sys_##func) |
|---|
| 21 | | -#define COMPAT_SYS(func) .8byte DOTSYM(sys_##func),DOTSYM(compat_sys_##func) |
|---|
| 22 | | -#define PPC_SYS(func) .8byte DOTSYM(ppc_##func),DOTSYM(ppc_##func) |
|---|
| 23 | | -#define OLDSYS(func) .8byte DOTSYM(sys_ni_syscall),DOTSYM(sys_ni_syscall) |
|---|
| 24 | | -#define SYS32ONLY(func) .8byte DOTSYM(sys_ni_syscall),DOTSYM(compat_sys_##func) |
|---|
| 25 | | -#define PPC64ONLY(func) .8byte DOTSYM(ppc_##func),DOTSYM(sys_ni_syscall) |
|---|
| 26 | | -#define SYSX(f, f3264, f32) .8byte DOTSYM(f),DOTSYM(f3264) |
|---|
| 27 | | -#else |
|---|
| 28 | | -#define SYSCALL(func) .long sys_##func |
|---|
| 29 | | -#define COMPAT_SYS(func) .long sys_##func |
|---|
| 30 | | -#define PPC_SYS(func) .long ppc_##func |
|---|
| 31 | | -#define OLDSYS(func) .long sys_##func |
|---|
| 32 | | -#define SYS32ONLY(func) .long sys_##func |
|---|
| 33 | | -#define PPC64ONLY(func) .long sys_ni_syscall |
|---|
| 34 | | -#define SYSX(f, f3264, f32) .long f32 |
|---|
| 35 | | -#endif |
|---|
| 36 | | -#define SYSCALL_SPU(func) SYSCALL(func) |
|---|
| 37 | | -#define COMPAT_SYS_SPU(func) COMPAT_SYS(func) |
|---|
| 38 | | -#define COMPAT_SPU_NEW(func) COMPAT_SYS(func) |
|---|
| 39 | | -#define SYSX_SPU(f, f3264, f32) SYSX(f, f3264, f32) |
|---|
| 40 | 14 | |
|---|
| 41 | 15 | .section .rodata,"a" |
|---|
| 42 | 16 | |
|---|
| 43 | 17 | #ifdef CONFIG_PPC64 |
|---|
| 44 | 18 | .p2align 3 |
|---|
| 19 | +#define __SYSCALL(nr, entry) .8byte entry |
|---|
| 20 | +#else |
|---|
| 21 | + .p2align 2 |
|---|
| 22 | +#define __SYSCALL(nr, entry) .long entry |
|---|
| 45 | 23 | #endif |
|---|
| 46 | 24 | |
|---|
| 47 | 25 | .globl sys_call_table |
|---|
| 48 | 26 | sys_call_table: |
|---|
| 27 | +#ifdef CONFIG_PPC64 |
|---|
| 28 | +#include <asm/syscall_table_64.h> |
|---|
| 29 | +#else |
|---|
| 30 | +#include <asm/syscall_table_32.h> |
|---|
| 31 | +#endif |
|---|
| 49 | 32 | |
|---|
| 50 | | -#include <asm/systbl.h> |
|---|
| 33 | +#ifdef CONFIG_COMPAT |
|---|
| 34 | +.globl compat_sys_call_table |
|---|
| 35 | +compat_sys_call_table: |
|---|
| 36 | +#define compat_sys_sigsuspend sys_sigsuspend |
|---|
| 37 | +#include <asm/syscall_table_c32.h> |
|---|
| 38 | +#endif |
|---|