From 4f384f8bcdb5d618a0a68fb84c809e602c798b8f Mon Sep 17 00:00:00 2001 From: Pavel Machek Date: Mon, 26 May 2008 21:17:30 +0200 Subject: [PATCH] x86: aperture_64.c: corner case wrong If fix == 0, aper_enabled == 1, gart_fix_e820 == 0 if (!fix && !aper_enabled) return; if (gart_fix_e820 && !fix && aper_enabled) { if (e820_any_mapped(aper_base, aper_base + aper_size, E820_RAM)) { /* reserve it, so we can reuse it in second kernel */ printk(KERN_INFO "update e820 for GART\n"); add_memory_region(aper_base, aper_size, E820_RESERVED); update_e820(); } return; } /* different nodes have different setting, disable them all atfirst*/ we'll fall back here and disable all the settings, even when they were all consistent. What about this? (I hope it compiles...) Signed-off-by: Pavel Machek Cc: Dave Jones Cc: Andi Kleen Signed-off-by: Thomas Gleixner --- arch/x86/kernel/aperture_64.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/x86/kernel/aperture_64.c b/arch/x86/kernel/aperture_64.c index e5b17f910f8b..eb20f168c0fd 100644 --- a/arch/x86/kernel/aperture_64.c +++ b/arch/x86/kernel/aperture_64.c @@ -331,9 +331,11 @@ void __init early_gart_iommu_check(void) add_memory_region(aper_base, aper_size, E820_RESERVED); update_e820(); } - return; } + if (!fix) + return; + /* different nodes have different setting, disable them all at first*/ for (i = 0; i < ARRAY_SIZE(bus_dev_ranges); i++) { int bus; -- 2.30.2