From owner-freebsd-acpi@FreeBSD.ORG Sun Jun 3 14:58:43 2012 Return-Path: Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 68C521065674 for ; Sun, 3 Jun 2012 14:58:43 +0000 (UTC) (envelope-from iwasaki@jp.FreeBSD.org) Received: from locore.org (ns01.locore.org [218.45.21.227]) by mx1.freebsd.org (Postfix) with ESMTP id 1726C8FC17 for ; Sun, 3 Jun 2012 14:58:42 +0000 (UTC) Received: from localhost (celeron.v4.locore.org [192.168.0.10]) by locore.org (8.14.5/8.14.5/iwasaki) with ESMTP/inet id q53Eweut031477 for ; Sun, 3 Jun 2012 23:58:40 +0900 (JST) (envelope-from iwasaki@jp.FreeBSD.org) Date: Sun, 03 Jun 2012 23:58:39 +0900 (JST) Message-Id: <20120603.235839.133292778.iwasaki@jp.FreeBSD.org> To: freebsd-acpi@freebsd.org From: Mitsuru IWASAKI In-Reply-To: <20120603.152326.105529138.iwasaki@jp.FreeBSD.org> References: <20120603.002554.119853142.iwasaki@jp.FreeBSD.org> <20120603.152326.105529138.iwasaki@jp.FreeBSD.org> X-Mailer: Mew version 3.3 on Emacs 20.7 / Mule 4.0 (HANANOEN) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Subject: Re: preparation for x86/acpica/acpi_wakeup.c X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Jun 2012 14:58:43 -0000 Hi, > > The first thing to consider is that right now we only have 2 states > > for CPUs: started and stopped. These states are controlled by > > started_cpus and stopped_cpus masks respectively. It seems you really > > want to add an intermediate level among the 2 where you have: started > > -> suspended -> started -> suspended ... -> stopped and you need to > > expand the mechanism for dealing with started and stopped cpus to do > > that. I'm pretty sure this will be very helpful also for other > > architectures that want to do the same. > > You are right, I'll add new global cpuset suspended_cpus and replace > PCB_SUSPENDING with it. Also I noticed that CR3 can be restored in resumectx() and remove load_cr3() from C code. Revised patches: http://people.freebsd.org/~iwasaki/acpi/x86-acpi_wakeup-20120603.diff Thanks