From owner-svn-src-head@FreeBSD.ORG Wed Jun 13 21:03:02 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (unknown [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 884D01065815; Wed, 13 Jun 2012 21:03:02 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 2F8EA8FC12; Wed, 13 Jun 2012 21:03:02 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q5DL32E1048649; Wed, 13 Jun 2012 21:03:02 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q5DL31LK048643; Wed, 13 Jun 2012 21:03:01 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201206132103.q5DL31LK048643@svn.freebsd.org> From: Jung-uk Kim Date: Wed, 13 Jun 2012 21:03:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237027 - in head/sys: amd64/amd64 amd64/include i386/acpica i386/i386 i386/include X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jun 2012 21:03:02 -0000 Author: jkim Date: Wed Jun 13 21:03:01 2012 New Revision: 237027 URL: http://svn.freebsd.org/changeset/base/237027 Log: - 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. Modified: head/sys/amd64/amd64/cpu_switch.S head/sys/amd64/include/pcb.h head/sys/i386/acpica/acpi_wakecode.S head/sys/i386/i386/swtch.s head/sys/i386/include/pcb.h Modified: head/sys/amd64/amd64/cpu_switch.S ============================================================================== --- head/sys/amd64/amd64/cpu_switch.S Wed Jun 13 20:43:59 2012 (r237026) +++ head/sys/amd64/amd64/cpu_switch.S Wed Jun 13 21:03:01 2012 (r237027) @@ -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) Modified: head/sys/amd64/include/pcb.h ============================================================================== --- head/sys/amd64/include/pcb.h Wed Jun 13 20:43:59 2012 (r237026) +++ head/sys/amd64/include/pcb.h Wed Jun 13 21:03:01 2012 (r237027) @@ -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 void makectx(struct trapframe *, struct pcb *); int savectx(struct pcb *) __returns_twice; -void resumectx(struct pcb *); +void resumectx(struct pcb *, register_t); #endif Modified: head/sys/i386/acpica/acpi_wakecode.S ============================================================================== --- head/sys/i386/acpica/acpi_wakecode.S Wed Jun 13 20:43:59 2012 (r237026) +++ head/sys/i386/acpica/acpi_wakecode.S Wed Jun 13 21:03:01 2012 (r237027) @@ -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 Modified: head/sys/i386/i386/swtch.s ============================================================================== --- head/sys/i386/i386/swtch.s Wed Jun 13 20:43:59 2012 (r237026) +++ head/sys/i386/i386/swtch.s Wed Jun 13 21:03:01 2012 (r237027) @@ -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) Modified: head/sys/i386/include/pcb.h ============================================================================== --- head/sys/i386/include/pcb.h Wed Jun 13 20:43:59 2012 (r237026) +++ head/sys/i386/include/pcb.h Wed Jun 13 21:03:01 2012 (r237027) @@ -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_ */