From: <nbo...@us...> - 2006-11-30 09:41:47
|
Revision: 70 http://svn.sourceforge.net/mactel-linux/?rev=70&view=rev Author: nboichat Date: 2006-11-30 01:41:41 -0800 (Thu, 30 Nov 2006) Log Message: ----------- Add efi_e820_all_mapped_fix.patch to 2.6.19 patchset. Added Paths: ----------- trunk/kernel/mactel-patches-2.6.19/efi_e820_all_mapped_fix.patch Added: trunk/kernel/mactel-patches-2.6.19/efi_e820_all_mapped_fix.patch =================================================================== --- trunk/kernel/mactel-patches-2.6.19/efi_e820_all_mapped_fix.patch (rev 0) +++ trunk/kernel/mactel-patches-2.6.19/efi_e820_all_mapped_fix.patch 2006-11-30 09:41:41 UTC (rev 70) @@ -0,0 +1,48 @@ +--- a/arch/i386/kernel/setup.c 2006-06-19 09:12:09.000000000 +0200 ++++ b/arch/i386/kernel/setup.c 2006-06-19 09:12:24.000000000 +0200 +@@ -975,24 +975,28 @@ + u64 start = s; + u64 end = e; + int i; +- for (i = 0; i < e820.nr_map; i++) { +- struct e820entry *ei = &e820.map[i]; +- if (type && ei->type != type) +- continue; +- /* is the region (part) in overlap with the current region ?*/ +- if (ei->addr >= end || ei->addr + ei->size <= start) +- continue; +- /* if the region is at the beginning of <start,end> we move +- * start to the end of the region since it's ok until there +- */ +- if (ei->addr <= start) +- start = ei->addr + ei->size; +- /* if start is now at or beyond end, we're done, full +- * coverage */ +- if (start >= end) +- return 1; /* we're done */ ++ if(!efi_enabled) { ++ for (i = 0; i < e820.nr_map; i++) { ++ struct e820entry *ei = &e820.map[i]; ++ if (type && ei->type != type) ++ continue; ++ /* is the region (part) in overlap with the current region ?*/ ++ if (ei->addr >= end || ei->addr + ei->size <= start) ++ continue; ++ /* if the region is at the beginning of <start,end> we move ++ * start to the end of the region since it's ok until there ++ */ ++ if (ei->addr <= start) ++ start = ei->addr + ei->size; ++ /* if start is now at or beyond end, we're done, full ++ * coverage */ ++ if (start >= end) ++ return 1; /* we're done */ ++ } ++ return 0; ++ } else { ++ return 1; + } +- return 0; + } + + /* This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |