Re: [PATCH] i386 !NUMA node_to_cpumask broken in early boot

From: Zwane Mwaikambo
Date: Thu Aug 18 2005 - 22:21:39 EST


On Fri, 19 Aug 2005, Andi Kleen wrote:

> > Thanks for the feedback, ugly indeed, i was really trying to avoid adding
> > a new API function or extra cpu_* variables. Ok, here is an
> > early_node_to_cpumask instead.
>
> Thinking about it again it's most likely broken with CPU hotplug anyways
> whatever you're doing. So how does your code handle adding new
> CPUs? If it does can the normal CPU bootup be handled in the
> same way. Then this wouldn't be needed at all.

The code is populating IDTs before APs are online, so for a given set of
processors i would want to install new IDT entries like so;

node_set_intr_gate()
{
cpumask_t mask = node_to_cpumask(node);
for_each_cpu_mask(cpu, mask)
set_intr_gate(per_cpu_ptr(cpu_idt_table, cpu)....
....
}

Which before resulted in only setting the IDT entry for the BSP.

During boot, i prepare all processor IDTs so they are always
ready for processors coming online and should take care of hotplug cpu
too. The only problem with normal bootup is that the node_to_cpumask is
unreliable.

Zwane

-
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/