(sent to the kvm list erroneously)
--- Begin Message ---
- To: kvm@xxxxxxxxxxxxxxx
- Subject: [PATCH]: Fix silly output for virtio devices in /proc/interrupts
- From: Chris Lalancette <clalance@xxxxxxxxxx>
- Date: Wed, 21 May 2008 14:51:45 +0200
- User-agent: Thunderbird 2.0.0.14 (X11/20080501)
register_virtio_device() is doing something silly by overwriting what the caller
put into .bus_id. This causes the interrupt line for all virtio devices to show
up as "0", "1", etc. in /proc/interrupts. The attached patch fixes it.
Signed-off-by: Chris Lalancette <clalance@xxxxxxxxxx>
commit cb97605728fc1d7a15ddc6ab689e8bcd23871133
Author: Chris Lalancette <clalance@xxxxxxxxxx>
Date: Thu May 15 09:04:55 2008 -0400
register_virtio_device was doing something silly, in that it was overwriting
what the calling driver stuck into .bus_id" for the name. This caused
problems in the output of /proc/interrupts, since when you request_irq(),
it doesn't actually copy the devname you pass in but just stores a pointer
to the data. The fix is to just not have register_virtio_device do anything
with the bus_id, and assume the higher level driver set it up properly.
diff --git a/drivers/virtio/virtio.c b/drivers/virtio/virtio.c
index 138a7f0..1556ac2 100644
--- a/drivers/virtio/virtio.c
+++ b/drivers/virtio/virtio.c
@@ -128,7 +128,6 @@ int register_virtio_device(struct virtio_device *dev)
int err;
dev->dev.bus = &virtio_bus;
- sprintf(dev->dev.bus_id, "%u", dev->index);
/* We always start by resetting the device, in case a previous
* driver messed it up. This also tests that code path a little. */
--- End Message ---
_______________________________________________
Virtualization mailing list
Virtualization@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linux-foundation.org/mailman/listinfo/virtualization