Node 0 not necessary for powerpc?

Nishanth Aravamudan nacc at linux.vnet.ibm.com
Fri Jun 20 03:40:47 EST 2014


On 19.06.2014 [10:59:50 -0400], Tejun Heo wrote:
> On Tue, Jun 10, 2014 at 04:31:57PM -0700, Nishanth Aravamudan wrote:
> > > I think what this really wants to do is NODE_DATA(cpu_to_mem(cpu)) and I 
> > > thought ppc had the cpu-to-local-memory-node mappings correct?
> > 
> > Except cpu_to_mem relies on the mapping being defined, but early in
> > boot, specifically, it isn't yet (at least not necessarily).
> 
> Can't ppc NODE_DATA simply return dummy generic node_data during early
> boot?  Populating it with just enough to make early boot work
> shouldn't be too hard, right?

So the problem is this, whether we use cpu_to_mem() or cpu_to_node()
here, neither is setup yet because of the ordering between percpu setup
and the actual writing of the percpu data (that is actually storing what
node/local memory is relative to a given CPU).

The NODE_DATA is all correct, but since we are calling cpu_to_{mem,node}
before it really holds valid data, it falsely says 0, which is not
necessarily even an online node.

So, I think we need to do the same thing as x86 and have an early
mapping setup and configured before the percpu areas are.

Thanks,
Nish



More information about the Linuxppc-dev mailing list