linux-efi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Guenter Roeck <linux-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org>
To: Ard Biesheuvel <ard.biesheuvel-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
Cc: Matt Fleming
	<matt-mF/unelCI9GS6iBeEJttW/XRex20P6io@public.gmane.org>,
	"linux-efi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-efi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	"linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	Will Deacon <will.deacon-5wv7dgnIgG8@public.gmane.org>
Subject: Re: [PATCH -next] efi: Do not include asm/efi.h if not needed
Date: Sun, 10 Jan 2016 11:39:33 -0800	[thread overview]
Message-ID: <5692B375.2080600@roeck-us.net> (raw)
In-Reply-To: <CAKv+Gu96_7fZ15rK7-nuHyhs=c6VhrWz55r88Vjz9sdXOSP3uA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

On 01/10/2016 09:31 AM, Ard Biesheuvel wrote:
> On 10 January 2016 at 18:02, Ard Biesheuvel <ard.biesheuvel-QSEj5FYQhm5QFI55V6+gNQ@public.gmane.orgg> wrote:
>> On 10 January 2016 at 16:35, Guenter Roeck <linux-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org> wrote:
>>> Commit f7d924894265 ("arm64/efi: refactor EFI init and runtime code
>>> for reuse by 32-bit ARM") adds an include of asm/efi.h to efi.c.
>>> This causes a build failure for ia64, where asm/efi.h does not exist.
>>>
>>> drivers/firmware/efi/efi.c:28:21: fatal error:
>>>          asm/efi.h: No such file or directory
>>>
>>> asm/efi.h does not define or declare anything used by efi.c, thus
>>> including it should not be needed.
>>>
>>> Fixes: f7d924894265 ("arm64/efi: refactor EFI init and runtime code for reuse by 32-bit ARM")
>>> Cc: Ard Biesheuvel <ard.biesheuvel-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
>>> Cc: Will Deacon <will.deacon-5wv7dgnIgG8@public.gmane.org>
>>> Signed-off-by: Guenter Roeck <linux-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org>
>>
>> This fixes ia64 but breaks ARM
>>
>> drivers/firmware/efi/efi.c: In function ‘efi_mem_desc_lookup’:
>> drivers/firmware/efi/efi.c:291:3: error: implicit declaration of
>> function ‘early_memremap’ [-Werror=implicit-function-declaration]
>> drivers/firmware/efi/efi.c:291:6: warning: assignment makes pointer
>> from integer without a cast [enabled by default]
>> drivers/firmware/efi/efi.c:301:4: error: implicit declaration of
>> function ‘early_memunmap’ [-Werror=implicit-function-declaration]
>> drivers/firmware/efi/efi.c: In function ‘efi_config_parse_tables’:
>> drivers/firmware/efi/efi.c:404:7: warning: assignment makes pointer
>> from integer without a cast [enabled by default]
>> drivers/firmware/efi/efi.c: In function ‘efi_config_init’:
>> drivers/firmware/efi/efi.c:433:16: warning: assignment makes pointer
>> from integer without a cast [enabled by default]
>>
>
> This means efi.c should include <asm/early_ioremap.h> but that does
> not exist on ia64 either.
> Perhaps add a #ifdef CONFIG_IA64?
>
#include <asm/io.h>

I'll check if that works for all architectures.

Guenter

>>> ---
>>>   drivers/firmware/efi/efi.c | 2 --
>>>   1 file changed, 2 deletions(-)
>>>
>>> diff --git a/drivers/firmware/efi/efi.c b/drivers/firmware/efi/efi.c
>>> index cffa89b3317b..027ca212179f 100644
>>> --- a/drivers/firmware/efi/efi.c
>>> +++ b/drivers/firmware/efi/efi.c
>>> @@ -25,8 +25,6 @@
>>>   #include <linux/io.h>
>>>   #include <linux/platform_device.h>
>>>
>>> -#include <asm/efi.h>
>>> -
>>>   struct efi __read_mostly efi = {
>>>          .mps                    = EFI_INVALID_TABLE_ADDR,
>>>          .acpi                   = EFI_INVALID_TABLE_ADDR,
>>> --
>>> 2.1.4
>>>
>

  parent reply	other threads:[~2016-01-10 19:39 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-10 15:35 [PATCH -next] efi: Do not include asm/efi.h if not needed Guenter Roeck
     [not found] ` <1452440128-15134-1-git-send-email-linux-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org>
2016-01-10 17:02   ` Ard Biesheuvel
2016-01-10 17:31     ` Ard Biesheuvel
     [not found]       ` <CAKv+Gu96_7fZ15rK7-nuHyhs=c6VhrWz55r88Vjz9sdXOSP3uA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-01-10 19:39         ` Guenter Roeck [this message]
     [not found]           ` <5692B375.2080600-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org>
2016-01-10 19:47             ` Guenter Roeck

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5692B375.2080600@roeck-us.net \
    --to=linux-0h96xk9xttrk1umjsbkqmq@public.gmane.org \
    --cc=ard.biesheuvel-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
    --cc=linux-efi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=matt-mF/unelCI9GS6iBeEJttW/XRex20P6io@public.gmane.org \
    --cc=will.deacon-5wv7dgnIgG8@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).