Messages in this thread | | | Date | Sat, 18 Jan 2003 21:32:22 -0500 (EST) | From | Zwane Mwaikambo <> | Subject | Re: 48GB NUMA-Q boots, with major IO-APIC hassles |
| |
On Sat, 18 Jan 2003, William Lee Irwin III wrote:
> + > +int vector_to_irq[MAX_NUMNODES][FIRST_SYSTEM_VECTOR - FIRST_DEVICE_VECTOR + 1]; > +int apic_pin_to_irq[MAX_IO_APICS][24]; > + > +/* > + * timer vectors must always go to 0 > + * vectors < FIRST_DEVICE_VECTOR are 1:1 > + * everything else goes through the table > + */
Careful.
NR Log Phy Mask Trig IRR Pol Stat Dest Deli Vect: 00 001 01 0 0 0 0 0 1 1 31 01 001 01 0 0 0 0 0 1 1 39 02 000 00 1 0 0 0 0 0 0 00 03 001 01 0 0 0 0 0 1 1 41 04 001 01 0 0 0 0 0 1 1 49 05 001 01 0 0 0 0 0 1 1 51 06 001 01 0 0 0 0 0 1 1 59 07 001 01 0 0 0 0 0 1 1 61
> +int irq_of_vector(int vector) > +{ > + int irq; > + if (vector < FIRST_DEVICE_VECTOR) > + irq = vector; > + else > + irq = vector_to_irq[numa_node_id()][vector-FIRST_DEVICE_VECTOR]; > + return irq; > +}
Same as above.
> +static int __init assign_irq_vector(int irq) > +{ > + static int current_vector = FIRST_DEVICE_VECTOR+1; > + if (!irq) > + return FIRST_DEVICE_VECTOR; > + else if (!irq_vector[irq]) { > + irq_vector[irq] = current_vector; > + current_vector = next_irq_vector(current_vector); > + } > + return irq_vector[irq]; > +}
You'll drop irqs when you have collisions with devices attached to other busses/ioapics
> +#define init_vector_to_irq() do {} while (0) > +#define set_irq_of_vector(a,v,i) do {} while (0) > +#define set_irq_of_pin(a,v,i) do {} while (0) > + > +int irq_of_vector(int vector) { return vector; }
This would need major warnings not to use on non NUMAQ since that information is relevant on Walmart SMP.
> +#ifdef CONFIG_X86_NUMAQ > + set_intr_gate(vector, interrupt[vector]); > +#else > set_intr_gate(vector, interrupt[irq]); > +#endif
hmm..
> + if (irq < 0) { > + printk("bad vector %ld, irq %d\n", regs.orig_eax & 0xff, irq); > + dump_stack(); > + return 1; > + } > +
Oh my =)
Zwane -- function.linuxpower.ca
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |