Re: [PATCH v4 1/5] efi: Introduce EFI_DIRECT flag
From: Jan Beulich
Date: Tue May 20 2014 - 02:16:35 EST
>>> On 19.05.14 at 22:46, <daniel.kiper@xxxxxxxxxx> wrote:
> On Mon, May 19, 2014 at 02:30:45PM +0100, Jan Beulich wrote:
>> >>> On 16.05.14 at 22:41, <daniel.kiper@xxxxxxxxxx> wrote:
>> > @@ -457,6 +460,21 @@ void __init efi_free_boot_services(void)
>> > efi_unmap_memmap();
>> > }
>> >
>> > +static void __init __iomem *efi_early_ioremap(resource_size_t phys_addr,
>> > + unsigned long size)
>> > +{
>> > + if (efi_enabled(EFI_DIRECT))
>> > + return early_ioremap(phys_addr, size);
>> > +
>> > + return (__force void __iomem *)phys_addr;
>>
>> Now that surely needs some explanation: I can't see how this can
>> ever be correct, Xen or not being completely irrelevant.
>
> I hope that efi_enabled(EFI_DIRECT) is obvious. However, in case of
> !efi_enabled(EFI_DIRECT) some structures are created artificially
> and they live in virtual address space. So that is why they should
> not be mapped. If you wish I could add relevant comment here.
That would be the very minimum I suppose. But I wonder whether
you wouldn't be better off storing their physical addresses in the
first place (and then decide whether you can stay with early_ioremap()
or want/need to use early_memremap() if !EFI_DIRECT).
Jan
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/