mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
iommu: move iommu_update_ire_from_msi() to xen/iommu.h
Move iommu_update_ire_from_msi(..) from passthrough/pci.c to xen/iommu.h and wrap it under CONFIG_X86 as it is referenced in x86 code only to avoid compilation error for other architecture when HAS_PCI is enabled. No functional change intended. Signed-off-by: Rahul Singh <rahul.singh@arm.com> Acked-by: Jan Beulich <jbeulich@suse.com>
This commit is contained in:
1 parent
7191b808b0
commit
705f7b55be
2 files changed
+10
-10
No files matched your search
@@ -1303,13 +1303,6 @@ static int __init setup_dump_pcidevs(void)
|
||||
}
|
||||
__initcall(setup_dump_pcidevs);
|
||||
|
||||
int iommu_update_ire_from_msi(
|
||||
struct msi_desc *msi_desc, struct msi_msg *msg)
|
||||
{
|
||||
return iommu_intremap
|
||||
? iommu_call(&iommu_ops, update_ire_from_msi, msi_desc, msg) : 0;
|
||||
}
|
||||
|
||||
static int iommu_add_device(struct pci_dev *pdev)
|
||||
{
|
||||
const struct domain_iommu *hd;
|
||||
|
||||
+10
-3
@@ -187,8 +187,6 @@ void free_hvm_irq_dpci(struct hvm_irq_dpci *dpci);
|
||||
struct msi_desc;
|
||||
struct msi_msg;
|
||||
|
||||
int iommu_update_ire_from_msi(struct msi_desc *msi_desc, struct msi_msg *msg);
|
||||
|
||||
#define PT_IRQ_TIME_OUT MILLISECS(8)
|
||||
#endif /* HAS_PCI */
|
||||
|
||||
@@ -238,7 +236,6 @@ struct iommu_ops {
|
||||
u8 devfn, device_t *dev);
|
||||
#ifdef CONFIG_HAS_PCI
|
||||
int (*get_device_group_id)(u16 seg, u8 bus, u8 devfn);
|
||||
int (*update_ire_from_msi)(struct msi_desc *msi_desc, struct msi_msg *msg);
|
||||
#endif /* HAS_PCI */
|
||||
|
||||
void (*teardown)(struct domain *d);
|
||||
@@ -267,6 +264,7 @@ struct iommu_ops {
|
||||
int (*adjust_irq_affinities)(void);
|
||||
void (*sync_cache)(const void *addr, unsigned int size);
|
||||
void (*clear_root_pgtable)(struct domain *d);
|
||||
int (*update_ire_from_msi)(struct msi_desc *msi_desc, struct msi_msg *msg);
|
||||
#endif /* CONFIG_X86 */
|
||||
|
||||
int __must_check (*suspend)(void);
|
||||
@@ -374,6 +372,15 @@ extern struct page_list_head iommu_pt_cleanup_list;
|
||||
|
||||
bool arch_iommu_use_permitted(const struct domain *d);
|
||||
|
||||
#ifdef CONFIG_X86
|
||||
static inline int iommu_update_ire_from_msi(
|
||||
struct msi_desc *msi_desc, struct msi_msg *msg)
|
||||
{
|
||||
return iommu_intremap
|
||||
? iommu_call(&iommu_ops, update_ire_from_msi, msi_desc, msg) : 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _IOMMU_H_ */
|
||||
|
||||
/*
|
||||
|
||||