On Mon, Oct 03, 2011 at 11:32:04AM +0100, Ralf Baechle wrote: > On Mon, Oct 03, 2011 at 01:46:46PM +0800, Hillf Danton wrote: > > > + unsigned int cpu, core_id; > > + > > + cpu = smp_processor_id(); > > + core_id = (cpu >> 2) & 0x7; > > + cpu_data[cpu].core = core_id; > > This is going to break in setups where Linux is not being booted on > what the hardware considers CPU core 0. Which is not uncommon in embedded > setups. You may want to probe the hardware for the core ID rather than > relying on smp_processor_id() here. Yes, the function hard_smp_processor_id() from netlogic/mips-extns.h has to be used here. This also conflicts with the recent patch-set for XLP support, but I don't know the status of that yet. JC.