diff --git a/sys/amd64/amd64/cpu_switch.S b/sys/amd64/amd64/cpu_switch.S index 240c9558100..12542d74853 100644 --- a/sys/amd64/amd64/cpu_switch.S +++ b/sys/amd64/amd64/cpu_switch.S @@ -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) diff --git a/sys/amd64/include/pcb.h b/sys/amd64/include/pcb.h index 619fba5a8a3..35665f12e35 100644 --- a/sys/amd64/include/pcb.h +++ b/sys/amd64/include/pcb.h @@ -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 diff --git a/sys/i386/acpica/acpi_wakecode.S b/sys/i386/acpica/acpi_wakecode.S index 5f66ef13dcd..88f32d7c119 100644 --- a/sys/i386/acpica/acpi_wakecode.S +++ b/sys/i386/acpica/acpi_wakecode.S @@ -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 diff --git a/sys/i386/i386/swtch.s b/sys/i386/i386/swtch.s index adf554a4f7f..80aa6c418e6 100644 --- a/sys/i386/i386/swtch.s +++ b/sys/i386/i386/swtch.s @@ -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) diff --git a/sys/i386/include/pcb.h b/sys/i386/include/pcb.h index 108ecfefd44..9cefed17688 100644 --- a/sys/i386/include/pcb.h +++ b/sys/i386/include/pcb.h @@ -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_ */