Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp2509966ybi; Mon, 17 Jun 2019 06:09:32 -0700 (PDT) X-Google-Smtp-Source: APXvYqwkxNMFqDgiQOnQjO/R+09TtYKEgz9DsVv1wvFSY66li1ep/i+xNqmzLra+iTRTgUiiMe2P X-Received: by 2002:a17:902:b7c1:: with SMTP id v1mr15060862plz.85.1560776972200; Mon, 17 Jun 2019 06:09:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560776972; cv=none; d=google.com; s=arc-20160816; b=r8EAt03BEUbXqGH5wo6agfZ1uSia63AV2dqun8HQdek3rsZEv4VICE4PAuW3gtFg+n 7ml2Hh9E+ktuS3S7hCJ72bpON2EOzL0toTopvXfQbh53l5t/R57+n2L75XCUGcVdYtw8 Vl4IlB66fRwwkdjJEdRK+4aLWf35HImN7pcuOFrAb9+xWu+ANRZYJa5U+IjZHKJX9OfW uNzP928wjBXAvDXKll53AKF4REIP6ertPi9pAPE106WFhlkf1Ghc2DlXmi+lx2lyvZiu CszMefJaBH5x8GpSIANHEBM/55jGrHDmabbnHRJ5DOVoghafQHKbjMiIB/OkzKbk/8VO pPdQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=r3qNyzhje1kCZraYWfr8I2NEmm1aAivcbx9zIoXlsMQ=; b=qsj3qU5dmHyqvRU/eEbJKtkyL5Oxhs8Nkx1wEJniy68E7+FekZ60dPCErzNzsL9QLD b5TNMK/a7dPjmWVNm48Sj8motnVnBjLADl9RySI2H3YixNOqzaDC8fijQh9jz/+ube4q VMYHUKS1AJZmeEe2QchDGQRVTF41FJ6Nm3D6jVY6ND+VlXIbsFFF9EqKLM45g1pa4tJm a56xONw6Mo+efHWBZHZx397UwR5lGKgJbkFyIjxcFyg8ZkR1gCYQKXNuMyHOAN0dOciO 312sWlPo2zxBBj7MHzMSh4RIK6AC8p+ollnnIS7Vtl/xrp03iJobbTtBSp51VrM4nFy7 1nbg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u15si10697534pfl.76.2019.06.17.06.09.15; Mon, 17 Jun 2019 06:09:32 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728186AbfFQNIc (ORCPT + 99 others); Mon, 17 Jun 2019 09:08:32 -0400 Received: from atrey.karlin.mff.cuni.cz ([195.113.26.193]:46023 "EHLO atrey.karlin.mff.cuni.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726061AbfFQNIb (ORCPT ); Mon, 17 Jun 2019 09:08:31 -0400 Received: by atrey.karlin.mff.cuni.cz (Postfix, from userid 512) id 12BC88025E; Mon, 17 Jun 2019 15:08:18 +0200 (CEST) Date: Mon, 17 Jun 2019 15:08:28 +0200 From: Pavel Machek To: Dexuan Cui Cc: Michael Kelley , "linux-acpi@vger.kernel.org" , "rjw@rjwysocki.net" , "lenb@kernel.org" , "robert.moore@intel.com" , "erik.schmauss@intel.com" , Russell King , Russ Dill , Sebastian Capella , Lorenzo Pieralisi , "linux-hyperv@vger.kernel.org" , "linux-kernel@vger.kernel.org" , KY Srinivasan , Stephen Hemminger , Haiyang Zhang , Sasha Levin , "olaf@aepfle.de" , "apw@canonical.com" , "jasowang@redhat.com" , vkuznets , "marcelo.cerri@canonical.com" Subject: Re: [PATCH] ACPI: PM: Export the function acpi_sleep_state_supported() Message-ID: <20190617130828.GB21113@amd> References: <1560536224-35338-1-git-send-email-decui@microsoft.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="i9LlY+UWpKt15+FH" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --i9LlY+UWpKt15+FH Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi! > > > In a Linux VM running on Hyper-V, when ACPI S4 is enabled, the balloon > > > driver (drivers/hv/hv_balloon.c) needs to ask the host not to do memo= ry > > > hot-add/remove. > > > > > > So let's export acpi_sleep_state_supported() for the hv_balloon drive= r. > > > This might also be useful to the other drivers in the future. > > > > > > Signed-off-by: Dexuan Cui > >=20 > > It seems that sleep.c isn't built when on the ARM64 architecture. Using > > acpi_sleep_state_supported() directly in hv_balloon.c will be problemat= ic > > since hv_balloon.c needs to be architecture independent when the > > Hyper-V ARM64 support is added. If that doesn't change, a per-architec= ture > > wrapper will be needed to give hv_balloon.c the correct information. T= his > > may affect whether acpi_sleep_state_supported() needs to be exported vs. > > just removing the "static". I'm not sure what the best approach is. > >=20 > > Michael >=20 > + some ARM experts who worked on arch/arm/kernel/hibernate.c. >=20 > drivers/acpi/sleep.c is only built if ACPI_SYSTEM_POWER_STATES_SUPPORT > is defined, but it looks this option is not defined on ARM. >=20 > It looks ARM does not support the ACPI S4 state, then how do we know=20 > if an ARM host supports hibernation or not? You should be able to do hibernation without ACPI S4 support. All you need is ability to powerdown... It is well possible that noone tested hibernation on ARM.. people usually do suspend-to-ram there. Pavel --=20 (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blo= g.html --i9LlY+UWpKt15+FH Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAl0HkMwACgkQMOfwapXb+vLW8gCfb8sq1/PCXpx+Gk0syVPC0p7I g6sAn2pPwcNXL+jTiD/bs2aoDQtOdAFZ =u/TZ -----END PGP SIGNATURE----- --i9LlY+UWpKt15+FH--