x86/efi: Mark initialization code as such
The 32 bit and 64 bit implementations differ in their __init annotations
for some functions referenced from the common EFI code. Namely, the 32
bit variant is missing some of the __init annotations the 64 bit variant
has.
To solve the colliding annotations, mark the corresponding functions in
efi_32.c as initialization code, too -- as it is such.
Actually, quite a few more functions are only used during initialization
and therefore can be marked __init. They are therefore annotated, too.
Also add the __init annotation to the prototypes in the efi.h header so
users of those functions will see it's meant as initialization code
only.
This patch also fixes the "prelog" typo. ("prologue" / "epilogue" might
be more appropriate but this is C code after all, not an opera! :D)
Signed-off-by: Mathias Krause <minipli@googlemail.com>
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
This commit is contained in:
committed by
Matt Fleming
parent
0ce4605c9a
commit
4e78eb0561
@@ -79,7 +79,7 @@ static void __init early_code_mapping_set_exec(int executable)
|
||||
}
|
||||
}
|
||||
|
||||
void __init efi_call_phys_prelog(void)
|
||||
void __init efi_call_phys_prolog(void)
|
||||
{
|
||||
unsigned long vaddress;
|
||||
int pgd;
|
||||
@@ -139,7 +139,7 @@ void efi_sync_low_kernel_mappings(void)
|
||||
sizeof(pgd_t) * num_pgds);
|
||||
}
|
||||
|
||||
int efi_setup_page_tables(unsigned long pa_memmap, unsigned num_pages)
|
||||
int __init efi_setup_page_tables(unsigned long pa_memmap, unsigned num_pages)
|
||||
{
|
||||
unsigned long text;
|
||||
struct page *page;
|
||||
@@ -192,7 +192,7 @@ int efi_setup_page_tables(unsigned long pa_memmap, unsigned num_pages)
|
||||
return 0;
|
||||
}
|
||||
|
||||
void efi_cleanup_page_tables(unsigned long pa_memmap, unsigned num_pages)
|
||||
void __init efi_cleanup_page_tables(unsigned long pa_memmap, unsigned num_pages)
|
||||
{
|
||||
pgd_t *pgd = (pgd_t *)__va(real_mode_header->trampoline_pgd);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user