[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <35d909969a9b883d8ee15ee1df497fd9@pinky>
Date: Fri, 24 Nov 2006 16:59:10 +0000
From: Andy Whitcroft <apw@...dowen.org>
To: Andrew Morton <akpm@...l.org>
Cc: Andy Whitcroft <apw@...dowen.org>,
Artiom Myaskouvskey <artiom.myaskouvskey@...el.com>,
Andi Kleen <ak@...e.de>, linux-kernel@...r.kernel.org
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.
-apw
=== 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 <apw@...dowen.org>
---
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.map +
(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 majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists