[SLOF] [PATCH] Remove dependency on cpu/@0 for booting
Nikunj A Dadhania
nikunj at linux.vnet.ibm.com
Wed Jul 27 17:12:23 AEST 2016
Segher Boessenkool <segher at kernel.crashing.org> writes:
> On Wed, Jul 27, 2016 at 12:06:06PM +0530, Nikunj A Dadhania wrote:
>> Segher Boessenkool <segher at kernel.crashing.org> writes:
>>
>> > On Wed, Jul 27, 2016 at 09:47:47AM +0530, Nikunj A Dadhania wrote:
>> >> \ Fixup timebase frequency from device-tree
>> >> : fixup-tbfreq
>> >> - " /cpus/@0" find-device
>> >> + " /cpus" find-device
>> >> + get-node child ?dup 0= IF ABORT" start-cpu not found" THEN
>> >> + set-node
>> >
>> > ABORT" has an IF built in. It also empties the stack, so this is just
>> >
>> > get-node child dup 0= ABORT" start-cpu not found"
>>
>> Sure.
i understood the IF part, but why not ?dup ?
> Well, the original code is incorrect: if there happens to be a zero next
> on stack, it will not abort, and your stack is unbalanced. Whoops.
" /cpus" find-device ( )
get-node ( node )
child ( 0 | child-node )
?dup ( 0 | child-node child-node )
0= ABORT" start-cpu not found " ( child-node )
set-node
>
>> > What guarantees this finds the "start-cpu"?
>>
>> QEMU does not allow to remove last CPU.
>
> But that is not the same thing?
Dont get you, can you please elaborate?
Regards
Nikunj
More information about the SLOF
mailing list