[OpenBIOS] [PATCH v3 3/5] Pretty-print reg property
Andreas Färber
andreas.faerber at web.de
Thu Nov 11 22:51:31 CET 2010
Am 06.11.2010 um 03:39 schrieb Segher Boessenkool:
>>>> +\ HELPER: get #size-cells value (from parent)
>>>> +\ Legal values are 1..4 (we may optionally support larger sizes)
>>>> +: my-#scells ( -- #size-cells )
>>>> + my-self ?dup if >in.device-node @ else active-package then
>>>> + ?dup if >dn.parent @ then
>>>> + ?dup if
>>>> + " #size-cells" rot get-package-property if 1 exit then
>>
>>>> + \ we don't have to support more than 4 (and 0 is illegal)
>>>> + decode-int nip nip 4 min 1 max
>>
>> This seems wrong: 0 appears be a valid #size-cells value for
>> device_type cpu.
>
> It is valid. Why are you bounding the value here at all?
Segher, thinking more about your question, are you referring to what
became in v4 "0 max" (arguments are signed so this should still rule
out -1, no?) or the general concept of limiting the value range here?
I am planning to apply the series tomorrow unless I hear a strong
objection. Optimizations could still be applied later.
Andreas
More information about the OpenBIOS
mailing list