[SLOF] [PATCH] Remove dependency on cpu/@0 for booting
segher at kernel.crashing.org
Wed Jul 27 18:29:53 AEST 2016
On Wed, Jul 27, 2016 at 12:42:23PM +0530, Nikunj A Dadhania wrote:
> 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 ?
It's a tiny bit slower, but much more importantly, it is harder to read.
Well, in my opinion, anyway. ?DUP works fine here of course, but why
bother, the ABORT will clean the whole stack no matter what.
> >> > 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?
The code tries to find *a* cpu. But the error message says "start-cpu
not found". The code is not looking for a "start-cpu", a user getting
that error message will waste time scratching his head before looking
at the code (if he is lucky enough to do look at the code).
Just say what is *actually* wrong, what did not work ;-)
More information about the SLOF