Re: [PATCH 1/5] EFI: Provide registration for efi_init.. etc efipublic function

From: Konrad Rzeszutek Wilk
Date: Thu Feb 09 2012 - 11:04:31 EST


On Thu, Feb 09, 2012 at 11:32:08AM +0800, Tang Liang wrote:
> The efi public functions are changed to function pointer in efi_init_funcs
> struct.
> They act as efi generic functions as default.
> As a benefit from this change, we can register xen efi init func.
>
> Signed-off-by: Tang Liang <liang.tang@xxxxxxxxxx>
> ---
> arch/x86/platform/efi/efi.c | 65 +++++++++++++++++++++++++++++++++++++++---
> include/linux/efi.h | 12 +++++++-
> 2 files changed, 71 insertions(+), 6 deletions(-)
>
> diff --git a/arch/x86/platform/efi/efi.c b/arch/x86/platform/efi/efi.c
> index 4cf9bd0..d567e29 100644
> --- a/arch/x86/platform/efi/efi.c
> +++ b/arch/x86/platform/efi/efi.c
> @@ -50,6 +50,23 @@
> #define PFX "EFI: "
>
> int efi_enabled;
> +
> +static void efi_init_generic(void);
> +
> +static void efi_enter_virtual_mode_generic(void);
> +static u32 efi_mem_type_generic(unsigned long phys_addr);
> +static u64 efi_mem_attributes_generic(unsigned long phys_addr);
> +
> +struct efi_init_funcs efi_generic_funcs = {
> + .__efi_init = efi_init_generic,
> + .__efi_reserve_boot_services = efi_reserve_boot_services_generic,

Hmm, did you compile test this? I get:

/home/konrad/ssd/linux/arch/x86/platform/efi/efi.c:62: error: âefi_reserve_boot_services_genericâ undeclared here (not in a function)

The patch below fixes it: