it is the right fix. The architecture memory setup code doesnt even
_know_ the limits at this place in an open-coded way (and shouldnt know
them) - and even later on we use pfn_valid() to determine whether to
attempt to get to a struct page and free it into the buddy.
[ Of course the architecture code in general 'knows' about the limits -
but still it's cleaner to have a dumb enumeration interface here
combined with a resilient core code - that's always going to be less
fragile. ]
btw., i just did some bug history analysis, the calls were originally
added when sparsemem support was added:
| commit 215c3409eed16c89b6d11ea1126bd9d4f36b9afd
| Author: Andy Whitcroft <apw@shadowen.org>
| Date: Fri Jan 6 00:12:06 2006 -0800
|
| [PATCH] i386 sparsemem for single node systems
in v2.6.15-1003-g215c340. (so this is appears to be an unfixed bug in
v2.6.16 as well)
Ingo
--