[RFC PATCH powerpc] Fix compiling error in powernv/rng.c

Li Zhong zhong at linux.vnet.ibm.com
Tue Nov 19 20:24:19 EST 2013


On Tue, 2013-11-19 at 15:04 +1100, Michael Ellerman wrote:
> On Fri, Nov 15, 2013 at 03:36:04PM +0800, Li Zhong wrote:
> > This is seen when CONFIG_SMP is not enabled:
> > 
> > arch/powerpc/platforms/powernv/rng.c: In function 'rng_init_per_cpu':
> > arch/powerpc/platforms/powernv/rng.c:74: error: implicit declaration of function 'cpu_to_chip_id'
> 
> Hi Li,
> 
> We try whenever possible to avoid adding #ifdefs in C code.
> 
> Also on a multi chip system where there are multiple RNGs, your code for
> UP will not necessarily choose the RNG on the same core as the cpu.

OK, thank you for the review, Michael.

Just try to make sure I understand it: 

So even in UP, we could have multiple rng sources, and we should try to
use the source which has the same chip_id as the logical cpu?

Thanks, Zhong

> I have a different fix that I will send.
> 
> cheers
> 




More information about the Linuxppc-dev mailing list