/* Return the number of cores on this SOC.  */
int cpu_numcores(void)
/* Return the number of cores on this SOC.  */
int cpu_numcores(void)
{
	int numcores;
	u32 mask;
	mask = cpu_mask();
	numcores = hweight32(cpu_mask());
	if (mask & 0x1)
		numcores--;
	return numcores;
}