Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752034AbbFZBmE (ORCPT ); Thu, 25 Jun 2015 21:42:04 -0400 Received: from mga03.intel.com ([134.134.136.65]:63157 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752005AbbFZBl5 (ORCPT ); Thu, 25 Jun 2015 21:41:57 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.13,681,1427785200"; d="scan'208";a="594994194" From: "Zheng, Lv" To: "Rafael J. Wysocki" CC: "Wysocki, Rafael J" , "Brown, Len" , Lv Zheng , "linux-kernel@vger.kernel.org" , "linux-acpi@vger.kernel.org" , "Moore, Robert" Subject: RE: [PATCH v2 05/28] ACPICA: Hardware: Enable firmware waking vector for both 32-bit and 64-bit FACS. Thread-Topic: [PATCH v2 05/28] ACPICA: Hardware: Enable firmware waking vector for both 32-bit and 64-bit FACS. Thread-Index: AQHQrtXVZn+INYmbOk62zhN20nmuqp28YK6QgAEN9ICAAIcGIP//iPCAgACFweA= Date: Fri, 26 Jun 2015 01:41:51 +0000 Message-ID: <1AE640813FDE7649BE1B193DEA596E88027340E7@SHSMSX101.ccr.corp.intel.com> References: <31220621.6TtT1kp1Fm@vostro.rjw.lan> <1AE640813FDE7649BE1B193DEA596E8802734087@SHSMSX101.ccr.corp.intel.com> <2265033.O0oIZqVsfD@vostro.rjw.lan> In-Reply-To: <2265033.O0oIZqVsfD@vostro.rjw.lan> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by mail.home.local id t5Q1g8gq026944 Content-Length: 4502 Lines: 116 Hi, Rafael > From: Rafael J. Wysocki [mailto:rjw@rjwysocki.net] > Sent: Friday, June 26, 2015 9:41 AM > > On Friday, June 26, 2015 12:51:39 AM Zheng, Lv wrote: > > Hi, Rafael > > > > > From: Rafael J. Wysocki [mailto:rjw@rjwysocki.net] > > > Sent: Friday, June 26, 2015 8:44 AM > > > > > > On Thursday, June 25, 2015 12:43:39 AM Zheng, Lv wrote: > > > > Hi, Rafael > > > > > > > > > From: Rafael J. Wysocki [mailto:rjw@rjwysocki.net] > > > > > Sent: Thursday, June 25, 2015 7:57 AM > > > > > > > > > > > [cut] > > > > > > > > > > > > > > > +/******************************************************************************* > > > > > > + * > > > > > > + * FUNCTION: acpi_set_firmware_waking_vector > > > > > > + * > > > > > > + * PARAMETERS: physical_address - 32-bit physical address of ACPI real mode > > > > > > + * entry point > > > > > > + * physical_address64 - 64-bit physical address of ACPI protected > > > > > > + * entry point > > > > > > + * > > > > > > + * RETURN: Status > > > > > > + * > > > > > > + * DESCRIPTION: Sets the firmware_waking_vector fields of the FACS > > > > > > + * > > > > > > + ******************************************************************************/ > > > > > > + > > > > > > +acpi_status > > > > > > +acpi_set_firmware_waking_vector(acpi_physical_address physical_address, > > > > > > + acpi_physical_address physical_address64) > > > > > > > > > > The question here is: Why does the host OS need to care about the second > > > > > argument of this function that will always be 0? Why didn't you keep the > > > > > old header of acpi_set_firmware_waking_vector() as a one-argument function > > > > > taking a u32 and why didn't you add something like > > > > > > > > > > acpi_status acpi_set_firmware_waking_vector_full(u32 real_mode_address, > > > > > acpi_physical_address high_address) > > > > > > > > > > and why didn't you redefine acpi_set_firmware_waking_vector() as > > > > > > > > > > acpi_status acpi_set_firmware_waking_vector(u32 real_mode_address) > > > > > { > > > > > return acpi_set_firmware_waking_vector_full(real_mode_address, 0); > > > > > } > > > > > > > > > > ? > > > > > > > > > > If you did that, there wouldn't be any need to touch the code in > > > > > drivers/acpi/sleep.c and the arch headers, so can you please explain to me > > > > > why *exactly* you didn't do that? > > > > > > > > Host OS can set non 0 address for both real_mode_address and high_address to indicate that it can support both 32-bit and 64- > bit > > > resume environments. > > > > So if a BIOS favors 32-bit resume environment, it can resume from here; if another BIOS favors 64-bit resume environment, it > can > > > resume from there. > > > > And host OSes can be implemented using only 1 binary to work with both BIOSes. > > > > > > I'm not talking about that. > > > > > > It is fine to provide a *new* interface for the OSes that want to do that > > > (if any), but *why* is that regarded as a good enough reason for essentially > > > *removing* the old interface that Linux (and presumably other OSes too) have > > > been using so far? > > > > Maybe we should ask Bob if we shall just provide a new interfaces for this > > and keep the old ones? > > Sure, we can talk to Bob about that. > > > According to my understanding, there is no such example in the ACPICA upstream. > > Even so, that doesn't necessarily mean it is be impossible. Yes. > > > Some xxxx_full functions are still pending for being merged by ACPICA upstream, > > they are divergences for now. > > And it looks like this particular case will become one more divergence of that > kind. OK. I'll refine the interface change to eliminate the divergence. > > > > > > > We don't want to pass nonzero as high_address anyway, so why are we *forced* to > > > make pointless changes to non-ACPICA code just to be able to always pass 0 > > > as high_address? > > > > IMO, OSPMs can do this if the cost is not high. > > It seems by following your suggestion, we only need to do slight changes in sleep.c. > > Which aren't necessary, right? And they don't really make things any better. > > So I don't see a reason to make them. Yes. If this is done in ACPICA, sleep.c needn't be changed. Thanks and best regards -Lv ????{.n?+???????+%?????ݶ??w??{.n?+????{??G?????{ay?ʇڙ?,j??f???h?????????z_??(?階?ݢj"???m??????G????????????&???~???iO???z??v?^?m???? ????????I?