There is no reason Book-E needs to save XER and CTR on context switches.

They aren't Book-E specific registers to begin with and, even if they were,
are defined volatile by the ABI.
This commit is contained in:
Nathan Whitehorn 2013-11-17 02:05:20 +00:00
parent f3ba5fc742
commit 46c4ae50bb
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=258246
3 changed files with 0 additions and 12 deletions

View File

@ -70,8 +70,6 @@ struct pcb {
register_t usr_vsid; /* USER_SR segment */
} aim;
struct {
register_t ctr;
register_t xer;
register_t dbcr0;
} booke;
} pcb_cpu;

View File

@ -192,8 +192,6 @@ ASSYM(PCB_FPU, PCB_FPU);
ASSYM(PCB_VEC, PCB_VEC);
ASSYM(PCB_AIM_USR_VSID, offsetof(struct pcb, pcb_cpu.aim.usr_vsid));
ASSYM(PCB_BOOKE_CTR, offsetof(struct pcb, pcb_cpu.booke.ctr));
ASSYM(PCB_BOOKE_XER, offsetof(struct pcb, pcb_cpu.booke.xer));
ASSYM(PCB_BOOKE_DBCR0, offsetof(struct pcb, pcb_cpu.booke.dbcr0));
ASSYM(TD_LOCK, offsetof(struct thread, td_lock));

View File

@ -90,10 +90,6 @@ ENTRY(cpu_switch)
mflr %r16 /* Save the link register */
stw %r16,PCB_LR(%r6)
#ifdef BOOKE
mfctr %r16
stw %r16,PCB_BOOKE_CTR(%r6)
mfxer %r16
stw %r16,PCB_BOOKE_XER(%r6)
mfspr %r16,SPR_DBCR0
stw %r16,PCB_BOOKE_DBCR0(%r6)
#endif
@ -179,10 +175,6 @@ blocked_loop:
isync
#endif
#ifdef BOOKE
lwz %r5,PCB_BOOKE_CTR(%r3)
mtctr %r5
lwz %r5,PCB_BOOKE_XER(%r3)
mtctr %r5
lwz %r5,PCB_BOOKE_DBCR0(%r3)
mtspr SPR_DBCR0,%r5
#endif