Received: from list by lists.gnu.org with archive (Exim 4.71) id 1YOqjn-0007Pj-V6 for mharc-grub-devel@gnu.org; Fri, 20 Feb 2015 11:47:35 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57884) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YOqjk-0007P5-CL for grub-devel@gnu.org; Fri, 20 Feb 2015 11:47:33 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YOqjh-0006lv-4U for grub-devel@gnu.org; Fri, 20 Feb 2015 11:47:32 -0500 Received: from mail.emea.novell.com ([130.57.118.101]:44337) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YOqjg-0006lb-SP for grub-devel@gnu.org; Fri, 20 Feb 2015 11:47:29 -0500 Received: from EMEA1-MTA by mail.emea.novell.com with Novell_GroupWise; Fri, 20 Feb 2015 16:47:27 +0000 Message-Id: <54E7732D02000078000622EF@mail.emea.novell.com> X-Mailer: Novell GroupWise Internet Agent 14.0.1 Date: Fri, 20 Feb 2015 16:47:25 +0000 From: "Jan Beulich" To: "Daniel Kiper" Subject: Re: [PATCH 07/18] efi: run EFI specific code on EFI platform only References: <1422640462-28103-1-git-send-email-daniel.kiper@oracle.com> <1422640462-28103-8-git-send-email-daniel.kiper@oracle.com> In-Reply-To: <1422640462-28103-8-git-send-email-daniel.kiper@oracle.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 130.57.118.101 Cc: Juergen Gross , grub-devel@gnu.org, keir@xen.org, ian.campbell@citrix.com, stefano.stabellini@eu.citrix.com, andrew.cooper3@citrix.com, roy.franz@linaro.org, ning.sun@intel.com, david.vrabel@citrix.com, phcoder@gmail.com, xen-devel@lists.xenproject.org, qiaowei.ren@intel.com, richard.l.maliszewski@intel.com, gang.wei@intel.com, fu.wei@linaro.org X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Feb 2015 16:47:34 -0000 >>> On 30.01.15 at 18:54, wrote: > --- a/xen/arch/x86/shutdown.c > +++ b/xen/arch/x86/shutdown.c > @@ -504,7 +504,8 @@ void machine_restart(unsigned int delay_millisecs) > tboot_shutdown(TB_SHUTDOWN_REBOOT); > } > =20 > - efi_reset_system(reboot_mode !=3D 0); > + if ( efi_platform ) > + efi_reset_system(reboot_mode !=3D 0); Please sync with Konrad on this one - it's supposed to get moved and conditionalized anyway. > --- a/xen/common/efi/boot.c > +++ b/xen/common/efi/boot.c > @@ -1154,6 +1154,11 @@ void __init efi_init_memory(void) > } *extra, *extra_head =3D NULL; > #endif > =20 > +#ifndef CONFIG_ARM /* TODO - disabled until implemented on ARM */ > + if ( !efi_platform ) > + return; > +#endif At least for this one I'd rather see the call site to have the conditional. > --- a/xen/common/efi/runtime.c > +++ b/xen/common/efi/runtime.c > @@ -164,6 +164,9 @@ int efi_get_info(uint32_t idx, union xenpf_efi_info = *info) > { > unsigned int i, n; > =20 > + if ( !efi_platform ) > + return -ENOSYS; > + > switch ( idx ) > { > case XEN_FW_EFI_VERSION: > @@ -298,6 +301,9 @@ int efi_runtime_call(struct xenpf_efi_runtime_call = *op) > EFI_STATUS status =3D EFI_NOT_STARTED; > int rc =3D 0; > =20 > + if ( !efi_platform ) > + return -ENOSYS; EOPNOTSUPP in both cases please, consistent with when runtime service use is disabled. Jan