From: "Jan Beulich" Subject: Re: [PATCH for-4.5 V8 4/4] Add ARM EFI boot support Date: Fri, 26 Sep 2014 10:32:21 +0100 Message-ID: <54254EC502000078000398AA@mail.emea.novell.com> References: <1411706529-8765-1-git-send-email-roy.franz@linaro.org> <1411706529-8765-5-git-send-email-roy.franz@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1411706529-8765-5-git-send-email-roy.franz@linaro.org> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Roy Franz Cc: keir@xen.org, ian.campbell@citrix.com, tim@xen.org, xen-devel@lists.xen.org, stefano.stabellini@citrix.com, fu.wei@linaro.org List-Id: xen-devel@lists.xenproject.org >>> On 26.09.14 at 06:42, wrote: > --- a/xen/common/efi/boot.c > +++ b/xen/common/efi/boot.c > @@ -18,9 +18,17 @@ > #include > #include > #include > +#ifdef CONFIG_X86 > +/* > + * Keep this arch-specific modified include in the common file, as moving > + * it to the arch specific include file would obscure that special care is > + * taken to include it with __ASSEMBLY__ defined. > + */ > #define __ASSEMBLY__ /* avoid pulling in ACPI stuff (conflicts with EFI) */ > #include > #undef __ASSEMBLY__ > +#endif > +#include This belongs ahead of the asm/ one(s). And note that they're all sorted alphabetically (in order to reduce collisions on racing patches by default inserting at the end). > --- a/xen/common/efi/runtime.c > +++ b/xen/common/efi/runtime.c > @@ -4,17 +4,23 @@ > #include > #include > #include > +#ifdef CONFIG_X86 > #include > +#endif As said elsewhere - please introduce runtime.h to hold this on the x86 side. > @@ -24,7 +30,6 @@ unsigned int __read_mostly efi_fw_revision; > const CHAR16 *__read_mostly efi_fw_vendor; > > EFI_RUNTIME_SERVICES *__read_mostly efi_rs; > -static DEFINE_SPINLOCK(efi_rs_lock); Even at the expense of a few more temporary #ifdef-s - please don't move this down, it got placed next to efi_rs for a reason. > @@ -41,10 +46,12 @@ struct efi __read_mostly efi = { > .smbios = EFI_INVALID_TABLE_ADDR, > }; > > -l4_pgentry_t *__read_mostly efi_l4_pgtable; > - > const struct efi_pci_rom *__read_mostly efi_pci_roms; > > +#ifndef CONFIG_ARM /* TODO - disabled until implemented on ARM */ > +static DEFINE_SPINLOCK(efi_rs_lock); > +l4_pgentry_t *__read_mostly efi_l4_pgtable; This again is a candidate for movement into runtime.h. Jan