From owner-cvs-all Thu Aug 1 6:16:29 2002 Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8548F37B401 for ; Thu, 1 Aug 2002 06:16:17 -0700 (PDT) Received: from mail.speakeasy.net (mail16.speakeasy.net [216.254.0.216]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7C8B443E6A for ; Thu, 1 Aug 2002 06:16:16 -0700 (PDT) (envelope-from jhb@FreeBSD.org) Received: (qmail 30885 invoked from network); 1 Aug 2002 13:16:15 -0000 Received: from unknown (HELO server.baldwin.cx) ([216.27.160.63]) (envelope-sender ) by mail16.speakeasy.net (qmail-ldap-1.03) with DES-CBC3-SHA encrypted SMTP for ; 1 Aug 2002 13:16:15 -0000 Received: from laptop.baldwin.cx (gw1.twc.weather.com [216.133.140.1]) by server.baldwin.cx (8.12.5/8.12.5) with ESMTP id g71DG6uR060563; Thu, 1 Aug 2002 09:16:10 -0400 (EDT) (envelope-from jhb@FreeBSD.org) Message-ID: X-Mailer: XFMail 1.5.2 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <200208010948.g719m2DZ068561@freefall.freebsd.org> Date: Thu, 01 Aug 2002 09:16:08 -0400 (EDT) From: John Baldwin To: Mitsuru IWASAKI Subject: RE: cvs commit: src/sys/i386/acpica acpi_wakeup.c Cc: cvs-all@FreeBSD.org, cvs-committers@FreeBSD.org Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On 01-Aug-2002 Mitsuru IWASAKI wrote: > iwasaki 2002/08/01 02:48:02 PDT > > Modified files: > sys/i386/acpica acpi_wakeup.c > Log: > Fix a bug about stack manipulation at ACPI wakeup. > This should avoid kernel panic on kernel compiled w/o > NO_CPU_COPTFLAGS. > > Suggested by: optimized code by -mcpu=pentiumpro Sorry I couldn't help you with this earlier. Thanks for fixing it! I have a couple of questions about acpu_restorecpu(): 1) Why bother moving r_eax into %eax when you zero %eax anyways right before returning? 2) To make the code perhaps a bit easier to follow (esp. to explain why you had to add the popl) maybe you could remove the extra pop and change the last 3 lines to look like this: movl ret_addr,%eax # override \n\ movl %eax,(%esp) # ret addr \n\ xorl %eax,%eax \n\ ret \n\ This also uses one less memory access although that isn't that important. You could also use 'addl $4,%esp' instead of the pop if you wanted. -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message