[PATCH] AMD, K7: Fix compilation error when EFI_STUG is enabled

From: Borislav Petkov
Date: Thu Mar 29 2012 - 03:39:51 EST


Trevor Turner reported that building the 3.3 kernel on his K7 box fails.
Reproducing the issue locally got us also the exact build error:

arch/x86/boot/compressed/eboot.o: In function `efi_main':
eboot.c:(.text+0x1530): undefined reference to `_mmx_memcpy'
eboot.c:(.text+0x17d0): undefined reference to `_mmx_memcpy'
make[2]: *** [arch/x86/boot/compressed/vmlinux] Error 1
make[1]: *** [arch/x86/boot/compressed/vmlinux] Error 2
make[1]: *** Waiting for unfinished jobs....

due to the fact that K7 has special MMX memcpy routines which EFI_STUB
uses through memcpy but is not linked against them thus the build
failure.

Instead of making this work, we decided to make EFI_STUB and K7 mutually
exclusive since they're from different epochs anyway. The patch below
fixes that.

Reported-by: Trevor Turner <turn3r.tr3v0r@xxxxxxxxx>
Cc: Matt Fleming <matt.fleming@xxxxxxxxx>
Signed-off-by: Borislav Petkov <bp@xxxxxxxxx>
---
arch/x86/Kconfig | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 5bed94e189fa..80b116281661 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -1516,7 +1516,7 @@ config EFI

config EFI_STUB
bool "EFI stub support"
- depends on EFI
+ depends on EFI && !MK7
---help---
This kernel feature allows a bzImage to be loaded directly
by EFI firmware without the use of a bootloader.
--
1.7.5.3.401.gfb674

--
Regards/Gruss,
Boris.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/