Kernel KVM virtualization development
 help / color / mirror / Atom feed
* [PATCH 1/4] kvm: qemu: Remove the useless parameter of assigned_dev_update_irq
@ 2008-12-10  9:44 Han, Weidong
  2008-12-10 10:11 ` Mark McLoughlin
  0 siblings, 1 reply; 3+ messages in thread
From: Han, Weidong @ 2008-12-10  9:44 UTC (permalink / raw)
  To: 'Avi Kivity'; +Cc: kvm@vger.kernel.org

[-- Attachment #1: Type: text/plain, Size: 1775 bytes --]

Should pass &assigned_dev->dev to ipf_map_irq in while loop.

Signed-off-by: Weidong Han <weidong.han@intel.com>
---
 qemu/hw/device-assignment.c |    4 ++--
 qemu/hw/pci.c               |    4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/qemu/hw/device-assignment.c b/qemu/hw/device-assignment.c
index 4a38a22..7240158 100644
--- a/qemu/hw/device-assignment.c
+++ b/qemu/hw/device-assignment.c
@@ -491,7 +491,7 @@ static uint32_t calc_assigned_dev_id(uint8_t bus, uint8_t devfn)
 /* The pci config space got updated. Check if irq numbers have changed
  * for our devices
  */
-void assigned_dev_update_irq(PCIDevice *d)
+void assigned_dev_update_irq()
 {
     AssignedDevInfo *adev;
 
@@ -505,7 +505,7 @@ void assigned_dev_update_irq(PCIDevice *d)
         irq = piix_get_irq(irq);
 
 #ifdef TARGET_IA64
-	irq = ipf_map_irq(d, irq);
+	irq = ipf_map_irq(&assigned_dev->dev, irq);
 #endif
 
         if (irq != assigned_dev->girq) {
diff --git a/qemu/hw/pci.c b/qemu/hw/pci.c
index c93758d..d777794 100644
--- a/qemu/hw/pci.c
+++ b/qemu/hw/pci.c
@@ -51,7 +51,7 @@ struct PCIBus {
 
 static void pci_update_mappings(PCIDevice *d);
 static void pci_set_irq(void *opaque, int irq_num, int level);
-void assigned_dev_update_irq(PCIDevice *d);
+void assigned_dev_update_irq(void);
 
 target_phys_addr_t pci_mem_base;
 static int pci_irq_index;
@@ -459,7 +459,7 @@ void pci_default_write_config(PCIDevice *d,
     if (kvm_enabled() && qemu_kvm_irqchip_in_kernel() &&
         address >= PIIX_CONFIG_IRQ_ROUTE &&
 	address < PIIX_CONFIG_IRQ_ROUTE + 4)
-        assigned_dev_update_irq(d);
+        assigned_dev_update_irq();
 #endif /* USE_KVM_DEVICE_ASSIGNMENT */
 
     end = address + len;
-- 
1.6.0.4

[-- Attachment #2: 0001-Remove-the-useless-parameter-of-assigned_dev_update_.patch --]
[-- Type: application/octet-stream, Size: 1947 bytes --]

From 90b73b745335ba05be5b53411ebbaa0a97334429 Mon Sep 17 00:00:00 2001
From: Weidong Han <weidong.han@intel.com>
Date: Wed, 10 Dec 2008 15:12:34 +0800
Subject: [PATCH] Remove the useless parameter of assigned_dev_update_irq

Should pass &assigned_dev->dev to ipf_map_irq in while loop.

Signed-off-by: Weidong Han <weidong.han@intel.com>
---
 qemu/hw/device-assignment.c |    4 ++--
 qemu/hw/pci.c               |    4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/qemu/hw/device-assignment.c b/qemu/hw/device-assignment.c
index 4a38a22..7240158 100644
--- a/qemu/hw/device-assignment.c
+++ b/qemu/hw/device-assignment.c
@@ -491,7 +491,7 @@ static uint32_t calc_assigned_dev_id(uint8_t bus, uint8_t devfn)
 /* The pci config space got updated. Check if irq numbers have changed
  * for our devices
  */
-void assigned_dev_update_irq(PCIDevice *d)
+void assigned_dev_update_irq()
 {
     AssignedDevInfo *adev;
 
@@ -505,7 +505,7 @@ void assigned_dev_update_irq(PCIDevice *d)
         irq = piix_get_irq(irq);
 
 #ifdef TARGET_IA64
-	irq = ipf_map_irq(d, irq);
+	irq = ipf_map_irq(&assigned_dev->dev, irq);
 #endif
 
         if (irq != assigned_dev->girq) {
diff --git a/qemu/hw/pci.c b/qemu/hw/pci.c
index c93758d..d777794 100644
--- a/qemu/hw/pci.c
+++ b/qemu/hw/pci.c
@@ -51,7 +51,7 @@ struct PCIBus {
 
 static void pci_update_mappings(PCIDevice *d);
 static void pci_set_irq(void *opaque, int irq_num, int level);
-void assigned_dev_update_irq(PCIDevice *d);
+void assigned_dev_update_irq(void);
 
 target_phys_addr_t pci_mem_base;
 static int pci_irq_index;
@@ -459,7 +459,7 @@ void pci_default_write_config(PCIDevice *d,
     if (kvm_enabled() && qemu_kvm_irqchip_in_kernel() &&
         address >= PIIX_CONFIG_IRQ_ROUTE &&
 	address < PIIX_CONFIG_IRQ_ROUTE + 4)
-        assigned_dev_update_irq(d);
+        assigned_dev_update_irq();
 #endif /* USE_KVM_DEVICE_ASSIGNMENT */
 
     end = address + len;
-- 
1.6.0.4


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-12-10 10:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-10  9:44 [PATCH 1/4] kvm: qemu: Remove the useless parameter of assigned_dev_update_irq Han, Weidong
2008-12-10 10:11 ` Mark McLoughlin
2008-12-10 10:21   ` Han, Weidong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox