Re: Sun4d boot crash in sun4d_init_timers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, May 24, 2011 at 01:05:14AM +0200, Josip Rodin wrote:
> +	board = of_getintprop_default(dp, "board#", 0);
> +	if (!board) {

> Passing around the 'board' property of 'cpu-unit' looks like it should be done
> because the same thing is used to seed board_to_cpu[].
> 
> http://git.kernel.org/?p=linux/kernel/git/davem/prtconfs.git;a=blob;f=ss1000;h=f420dc005d6939b837134d146741316c024d5932;hb=HEAD
> says both cpu-units have the same, zeroth board, but it might not hurt
> to check just in case some other machine happens to use a different index.

In fact it looks like 0 is a common valid value in the analogous pieces of
code that don't even verify the result of that lookup. The above code should
either not check that lookup either (the simple solution), or set the
default to -1 so that it can actually discern error state.

-- 
     2. That which causes joy or happiness.
--
To unsubscribe from this list: send the line "unsubscribe sparclinux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Kernel Development]     [DCCP]     [Linux ARM Development]     [Linux]     [Photo]     [Yosemite Help]     [Linux ARM Kernel]     [Linux SCSI]     [Linux x86_64]     [Linux Hams]

  Powered by Linux