csky: Reconstruct signal processing
Linux kernel has provided some apis for arch signal's implementation. For example: restore_saved_sigmask() set_current_blocked() restore_altstack() But in last version of csky signal.c didn't use them and some codes are confusing, so reconstruct signal.c with reference to riscv's code. Now csky signal.c implementation are very close to riscv and we can get the following benefits: - Clear code structure - The signal code of riscv and csky can be reviewed together - Promoting the unification of arch's signal implementation Also modified the related code in entry.S Signed-off-by: Guo Ren <ren_guo@c-sky.com> Cc: Arnd Bergmann <arnd@arndb.de>
This commit is contained in:
@@ -14,18 +14,11 @@
|
||||
#define LSAVE_A2 32
|
||||
#define LSAVE_A3 36
|
||||
|
||||
#define EPC_INCREASE 4
|
||||
#define EPC_KEEP 0
|
||||
|
||||
#define KSPTOUSP
|
||||
#define USPTOKSP
|
||||
|
||||
#define usp cr<14, 1>
|
||||
|
||||
.macro INCTRAP rx
|
||||
addi \rx, EPC_INCREASE
|
||||
.endm
|
||||
|
||||
.macro SAVE_ALL epc_inc
|
||||
subi sp, 152
|
||||
stw tls, (sp, 0)
|
||||
|
@@ -21,4 +21,6 @@
|
||||
|
||||
#define SYSTRACE_SAVENUM 5
|
||||
|
||||
#define TRAP0_SIZE 4
|
||||
|
||||
#endif /* __ASM_CSKY_REGDEF_H */
|
||||
|
Referens i nytt ärende
Block a user