- Fix resumectx() prototypes to reflect reality.

- For i386, simply jump to resumectx() with PCB in %ecx.
- Fix a style(9) nit while I am here.
This commit is contained in:
jkim 2012-06-13 21:03:01 +00:00
parent 2531f64201
commit d1d32ebbe5
5 changed files with 8 additions and 11 deletions

View File

@ -394,7 +394,7 @@ ENTRY(savectx)
END(savectx)
/*
* resumectx(pcb in %rdi, cr3 in %rsi)
* resumectx(pcb, cr3)
* Resuming processor state from pcb.
*/
ENTRY(resumectx)

View File

@ -100,7 +100,7 @@ struct pcb {
register_t pcb_xsmask;
/* fpu context for suspend/resume */
void * pcb_fpususpend;
void *pcb_fpususpend;
struct savefpu *pcb_save;
@ -142,7 +142,7 @@ clear_pcb_flags(struct pcb *pcb, const u_int flags)
void makectx(struct trapframe *, struct pcb *);
int savectx(struct pcb *) __returns_twice;
void resumectx(struct pcb *);
void resumectx(struct pcb *, register_t);
#endif

View File

@ -142,8 +142,8 @@ wakeup_32:
mov %ax, %ds
/* Get PCB and return address. */
movl wakeup_pcb - wakeup_start(%ebx), %esi
movl wakeup_ret - wakeup_start(%ebx), %edi
movl wakeup_pcb - wakeup_start(%ebx), %ecx
movl wakeup_ret - wakeup_start(%ebx), %edx
/* Restore CR4 and CR3. */
movl wakeup_cr4 - wakeup_start(%ebx), %eax
@ -166,7 +166,7 @@ wakeup_32:
jmp 1f
1:
/* Jump to return address. */
jmp *%edi
jmp *%edx
.data

View File

@ -460,13 +460,10 @@ ENTRY(savectx)
END(savectx)
/*
* resumectx(pcb in %esi)
* resumectx(pcb) __fastcall
* Resuming processor state from pcb.
*/
ENTRY(resumectx)
/* Fetch PCB. */
movl %esi,%ecx
/* Restore GDT. */
lgdt PCB_GDT(%ecx)

View File

@ -97,7 +97,7 @@ struct trapframe;
void makectx(struct trapframe *, struct pcb *);
int savectx(struct pcb *) __returns_twice;
void resumectx(struct pcb *);
void resumectx(struct pcb *) __fastcall;
#endif
#endif /* _I386_PCB_H_ */