diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2021-10-16 18:12:18 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2021-10-16 18:12:18 +0200 |
commit | c13f946bf1ef0eef49748b1824a0bdfb3487fe8c (patch) | |
tree | 9183f9a880386caa7264789462aba4413b2bdd59 /arch/csky/kernel/ptrace.c | |
parent | Merge tag 'arc-5.15-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/vgu... (diff) | |
parent | csky: Make HAVE_TCM depend on !COMPILE_TEST (diff) | |
download | linux-c13f946bf1ef0eef49748b1824a0bdfb3487fe8c.tar.xz linux-c13f946bf1ef0eef49748b1824a0bdfb3487fe8c.zip |
Merge tag 'csky-for-linus-5.15-rc6' of git://github.com/c-sky/csky-linux
Pull csky fixes from Guo Ren:
"Only 5 fixups:
- Make HAVE_TCM depend on !COMPILE_TEST
- bitops: Remove duplicate __clear_bit define
- Select ARCH_WANT_FRAME_POINTERS only if compiler supports it
- Fixup regs.sr broken in ptrace
- don't let sigreturn play with priveleged bits of status register"
* tag 'csky-for-linus-5.15-rc6' of git://github.com/c-sky/csky-linux:
csky: Make HAVE_TCM depend on !COMPILE_TEST
csky: bitops: Remove duplicate __clear_bit define
csky: Select ARCH_WANT_FRAME_POINTERS only if compiler supports it
csky: Fixup regs.sr broken in ptrace
csky: don't let sigreturn play with priveleged bits of status register
Diffstat (limited to 'arch/csky/kernel/ptrace.c')
-rw-r--r-- | arch/csky/kernel/ptrace.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/csky/kernel/ptrace.c b/arch/csky/kernel/ptrace.c index 0105ac81b432..1a5f54e0d272 100644 --- a/arch/csky/kernel/ptrace.c +++ b/arch/csky/kernel/ptrace.c @@ -99,7 +99,8 @@ static int gpr_set(struct task_struct *target, if (ret) return ret; - regs.sr = task_pt_regs(target)->sr; + /* BIT(0) of regs.sr is Condition Code/Carry bit */ + regs.sr = (regs.sr & BIT(0)) | (task_pt_regs(target)->sr & ~BIT(0)); #ifdef CONFIG_CPU_HAS_HILO regs.dcsr = task_pt_regs(target)->dcsr; #endif |