diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2009-03-09 10:06:28 -0600 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2009-03-09 10:06:29 +1030 |
commit | 6db6a5f3ae2ca6b874b0fd97ae16fdc9b5cdd6cc (patch) | |
tree | 567ab7d3593f6ab63fecfb8c9797fb4efda67ea7 /drivers/lguest/lguest_device.c | |
parent | cbd88c8e6f5cdb8d4b9af01df825305200240382 (diff) | |
download | talos-obmc-linux-6db6a5f3ae2ca6b874b0fd97ae16fdc9b5cdd6cc.tar.gz talos-obmc-linux-6db6a5f3ae2ca6b874b0fd97ae16fdc9b5cdd6cc.zip |
lguest: fix for CONFIG_SPARSE_IRQ=y
Impact: remove lots of lguest boot WARN_ON() when CONFIG_SPARSE_IRQ=y
We now need to call irq_to_desc_alloc_cpu() before
set_irq_chip_and_handler_name(), but we can't do that from init_IRQ (no
kmalloc available).
So do it as we use interrupts instead. Also means we only alloc for
irqs we use, which was the intent of CONFIG_SPARSE_IRQ anyway.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Cc: Ingo Molnar <mingo@redhat.com>
Diffstat (limited to 'drivers/lguest/lguest_device.c')
-rw-r--r-- | drivers/lguest/lguest_device.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/lguest/lguest_device.c b/drivers/lguest/lguest_device.c index b4d44e571d76..8132533d71f9 100644 --- a/drivers/lguest/lguest_device.c +++ b/drivers/lguest/lguest_device.c @@ -212,6 +212,9 @@ static void lg_notify(struct virtqueue *vq) hcall(LHCALL_NOTIFY, lvq->config.pfn << PAGE_SHIFT, 0, 0); } +/* An extern declaration inside a C file is bad form. Don't do it. */ +extern void lguest_setup_irq(unsigned int irq); + /* This routine finds the first virtqueue described in the configuration of * this device and sets it up. * @@ -266,6 +269,9 @@ static struct virtqueue *lg_find_vq(struct virtio_device *vdev, goto unmap; } + /* Make sure the interrupt is allocated. */ + lguest_setup_irq(lvq->config.irq); + /* Tell the interrupt for this virtqueue to go to the virtio_ring * interrupt handler. */ /* FIXME: We used to have a flag for the Host to tell us we could use |