[PATCH 6/10] ppc64: Create a fake flat device tree on iSeries

Milton Miller miltonm at bga.com
Wed Aug 10 17:16:15 EST 2005


1) These funtions would seem to be infrastucture, do they belong in
iSeries_setup?   I note that they are not declared static.

2) checking the blob afterwards is likely buggy because if we add
more than 4 bytes, we will overwrite the next pointer and inc the
data therein before we realize that we overwrote the  pointer.
	a) move pointer before blob data
	b) move check before set, and pass size to check
	c) see #6

3) dt_prop is not checking if the property name already exists,
wasting string space.  While this may not be an issue in small usage
so far, there are obviously replacated strings (cpu propertys, but
also things like "name").

4) While the blob size is arbitaray, a structure PAGE_SIZE + u64
is a bit odd.  In fact if we swtich to only saving the string table
it makes it take 2 pages instead of one.

5) If you are going to statically allocate this for iSeries (as
opossed to say a klimit bump), then the only thing in dynamic is
setting the boot cpuid.  May as well use a static initializer.

Today this would add over 2 pages of bss for a "combined" kernel.

6) I suggest using propnum from fs2dt.c for #3 and open coding the
checks for overflow against the device tree fields.  Putting the
device data at klimit would allow the checks for overflow to be
deferred until after its created (look for 2 nuls in string table
-- the size is propnum(""), and placing data at after the reserve
map and string table and either compare to total size or set
totalsize according to what is used).




More information about the Linuxppc64-dev mailing list