note that this code has significantly changed in x86-next (it has been
fixed, extended, cleaned up and unified). You can find the latest
patches in tip/master at:
http://people.redhat.com/mingo/tip.git/README
tip/master contains the integration of all changes in this area.
We could apply and test your change in tip/x86 as well, as it seems
standalone and independent of ACPI - so that when the acpi change shows
up in linux-next there's a e820_search_gap() function available.
Ingo
--