Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=338195...
Commit: 3381959da5a00ae8289cfbd28b0b6d228f2d1d46
Parent: c987d12f8455b19b3b057d63bac3de161bd809fc
Author: Alok Kataria <akataria@vmware.com>
AuthorDate: Tue Jun 24 11:48:30 2008 -0700
Committer: Ingo Molnar <mingo@elte.hu>
CommitDate: Tue Jul 8 13:10:39 2008 +0200
x86: cleanup e820_setup_gap(), add e820_search_gap(), v2
This is a preparatory patch for the next patch in series.
Moves some code from e820_setup_gap to a new function e820_search_gap.
This patch is a part of a bug fix where we walk the ACPI table to calculate
a gap for PCI optional devices.
v1->v2: Patch on top of tip/master.
Fixes a bug introduced in the last patch about the typeof "last".
Also the new function e820_search_gap now returns if we found a gap in
e820_map.
Signed-off-by: Alok N Kataria <akataria@vmware.com>
Cc: lenb@kernel.org
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
arch/x86/kernel/e820.c | 43 ++++++++++++++++++++++++++++---------------
include/asm-x86/e820.h | 2 ++
2 files changed, 30 insertions(+), 15 deletions(-)
diff --git a/arch/x86/kernel/e820.c b/arch/x86/kernel/e820.c
index 3900ff5..22cfd66 100644
--- a/arch/x86/kernel/e820.c
+++ b/arch/x86/kernel/e820.c
@@ -488,26 +488,22 @@ void __init update_e820(void)
}
/*
- * Search for the biggest gap in the low 32 bits of the e820
- * memory space. We pass this space to PCI to assign MMIO resources
- * for hotplug or unconfigured devices in.
- * Hopefully the BIOS let enough space left.
+ * Search for a gap in the e820 memory space from start_addr to 2^32.
*/
-__init void e820_setup_gap(void)
+__init int e820_search_gap(unsigned long *gapstart, unsigned long *gapsize,
+ unsigned long start_addr)
{
- unsigned long gapstart, gapsize, round;
- unsigned long long last;
- int i;
+ unsigned long long last = ...