]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
ARC: unbork 5.11 bootup: fix snafu in _TIF_NOTIFY_SIGNAL handling
authorVineet Gupta <vgupta@synopsys.com>
Wed, 6 Jan 2021 20:34:36 +0000 (12:34 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 4 Jan 2023 10:39:21 +0000 (11:39 +0100)
[ Upstream commit bb12433bf56e76789c6b08b36c546f745a6aa6e1 ]

Linux 5.11.rcX was failing to boot on ARC HSDK board. Turns out we have
a couple of issues, this being the first one, and I'm to blame as I
didn't pay attention during review.

TIF_NOTIFY_SIGNAL support requires checking multiple TIF_* bits in
kernel return code path. Old code only needed to check a single bit so
BBIT0 <TIF_SIGPENDING> worked. New code needs to check multiple bits so
AND <bit-mask> instruction. So needs to use bit mask variant _TIF_SIGPENDING

Cc: Jens Axboe <axboe@kernel.dk>
Fixes: 53855e12588743ea128 ("arc: add support for TIF_NOTIFY_SIGNAL")
Link: https://github.com/foss-for-synopsys-dwc-arc-processors/linux/issues/34
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/arc/kernel/entry.S

index 676381f694d339be8e62b7588c6dc935f6b47723..6ee9cb5598085a4034ffa04a4924a4dfec96aa68 100644 (file)
@@ -308,7 +308,7 @@ resume_user_mode_begin:
        mov r0, sp      ; pt_regs for arg to do_signal()/do_notify_resume()
 
        GET_CURR_THR_INFO_FLAGS   r9
-       and.f  0,  r9, TIF_SIGPENDING|TIF_NOTIFY_SIGNAL
+       and.f  0,  r9, _TIF_SIGPENDING|_TIF_NOTIFY_SIGNAL
        bz .Lchk_notify_resume
 
        ; Normal Trap/IRQ entry only saves Scratch (caller-saved) regs