[lkml]   [2006]   [Nov]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
Subject[PATCH] efi_limit_regions triggers link failure when CONFIG_EFI is not defined
The following patch is needed to get 2.6.19-rc6-mm1 to compile with
CONFIG_EFI disabled. This is the 'shortest' fix. However, it does
appear that there is some overlap with EFI implmentation partly
being in e820.c and partly in efi.c. It might make sense to move
everything efi related over to efi.c.


=== 8< ===
efi_limit_regions triggers link failure when CONFIG_EFI is not defined

The changes in the patch x86_64-mm-i386-efi-memmap extracted
the guts of limit_regions out into a new efi_limit_regions().
This exposes this code to the compiler uncondionally, previously
it was under an if (efi_enabled) which allowed it to be optimised
away without comment. This leads to link errors looking for an
undefined memmap. Make the routine body conditional on CONFIG_EFI.

Signed-off-by: Andy Whitcroft <>
diff --git a/arch/i386/kernel/e820.c b/arch/i386/kernel/e820.c
index 6f3fda4..393b87a 100644
--- a/arch/i386/kernel/e820.c
+++ b/arch/i386/kernel/e820.c
@@ -743,6 +743,7 @@ void __init print_memory_map(char *who)

static __init void efi_limit_regions(unsigned long long size)
+#ifdef CONFIG_EFI
unsigned long long current_addr = 0;
efi_memory_desc_t *md, *next_md;
void *p, *p1;
@@ -779,6 +780,7 @@ static __init void efi_limit_regions(uns
memmap.nr_map = j;
memmap.map_end = +
(memmap.nr_map * memmap.desc_size);
+#endif /* CONFIG_EFI */

void __init limit_regions(unsigned long long size)
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at
 \ /
  Last update: 2006-11-24 18:03    [W:0.238 / U:0.864 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site