On Fri, 2007-09-14 at 09:44 +0200, Andi Kleen wrote:
> On Fri, Sep 14, 2007 at 03:14:09PM +1000, Rusty Russell wrote:
> > This simplifies the io_apic.c __assign_irq_vector() logic and removes
> > the explicit SYSCALL_VECTOR check, and also allows for vectors to be
> > reserved by other mechanisms (ie. lguest).
> 
> Seems reasonable even as a cleanup.
> 
> >  
> >  int panic_on_unrecovered_nmi;
> > +
> > +DECLARE_BITMAP(used_vectors, NR_VECTORS);
> > +EXPORT_SYMBOL_GPL(used_vectors);
> 
> But what is the export good for? Since it's only used at boot
> a module cannot do anything useful with it.

Hmm, maybe I misunderstood.  I assumed that create_irq() was also called
later to get irqs for any devices which appeared later.  Although I can
at least check it's not in use.

The current lguest patch uses it like so (syscall_vector is a module
parameter):

int init_interrupts(void)
{
        /* If they want some strange system call vector, reserve it now */
        if (syscall_vector != SYSCALL_VECTOR
            && test_and_set_bit(syscall_vector, used_vectors)) {
                printk("lg: couldn't reserve syscall %u\n", syscall_vector);
                return -EBUSY;
        }
        return 0;
}

Thanks,
Rusty.


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

Reply via email to