Re: [PATCH v6 08/14] efi: export efi runtime memory mapping to sysfs

Dave Young
2013-12-17T06:13:47Z

On 12/16/13 at 03:09pm, Matt Fleming wrote:
> On Mon, 16 Dec, at 05:30:29PM, Dave Young wrote:
> > @@ -899,6 +928,11 @@ void __init efi_enter_virtual_mode(void)
> > return;
> > }
> >
> > +#ifdef CONFIG_EFI_RUNTIME_MAP
> > + efi_runtime_map_setup(efi_runtime_map, nr_efi_runtime_map,
> > + boot_params.efi_info.efi_memdesc_size);
> > +#endif
>
> [...]
>
> > @@ -167,6 +167,12 @@ static int __init efisubsys_init(void)
> > goto err_unregister;
> > }
> >
> > +#ifdef CONFIG_EFI_RUNTIME_MAP
> > + error = efi_runtime_map_init(efi_kobj);
> > + if (error)
> > + goto err_remove_group;
> > +#endif
>
> [...]
>
> > @@ -876,4 +876,9 @@ int efivars_sysfs_init(void);
> >
> > #endif /* CONFIG_EFI_VARS */
> >
> > +#ifdef CONFIG_EFI_RUNTIME_MAP
> > +int efi_runtime_map_init(struct kobject *);
> > +void efi_runtime_map_setup(void *, int, u32);
> > +#endif
>
> I was thinking more along the lines of...

Previously I only call the function conditionally thus there's
compiler warning about "unused function" for the #else

unconditionally call it build will be ok. Will update this patch.