[RFC v1 1/8] x86/hyperv: export hv_build_pci_dev_id

From: Wei Liu
Date: Fri Jul 09 2021 - 07:43:47 EST


Signed-off-by: Wei Liu <wei.liu@xxxxxxxxxx>
---
arch/x86/hyperv/irqdomain.c | 3 ++-
arch/x86/include/asm/mshyperv.h | 1 +
2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/arch/x86/hyperv/irqdomain.c b/arch/x86/hyperv/irqdomain.c
index 514fc64e23d5..5ea7a5145ea9 100644
--- a/arch/x86/hyperv/irqdomain.c
+++ b/arch/x86/hyperv/irqdomain.c
@@ -110,7 +110,7 @@ static int get_rid_cb(struct pci_dev *pdev, u16 alias, void *data)
return 0;
}

-static union hv_device_id hv_build_pci_dev_id(struct pci_dev *dev)
+union hv_device_id hv_build_pci_dev_id(struct pci_dev *dev)
{
union hv_device_id dev_id;
struct rid_data data = {
@@ -168,6 +168,7 @@ static union hv_device_id hv_build_pci_dev_id(struct pci_dev *dev)

return dev_id;
}
+EXPORT_SYMBOL_GPL(hv_build_pci_dev_id);

static int hv_map_msi_interrupt(struct pci_dev *dev, int cpu, int vector,
struct hv_interrupt_entry *entry)
diff --git a/arch/x86/include/asm/mshyperv.h b/arch/x86/include/asm/mshyperv.h
index 21edef600729..b8f6b21e1fa5 100644
--- a/arch/x86/include/asm/mshyperv.h
+++ b/arch/x86/include/asm/mshyperv.h
@@ -196,6 +196,7 @@ struct irq_domain *hv_create_pci_msi_domain(void);
int hv_map_ioapic_interrupt(int ioapic_id, bool level, int vcpu, int vector,
struct hv_interrupt_entry *entry);
int hv_unmap_ioapic_interrupt(int ioapic_id, struct hv_interrupt_entry *entry);
+union hv_device_id hv_build_pci_dev_id(struct pci_dev *dev);

#else /* CONFIG_HYPERV */
static inline void hyperv_init(void) {}
--
2.30.2