Re: [PATCH] efi: add conditional include of asm/early_ioremap.h

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



(+ Dan)

On 11 January 2016 at 17:15, Guenter Roeck <linux@xxxxxxxxxxxx> wrote:
> On 01/11/2016 06:40 AM, Matt Fleming wrote:
>>
>> (Cc'ing ia64 maintainers)
>>
>> On Sun, 10 Jan, at 09:04:09PM, Ard Biesheuvel wrote:
>>>
>>> The code in efi.c uses early_memremap(), but relies on a transitive
>>> include rather than including asm/early_ioremap.h directly.
>>> Unfortunately, this header does not exist on ia64, so it cannot be
>>> included directly.
>>>
>>> Commit f7d924894265 ("arm64/efi: refactor EFI init and runtime code
>>> for reuse by 32-bit ARM") attempted to work around this by including
>>> asm/efi.h, which transitively includes asm/early_ioremap.h on most
>>> architectures. However, since asm/efi.h does not exist on ia64 either,
>>> this is not much of an improvement.
>>>
>>> So instead, just include asm/early_ioremap.h directly, unless CONFIG_IA64
>>> is defined.
>>>
>>> Fixes: f7d924894265 ("arm64/efi: refactor EFI init and runtime code for
>>> reuse by 32-bit ARM")
>>> Cc: Will Deacon <will.deacon@xxxxxxx>
>>> Reported-by: Guenter Roeck <linux@xxxxxxxxxxxx>
>>> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@xxxxxxxxxx>
>>> ---
>>>   drivers/firmware/efi/efi.c | 4 +++-
>>>   1 file changed, 3 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/drivers/firmware/efi/efi.c b/drivers/firmware/efi/efi.c
>>> index cffa89b3317b..53f71177824f 100644
>>> --- a/drivers/firmware/efi/efi.c
>>> +++ b/drivers/firmware/efi/efi.c
>>> @@ -25,7 +25,9 @@
>>>   #include <linux/io.h>
>>>   #include <linux/platform_device.h>
>>>
>>> -#include <asm/efi.h>
>>> +#ifndef CONFIG_IA64
>>> +#include <asm/early_ioremap.h>
>>> +#endif
>>>
>>>   struct efi __read_mostly efi = {
>>>         .mps                    = EFI_INVALID_TABLE_ADDR,
>>
>>
>> I certainly can't think of a better way to fix this right now. Tony,
>> Fenghua do you guys have any suggestions?
>>
>
> How about including asm/early_ioremap.h from arch/arm/include/asm/io.h,
> as it is done by arm64 and x86 ?
>

That would work as well, but it does not address how early_memremap()
is so poorly defined. I think the correct way would be to add the
include unconditionally, and move ia64's definition to a new ia64
version of early_ioremap.h
--
To unsubscribe from this list: send the line "unsubscribe linux-efi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux