提交 9b7a5aa2 编写于 作者: H He Sheng 提交者: guzitao

sw64: remove unused members from pcb_struct

Sunway inclusion
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/I56OLG

--------------------------------

Since we have removed hmcall swpctx invocations, some members of
struct pcb_struct become useless. This patch removes them to reduce
the struct size.

As a result, struct processor_state is simplified too.
Signed-off-by: NHe Sheng <hesheng@wxiat.com>
Signed-off-by: NGu Zitao <guzitao@wxiat.com>
上级 b5c34eba
......@@ -39,7 +39,7 @@ struct processor_state {
struct callee_saved_fpregs fpregs;
unsigned long fpcr;
#ifdef CONFIG_HIBERNATION
struct pcb_struct pcb;
unsigned long sp;
struct vcpucb vcb;
#endif
};
......
......@@ -15,13 +15,8 @@ typedef struct {
struct pcb_struct {
unsigned long ksp;
unsigned long usp;
unsigned long ptbr;
unsigned int pcc;
unsigned int asn;
unsigned long tp;
unsigned long flags;
unsigned long da_match, da_mask;
unsigned long dv_match, dv_mask;
unsigned long dc_ctl;
......
......@@ -33,9 +33,8 @@ void foo(void)
OFFSET(PSTATE_FPREGS, processor_state, fpregs);
OFFSET(PSTATE_FPCR, processor_state, fpcr);
#ifdef CONFIG_HIBERNATION
OFFSET(PSTATE_PCB, processor_state, pcb);
OFFSET(PSTATE_SP, processor_state, sp);
#endif
OFFSET(PCB_KSP, pcb_struct, ksp);
OFFSET(PBE_ADDR, pbe, address);
OFFSET(PBE_ORIG_ADDR, pbe, orig_address);
OFFSET(PBE_NEXT, pbe, next);
......
......@@ -30,8 +30,7 @@ ENTRY(swsusp_arch_suspend)
rfpcr $f0
fstd $f0, PSTATE_FPCR($16)
ldi $1, PSTATE_PCB($16)
stl sp, PCB_KSP($1)
stl sp, PSTATE_SP($16)
call swsusp_save
ldi $16, hibernate_state
ldi $1, PSTATE_REGS($16)
......@@ -112,8 +111,7 @@ $hibernate_setfpec_over:
vldd $f8, CALLEE_F8($1)
vldd $f9, CALLEE_F9($1)
ldi $1, PSTATE_PCB($16)
ldl sp, PCB_KSP($1)
ldl sp, PSTATE_SP($16)
ldi $8, 0x3fff
bic sp, $8, $8
......
......@@ -160,7 +160,6 @@ copy_thread(unsigned long clone_flags, unsigned long usp,
struct pt_regs *childregs = task_pt_regs(p);
struct pt_regs *regs = current_pt_regs();
childti->pcb.flags = 7; /* set FEN, clear everything else */
p->thread.sp = (unsigned long) childregs;
if (unlikely(p->flags & PF_KTHREAD)) {
......
......@@ -283,7 +283,6 @@ do_entIF(unsigned long inst_type, struct pt_regs *regs)
* attacks. So turn the bleeding FPU back on and be done
* with it.
*/
current_thread_info()->pcb.flags |= 1;
fpu_enable();
return;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册