Port-i386 archive

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

Re: Interrupt routing patch for testing



On Thu, May 08, 2008 at 11:12:19PM +0200, Joerg Sonnenberger wrote:

>  intr_allocate_slot_cpu(struct cpu_info *ci, struct pic *pic, int pin,
>                      int *index)
>  {
> -     int start, slot, i;
> +     int slot, i;
>       struct intrsource *isp;
>  
> -     start = CPU_IS_PRIMARY(ci) ? NUM_LEGACY_IRQS : 0;
> -     slot = -1;
> +     if (pic == &i8259_pic) {
> +             if (!CPU_IS_PRIMARY(ci))
> +                     return EBUSY;

ENODEV is more accurate. I haven't checked the callers.

FWIW, the locking in intr.c isn't very good. We'll also need to look at
having an IPI or other mechanism like RCU's patent-free predecessor make the
updates safe on a running system.

Andrew


Home | Main Index | Thread Index | Old Index