Re: [PATCH v4 1/5] efi: Introduce EFI_DIRECT flag

From: Daniel Kiper
Date: Mon May 19 2014 - 16:47:49 EST


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.

Daniel
--
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/