Hi, On 07/07/15 at 01:20pm, Yinghai Lu wrote: > The copy will be in __initdata, and it is small. > > We can use pointer to access the setup_data instead of using early_memmap > everywhere.
Looks good to me except one issue about missing checking memremap return value. see the comment inline > > Cc: Matt Fleming <matt.flem...@intel.com> > Cc: linux-...@vger.kernel.org > Signed-off-by: Yinghai Lu <ying...@kernel.org> > --- [snip] > --- a/arch/x86/platform/efi/efi_64.c > +++ b/arch/x86/platform/efi/efi_64.c > @@ -295,9 +295,17 @@ void __iomem *__init efi_ioremap(unsigned long > phys_addr, unsigned long size, > return (void __iomem *)__va(phys_addr); > } > > +static struct efi_setup_data efi_setup_data __initdata; > + > void __init parse_efi_setup(u64 phys_addr, u32 data_len) > { > - efi_setup = phys_addr + sizeof(struct setup_data); > + struct efi_setup_data *data; > + > + data = early_memremap(phys_addr + sizeof(struct setup_data), > + sizeof(*data)); There should be a checking for return value here.. > + efi_setup_data = *data; > + early_memunmap(data, sizeof(*data)); > + efi_setup = &efi_setup_data; > } > [snip] Thanks Dave -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/