linux-next: manual merge of the pci tree with the origin tree

From: Stephen Rothwell
Date: Wed Oct 21 2020 - 19:46:19 EST


Hi all,

FIXME: Add owner of second tree to To:
Add author(s)/SOB of conflicting commits.

Today's linux-next merge of the pci tree got a conflict in:

drivers/pci/controller/vmd.c

between commit:

585dfe8abc44 ("PCI: vmd: Dont abuse vector irqomain as parent")

from the origin tree and commit:

1552b11ba15e ("PCI: vmd: Create IRQ Domain configuration helper")

from the pci tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging. You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

--
Cheers,
Stephen Rothwell

diff --cc drivers/pci/controller/vmd.c
index aa1b12bac9a1,c8d46bd01e87..000000000000
--- a/drivers/pci/controller/vmd.c
+++ b/drivers/pci/controller/vmd.c
@@@ -298,6 -298,34 +298,34 @@@ static struct msi_domain_info vmd_msi_d
.chip = &vmd_msi_controller,
};

+ static int vmd_create_irq_domain(struct vmd_dev *vmd)
+ {
+ struct fwnode_handle *fn;
+
+ fn = irq_domain_alloc_named_id_fwnode("VMD-MSI", vmd->sysdata.domain);
+ if (!fn)
+ return -ENODEV;
+
+ vmd->irq_domain = pci_msi_create_irq_domain(fn, &vmd_msi_domain_info,
- x86_vector_domain);
++ NULL);
+ if (!vmd->irq_domain) {
+ irq_domain_free_fwnode(fn);
+ return -ENODEV;
+ }
+
+ return 0;
+ }
+
+ static void vmd_remove_irq_domain(struct vmd_dev *vmd)
+ {
+ if (vmd->irq_domain) {
+ struct fwnode_handle *fn = vmd->irq_domain->fwnode;
+
+ irq_domain_remove(vmd->irq_domain);
+ irq_domain_free_fwnode(fn);
+ }
+ }
+
static char __iomem *vmd_cfg_addr(struct vmd_dev *vmd, struct pci_bus *bus,
unsigned int devfn, int reg, int len)
{
@@@ -568,24 -674,10 +674,16 @@@ static int vmd_enable_domain(struct vmd

sd->node = pcibus_to_node(vmd->dev->bus);

- fn = irq_domain_alloc_named_id_fwnode("VMD-MSI", vmd->sysdata.domain);
- if (!fn)
- return -ENODEV;
-
- vmd->irq_domain = pci_msi_create_irq_domain(fn, &vmd_msi_domain_info,
- NULL);
-
- if (!vmd->irq_domain) {
- irq_domain_free_fwnode(fn);
- return -ENODEV;
- }
+ ret = vmd_create_irq_domain(vmd);
+ if (ret)
+ return ret;

+ /*
+ * Override the irq domain bus token so the domain can be distinguished
+ * from a regular PCI/MSI domain.
+ */
+ irq_domain_update_bus_token(vmd->irq_domain, DOMAIN_BUS_VMD_MSI);
+
pci_add_resource(&resources, &vmd->resources[0]);
pci_add_resource_offset(&resources, &vmd->resources[1], offset[0]);
pci_add_resource_offset(&resources, &vmd->resources[2], offset[1]);

Attachment: pgpsA700n1m1j.pgp
Description: OpenPGP digital signature