Re: [GIT PULL] x86/apic changes for v2.6.38

From: Tony Luck
Date: Thu Jan 06 2011 - 19:32:48 EST


On Thu, Jan 6, 2011 at 4:17 PM, Yinghai Lu <yinghai@xxxxxxxxxx> wrote:
> looks ia64 is using struct array with cpu idx for mapping
>
>        node_cpuid[srat_num_cpus].phys_id =
>            (pa->apic_id << 8) | (pa->local_sapic_eid);
>        /* nid should be overridden as logical node id later */
>        node_cpuid[srat_num_cpus].nid = pxm;
>        cpu_set(srat_num_cpus, early_cpu_possible_map);
>        srat_num_cpus++;

Good point.

> +       if (srat_num_cpus >= NR_CPUS) {
> +               printk(KERN_WARNING "NR_CPUS (%d) is too small, not all cpus used.
> %d\n", NR_CPUS);
> +               return;
> +       }
> +

Looks ok - but printk_once() might be better so we don't flood the console
if someone tries running an NR_CPUS=16 kernel on a monster SGI machine.

-Tony
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/