Re: [RFC] mark Netlogic XLR chip as SMT capable

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

 



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.

  Ralf



[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux