public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Re: [RFC PATCH 1/2] efi: Make 'efi_enabled' a function to
@ 2013-01-05  3:28 Guo Chao
  2013-01-08 11:01 ` Matt Fleming
  0 siblings, 1 reply; 2+ messages in thread
From: Guo Chao @ 2013-01-05  3:28 UTC (permalink / raw)
  To: matt; +Cc: linux-efi, linux-kernel

query EFI facilities
Reply-To: <1357219085-4312-2-git-send-email-matt@console-pimps.org> 
In-Reply-To: <1357219085-4312-2-git-send-email-matt@console-pimps.org> 

> diff --git a/init/main.c b/init/main.c
> index e33e09d..e71d924 100644
> --- a/init/main.c
> +++ b/init/main.c
> @@ -604,7 +604,7 @@ asmlinkage void __init start_kernel(void)
>  	pidmap_init();
>  	anon_vma_init();
>  #ifdef CONFIG_X86
> -	if (efi_enabled)
> +	if (efi_enabled(EFI_RUNTIME_SERVICES))
>  		efi_enter_virtual_mode();
>  #endif
>  	thread_info_cache_init();
> @@ -632,7 +632,7 @@ asmlinkage void __init start_kernel(void)
>  	acpi_early_init(); /* before LAPIC and SMP init */
>  	sfi_init_late();
> 
> -	if (efi_enabled) {
> +	if (efi_enabled(EFI_RUNTIME_SERVICES)) {
>  		efi_late_init();
>  		efi_free_boot_services();
>  	}

I just wonder why we compile efi code away explicitly by CONFIG_X86 in
one place and implicitly by if (0) in another place, in the same
function.

Thanks,
Guo Chao


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [RFC PATCH 1/2] efi: Make 'efi_enabled' a function to
  2013-01-05  3:28 [RFC PATCH 1/2] efi: Make 'efi_enabled' a function to Guo Chao
@ 2013-01-08 11:01 ` Matt Fleming
  0 siblings, 0 replies; 2+ messages in thread
From: Matt Fleming @ 2013-01-08 11:01 UTC (permalink / raw)
  To: Guo Chao; +Cc: linux-efi, linux-kernel, Matthew Garrett

On Sat, 2013-01-05 at 11:28 +0800, Guo Chao wrote:
> query EFI facilities
> Reply-To: <1357219085-4312-2-git-send-email-matt@console-pimps.org> 
> In-Reply-To: <1357219085-4312-2-git-send-email-matt@console-pimps.org> 
> 
> > diff --git a/init/main.c b/init/main.c
> > index e33e09d..e71d924 100644
> > --- a/init/main.c
> > +++ b/init/main.c
> > @@ -604,7 +604,7 @@ asmlinkage void __init start_kernel(void)
> >  	pidmap_init();
> >  	anon_vma_init();
> >  #ifdef CONFIG_X86
> > -	if (efi_enabled)
> > +	if (efi_enabled(EFI_RUNTIME_SERVICES))
> >  		efi_enter_virtual_mode();
> >  #endif
> >  	thread_info_cache_init();
> > @@ -632,7 +632,7 @@ asmlinkage void __init start_kernel(void)
> >  	acpi_early_init(); /* before LAPIC and SMP init */
> >  	sfi_init_late();
> > 
> > -	if (efi_enabled) {
> > +	if (efi_enabled(EFI_RUNTIME_SERVICES)) {
> >  		efi_late_init();
> >  		efi_free_boot_services();
> >  	}
> 
> I just wonder why we compile efi code away explicitly by CONFIG_X86 in
> one place and implicitly by if (0) in another place, in the same
> function.

Because ia64 also has an efi_enter_virtual_mode() implementation, but
that's called internally by arch/ia64.

The setup we've got at the moment isn't ideal, as there's a couple of
oddities like this dotted around the kernel. I have plans to try and
unify the EFI code a bit more based on a patch that Matthew Garrett
wrote, which should allow us to do away with things like the above.

-- 
Matt Fleming, Intel Open Source Technology Center


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-01-08 11:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-05  3:28 [RFC PATCH 1/2] efi: Make 'efi_enabled' a function to Guo Chao
2013-01-08 11:01 ` Matt Fleming

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox