From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757399AbcAJTr3 (ORCPT ); Sun, 10 Jan 2016 14:47:29 -0500 Received: from bh-25.webhostbox.net ([208.91.199.152]:54112 "EHLO bh-25.webhostbox.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757185AbcAJTr2 (ORCPT ); Sun, 10 Jan 2016 14:47:28 -0500 Subject: Re: [PATCH -next] efi: Do not include asm/efi.h if not needed To: Ard Biesheuvel References: <1452440128-15134-1-git-send-email-linux@roeck-us.net> <5692B375.2080600@roeck-us.net> Cc: Matt Fleming , "linux-efi@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Will Deacon From: Guenter Roeck Message-ID: <5692B54E.2020207@roeck-us.net> Date: Sun, 10 Jan 2016 11:47:26 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-Version: 1.0 In-Reply-To: <5692B375.2080600@roeck-us.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Authenticated_sender: linux@roeck-us.net X-OutGoing-Spam-Status: No, score=-1.0 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - bh-25.webhostbox.net X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - roeck-us.net X-Get-Message-Sender-Via: bh-25.webhostbox.net: authenticated_id: linux@roeck-us.net X-Authenticated-Sender: bh-25.webhostbox.net: linux@roeck-us.net X-Source: X-Source-Args: X-Source-Dir: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 01/10/2016 11:39 AM, Guenter Roeck wrote: > On 01/10/2016 09:31 AM, Ard Biesheuvel wrote: >> On 10 January 2016 at 18:02, Ard Biesheuvel wrote: >>> On 10 January 2016 at 16:35, Guenter Roeck 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 >>>> Cc: Will Deacon >>>> Signed-off-by: Guenter Roeck >>> >>> 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 but that does >> not exist on ia64 either. >> Perhaps add a #ifdef CONFIG_IA64? >> > #include > > I'll check if that works for all architectures. > ... and it doesn't. Ok, I give up on that one. I don't know what a proper fix would be. My argument would be that the arm changes broke the build for ia64, are therefore the culprit and should either be reverted or dropped. But I'll leave that to the ia64 and efi maintainers to sort out. Thanks, Guenter