]> rtime.felk.cvut.cz Git - jailhouse.git/commitdiff
pci: apic: make function non-static
authorHenning Schild <henning.schild@siemens.com>
Mon, 24 Nov 2014 17:54:11 +0000 (18:54 +0100)
committerJan Kiszka <jan.kiszka@siemens.com>
Wed, 26 Nov 2014 18:15:12 +0000 (19:15 +0100)
Make the function pci_translate_msi_vector available for code outside of
arch/x86/pci.c.

Signed-off-by: Henning Schild <henning.schild@siemens.com>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
hypervisor/arch/x86/include/asm/apic.h
hypervisor/arch/x86/pci.c

index 6f36de678398ff546c0f8d7a1fe9c8d1d3fbb3df..89856cdcc0dd5a6ba9c444d571631ed6887f6b5d 100644 (file)
@@ -174,5 +174,9 @@ void x2apic_handle_read(struct registers *guest_regs);
 
 u32 x2apic_filter_logical_dest(struct cell *cell, u32 destination);
 
+struct apic_irq_message
+pci_translate_msi_vector(struct pci_device *device, unsigned int vector,
+                        unsigned int legacy_vectors, union x86_msi_vector msi);
+
 /** @} */
 #endif /* !_JAILHOUSE_ASM_APIC_H */
index e130d737970167f01905878e045da5ade1ca5e9b..7bbf96c7e99ea549faf7bfaac4f62c3fecedd99e 100644 (file)
@@ -241,7 +241,18 @@ static union x86_msi_vector pci_get_x86_msi_vector(struct pci_device *device)
        return msi;
 }
 
-static struct apic_irq_message
+/**
+ * Translate a given MSI vector into an IRQ message that can be sent to one
+ * or more APICs. (see apic_send_irq())
+ * @param device               Pointer to the pci device structure
+ * @param vector               interrupt vector number
+ * @param legacy_vectors       number of enabled MSI vectors of device
+ *                             see pci_enabled_msi_vectors()
+ * @param msi                  msi vector that should be translated
+ *
+ * @return an IRQ messages data structure
+ */
+struct apic_irq_message
 pci_translate_msi_vector(struct pci_device *device, unsigned int vector,
                         unsigned int legacy_vectors, union x86_msi_vector msi)
 {