Skip to content

Commit 96bab5b

Browse files
committed
Merge tag 'csky-for-linus-6.2-rc1' of https://github.com/c-sky/csky-linux
Pull arch/csky updates from Guo Ren: - Revert rseq support - it wasn't ready - Add current_stack_pointer support - Typo fixup * tag 'csky-for-linus-6.2-rc1' of https://github.com/c-sky/csky-linux: Revert "csky: Add support for restartable sequence" Revert "csky: Fixup CONFIG_DEBUG_RSEQ" csky: Kconfig: Fix spelling mistake "Meory" -> "Memory" csky: add arch support current_stack_pointer
2 parents 5f6e430 + 7e20049 commit 96bab5b

File tree

5 files changed

+7
-18
lines changed

5 files changed

+7
-18
lines changed

arch/csky/Kconfig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ config CSKY
99
select ARCH_USE_BUILTIN_BSWAP
1010
select ARCH_USE_QUEUED_RWLOCKS
1111
select ARCH_USE_QUEUED_SPINLOCKS
12+
select ARCH_HAS_CURRENT_STACK_POINTER
1213
select ARCH_INLINE_READ_LOCK if !PREEMPTION
1314
select ARCH_INLINE_READ_LOCK_BH if !PREEMPTION
1415
select ARCH_INLINE_READ_LOCK_IRQ if !PREEMPTION
@@ -93,7 +94,6 @@ config CSKY
9394
select HAVE_PERF_USER_STACK_DUMP
9495
select HAVE_DMA_CONTIGUOUS
9596
select HAVE_REGS_AND_STACK_ACCESS_API
96-
select HAVE_RSEQ
9797
select HAVE_STACKPROTECTOR
9898
select HAVE_SYSCALL_TRACEPOINTS
9999
select MAY_HAVE_SPARSE_IRQ
@@ -269,7 +269,7 @@ menuconfig HAVE_TCM
269269
bool "Tightly-Coupled/Sram Memory"
270270
depends on !COMPILE_TEST
271271
help
272-
The implementation are not only used by TCM (Tightly-Coupled Meory)
272+
The implementation are not only used by TCM (Tightly-Coupled Memory)
273273
but also used by sram on SOC bus. It follow existed linux tcm
274274
software interface, so that old tcm application codes could be
275275
re-used directly.

arch/csky/include/asm/processor.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,4 +84,6 @@ unsigned long __get_wchan(struct task_struct *p);
8484

8585
#define cpu_relax() barrier()
8686

87+
register unsigned long current_stack_pointer __asm__("sp");
88+
8789
#endif /* __ASM_CSKY_PROCESSOR_H */

arch/csky/kernel/entry.S

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ ENTRY(csky_systemcall)
5454

5555
lrw r9, __NR_syscalls
5656
cmphs syscallid, r9 /* Check nr of syscall */
57-
bt 1f
57+
bt ret_from_exception
5858

5959
lrw r9, sys_call_table
6060
ixw r9, syscallid
@@ -80,11 +80,6 @@ ENTRY(csky_systemcall)
8080
jsr syscallid
8181
#endif
8282
stw a0, (sp, LSAVE_A0) /* Save return value */
83-
1:
84-
#ifdef CONFIG_DEBUG_RSEQ
85-
mov a0, sp
86-
jbsr rseq_syscall
87-
#endif
8883
jmpi ret_from_exception
8984

9085
csky_syscall_trace:
@@ -113,10 +108,6 @@ csky_syscall_trace:
113108
stw a0, (sp, LSAVE_A0) /* Save return value */
114109

115110
1:
116-
#ifdef CONFIG_DEBUG_RSEQ
117-
mov a0, sp
118-
jbsr rseq_syscall
119-
#endif
120111
mov a0, sp /* right now, sp --> pt_regs */
121112
jbsr syscall_trace_exit
122113
br ret_from_exception

arch/csky/kernel/signal.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,8 +179,6 @@ static void handle_signal(struct ksignal *ksig, struct pt_regs *regs)
179179
sigset_t *oldset = sigmask_to_save();
180180
int ret;
181181

182-
rseq_signal_deliver(ksig, regs);
183-
184182
/* Are we from a system call? */
185183
if (in_syscall(regs)) {
186184
/* Avoid additional syscall restarting via ret_from_exception */

arch/csky/kernel/stacktrace.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,9 @@ void notrace walk_stackframe(struct task_struct *task, struct pt_regs *regs,
2323
sp = user_stack_pointer(regs);
2424
pc = instruction_pointer(regs);
2525
} else if (task == NULL || task == current) {
26-
const register unsigned long current_sp __asm__ ("sp");
2726
const register unsigned long current_fp __asm__ ("r8");
2827
fp = current_fp;
29-
sp = current_sp;
28+
sp = current_stack_pointer;
3029
pc = (unsigned long)walk_stackframe;
3130
} else {
3231
/* task blocked in __switch_to */
@@ -68,8 +67,7 @@ static void notrace walk_stackframe(struct task_struct *task,
6867
sp = user_stack_pointer(regs);
6968
pc = instruction_pointer(regs);
7069
} else if (task == NULL || task == current) {
71-
const register unsigned long current_sp __asm__ ("sp");
72-
sp = current_sp;
70+
sp = current_stack_pointer;
7371
pc = (unsigned long)walk_stackframe;
7472
} else {
7573
/* task blocked in __switch_to */

0 commit comments

Comments
 (0)