aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms/cell/spu_callbacks.c
diff options
context:
space:
mode:
authorMichael Ellerman <mpe@ellerman.id.au>2020-06-16 23:56:16 +1000
committerMichael Ellerman <mpe@ellerman.id.au>2020-06-17 23:20:03 +1000
commit1497eea68624f6076bf3eaf66baec3771ea04045 (patch)
treea7e4e2c539c7d2867cbe801e8cea02eb3430b8a6 /arch/powerpc/platforms/cell/spu_callbacks.c
parentpowerpc/8xx: use pmd_off() to access a PMD entry in pte_update() (diff)
downloadlinux-dev-1497eea68624f6076bf3eaf66baec3771ea04045.tar.xz
linux-dev-1497eea68624f6076bf3eaf66baec3771ea04045.zip
powerpc/syscalls: Use the number when building SPU syscall table
Currently the macro that inserts entries into the SPU syscall table doesn't actually use the "nr" (syscall number) parameter. This does work, but it relies on the exact right number of syscall entries being emitted in order for the syscal numbers to line up with the array entries. If for example we had two entries with the same syscall number we wouldn't get an error, it would just cause all subsequent syscalls to be off by one in the spu_syscall_table. So instead change the macro to assign to the specific entry of the array, meaning any numbering overlap will be caught by the compiler. Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Acked-by: Arnd Bergmann <arnd@arndb.de> Link: https://lore.kernel.org/r/20200616135617.2937252-1-mpe@ellerman.id.au
Diffstat (limited to '')
-rw-r--r--arch/powerpc/platforms/cell/spu_callbacks.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/powerpc/platforms/cell/spu_callbacks.c b/arch/powerpc/platforms/cell/spu_callbacks.c
index cbee3666da07..abdef9bcf432 100644
--- a/arch/powerpc/platforms/cell/spu_callbacks.c
+++ b/arch/powerpc/platforms/cell/spu_callbacks.c
@@ -35,7 +35,7 @@
*/
static void *spu_syscall_table[] = {
-#define __SYSCALL(nr, entry) entry,
+#define __SYSCALL(nr, entry) [nr] = entry,
#include <asm/syscall_table_spu.h>
#undef __SYSCALL
};