Skip to content

Commit

Permalink
powerpc/syscall: Use is_compat_task()
Browse files Browse the repository at this point in the history
Instead of hard comparing task flags with _TIF_32BIT, use
is_compat_task(). The advantage is that it returns 0 on PPC32
allthough _TIF_32BIT is always set.

Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Reviewed-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/c8094662199337a7200fea9f6e1d1f8b1b6d5f69.1612796617.git.christophe.leroy@csgroup.eu
  • Loading branch information
Christophe Leroy authored and Michael Ellerman committed Feb 11, 2021
1 parent 344bb20 commit 72b7a9e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion arch/powerpc/kernel/interrupt.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

#include <linux/context_tracking.h>
#include <linux/err.h>
#include <linux/compat.h>

#include <asm/asm-prototypes.h>
#include <asm/kup.h>
#include <asm/cputime.h>
Expand Down Expand Up @@ -118,7 +120,7 @@ notrace long system_call_exception(long r3, long r4, long r5,
/* May be faster to do array_index_nospec? */
barrier_nospec();

if (unlikely(is_32bit_task())) {
if (unlikely(is_compat_task())) {
f = (void *)compat_sys_call_table[r0];

r3 &= 0x00000000ffffffffULL;
Expand Down

0 comments on commit 72b7a9e

Please sign in to comment.