Skip to contentSkip to conversation

linux-next: build failure after merge of the pci tree

DISCUSSION Applied Stephen Rothwell 5 participants 8 messages Jan 31, 2018 – Feb 1, 2018

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Hi Bjorn,

After merging the pci tree, today's linux-next build (arm multi_v7_defconfig) failed like this:

drivers/pci/dwc/pcie-designware-ep.c: In function 'dw_pcie_ep_raise_msi_irq':
drivers/pci/dwc/pcie-designware-ep.c:293:8: error: too few arguments to function 'dw_pcie_ep_map_addr'
ret = dw_pcie_ep_map_addr(epc, ep->msi_mem_phys, msg_addr,

        ^~~~~~~~~~~~~~~~~~~
drivers/pci/dwc/pcie-designware-ep.c:177:12: note: declared here
 static int dw_pcie_ep_map_addr(struct pci_epc *epc, u8 func_no,
            ^~~~~~~~~~~~~~~~~~~

drivers/pci/dwc/pcie-designware-ep.c:300:2: error: too few arguments to function 'dw_pcie_ep_unmap_addr'
dw_pcie_ep_unmap_addr(epc, ep->msi_mem_phys);
^~~~~~~~~~~~~~~~~~~~~
drivers/pci/dwc/pcie-designware-ep.c:161:13: note: declared here
static void dw_pcie_ep_unmap_addr(struct pci_epc *epc, u8 func_no,

             ^~~~~~~~~~~~~~~~~~~~~

Caused by commit

4494738de0d9 ("PCI: endpoint: Add the function number as argument to EPC ops")

interacting with commit

6f6d7873711c ("PCI: designware-ep: Add generic function for raising MSI irq")

This should have been fixed up in commit

26b259ab4fe8 ("Merge remote-tracking branch 'lorenzo/pci/dwc' into next")

I have used the pci tree from next-20180131 for today.

Signature · 2 lines
Cheers,
Stephen Rothwell
#1 lore raw
Quoted 25 lines · Stephen Rothwell

Hi Bjorn,

After merging the pci tree, today's linux-next build (arm multi_v7_defconfig) failed like this:

drivers/pci/dwc/pcie-designware-ep.c: In function 'dw_pcie_ep_raise_msi_irq':
drivers/pci/dwc/pcie-designware-ep.c:293:8: error: too few arguments to function 'dw_pcie_ep_map_addr'
ret = dw_pcie_ep_map_addr(epc, ep->msi_mem_phys, msg_addr,

        ^~~~~~~~~~~~~~~~~~~
drivers/pci/dwc/pcie-designware-ep.c:177:12: note: declared here
 static int dw_pcie_ep_map_addr(struct pci_epc *epc, u8 func_no,
            ^~~~~~~~~~~~~~~~~~~

drivers/pci/dwc/pcie-designware-ep.c:300:2: error: too few arguments to function 'dw_pcie_ep_unmap_addr'
dw_pcie_ep_unmap_addr(epc, ep->msi_mem_phys);
^~~~~~~~~~~~~~~~~~~~~
drivers/pci/dwc/pcie-designware-ep.c:161:13: note: declared here
static void dw_pcie_ep_unmap_addr(struct pci_epc *epc, u8 func_no,

             ^~~~~~~~~~~~~~~~~~~~~

Caused by commit

4494738de0d9 ("PCI: endpoint: Add the function number as argument to EPC ops")

interacting with commit

Quoted 7 lines

6f6d7873711c ("PCI: designware-ep: Add generic function for raising MSI irq")

This should have been fixed up in commit

26b259ab4fe8 ("Merge remote-tracking branch 'lorenzo/pci/dwc' into next")

I have used the pci tree from next-20180131 for today.

Hello,

A suggested merge resolution included as an attachment.

Regards,
Niklas

drivers/pci/dwc/pci-dra7xx.c +1 -1
index 39e4a9744863..ed8558d638e5 100644
@@ -368,7 +368,7 @@ static void dra7xx_pcie_raise_msi_irq(struct dra7xx_pcie *dra7xx,
 	dra7xx_pcie_writel(dra7xx, PCIECTRL_TI_CONF_MSI_XMT, reg);
 }
 
-static int dra7xx_pcie_raise_irq(struct dw_pcie_ep *ep,
+static int dra7xx_pcie_raise_irq(struct dw_pcie_ep *ep, u8 func_no,
 				 enum pci_epc_irq_type type, u8 interrupt_num)
 {
 	struct dw_pcie *pci = to_dw_pcie_from_ep(ep);
drivers/pci/dwc/pcie-artpec6.c +2 -2
index 34ae163603ee..93b3df9ed1b5 100644
@@ -445,7 +445,7 @@ static void artpec6_pcie_ep_init(struct dw_pcie_ep *ep)
 		dw_pcie_ep_reset_bar(pci, bar);
 }
 
-static int artpec6_pcie_raise_irq(struct dw_pcie_ep *ep,
+static int artpec6_pcie_raise_irq(struct dw_pcie_ep *ep, u8 func_no,
 				  enum pci_epc_irq_type type, u8 interrupt_num)
 {
 	struct dw_pcie *pci = to_dw_pcie_from_ep(ep);
@@ -455,7 +455,7 @@ static int artpec6_pcie_raise_irq(struct dw_pcie_ep *ep,
 		dev_err(pci->dev, "EP cannot trigger legacy IRQs\n");
 		return -EINVAL;
 	case PCI_EPC_IRQ_MSI:
-		return dw_pcie_ep_raise_msi_irq(ep, interrupt_num);
+		return dw_pcie_ep_raise_msi_irq(ep, func_no, interrupt_num);
 	default:
 		dev_err(pci->dev, "UNKNOWN IRQ type\n");
 	}
drivers/pci/dwc/pcie-designware-ep.c +4 -4
index c0395e1f470a..3a6feeff5f5b 100644
@@ -229,7 +229,7 @@ static int dw_pcie_ep_raise_irq(struct pci_epc *epc, u8 func_no,
 	if (!ep->ops->raise_irq)
 		return -EINVAL;
 
-	return ep->ops->raise_irq(ep, type, interrupt_num);
+	return ep->ops->raise_irq(ep, func_no, type, interrupt_num);
 }
 
 static void dw_pcie_ep_stop(struct pci_epc *epc)
@@ -267,7 +267,7 @@ static const struct pci_epc_ops epc_ops = {
 	.stop			= dw_pcie_ep_stop,
 };
 
-int dw_pcie_ep_raise_msi_irq(struct dw_pcie_ep *ep,
+int dw_pcie_ep_raise_msi_irq(struct dw_pcie_ep *ep, u8 func_no,
 			     u8 interrupt_num)
 {
 	struct dw_pcie *pci = to_dw_pcie_from_ep(ep);
@@ -290,14 +290,14 @@ int dw_pcie_ep_raise_msi_irq(struct dw_pcie_ep *ep,
 		msg_data = dw_pcie_readw_dbi(pci, MSI_MESSAGE_DATA_32);
 	}
 	msg_addr = ((u64) msg_addr_upper) << 32 | msg_addr_lower;
-	ret = dw_pcie_ep_map_addr(epc, ep->msi_mem_phys, msg_addr,
+	ret = dw_pcie_ep_map_addr(epc, func_no, ep->msi_mem_phys, msg_addr,
 				  epc->mem->page_size);
 	if (ret)
 		return ret;
 
 	writel(msg_data | (interrupt_num - 1), ep->msi_mem);
 
-	dw_pcie_ep_unmap_addr(epc, ep->msi_mem_phys);
+	dw_pcie_ep_unmap_addr(epc, func_no, ep->msi_mem_phys);
 
 	return 0;
 }
drivers/pci/dwc/pcie-designware.h +5 -4
index 7e52119f0e96..11b13864a406 100644
@@ -186,8 +186,8 @@ enum dw_pcie_as_type {
 
 struct dw_pcie_ep_ops {
 	void	(*ep_init)(struct dw_pcie_ep *ep);
-	int	(*raise_irq)(struct dw_pcie_ep *ep, enum pci_epc_irq_type type,
-			     u8 interrupt_num);
+	int	(*raise_irq)(struct dw_pcie_ep *ep, u8 func_no,
+			     enum pci_epc_irq_type type, u8 interrupt_num);
 };
 
 struct dw_pcie_ep {
@@ -342,7 +342,8 @@ static inline int dw_pcie_host_init(struct pcie_port *pp)
 void dw_pcie_ep_linkup(struct dw_pcie_ep *ep);
 int dw_pcie_ep_init(struct dw_pcie_ep *ep);
 void dw_pcie_ep_exit(struct dw_pcie_ep *ep);
-int dw_pcie_ep_raise_msi_irq(struct dw_pcie_ep *ep, u8 interrupt_num);
+int dw_pcie_ep_raise_msi_irq(struct dw_pcie_ep *ep, u8 func_no,
+			     u8 interrupt_num);
 void dw_pcie_ep_reset_bar(struct dw_pcie *pci, enum pci_barno bar);
 #else
 static inline void dw_pcie_ep_linkup(struct dw_pcie_ep *ep)
@@ -358,7 +359,7 @@ static inline void dw_pcie_ep_exit(struct dw_pcie_ep *ep)
 {
 }
 
-static inline int dw_pcie_ep_raise_msi_irq(struct dw_pcie_ep *ep,
+static inline int dw_pcie_ep_raise_msi_irq(struct dw_pcie_ep *ep, u8 func_no,
 					   u8 interrupt_num)
 {
 	return 0;
#2 lore raw
Quoted 30 lines · Niklas Cassel
Quoted 29 lines · Stephen Rothwell

Hi Bjorn,

After merging the pci tree, today's linux-next build (arm multi_v7_defconfig) failed like this:

drivers/pci/dwc/pcie-designware-ep.c: In function 'dw_pcie_ep_raise_msi_irq':
drivers/pci/dwc/pcie-designware-ep.c:293:8: error: too few arguments to function 'dw_pcie_ep_map_addr'
ret = dw_pcie_ep_map_addr(epc, ep->msi_mem_phys, msg_addr,

        ^~~~~~~~~~~~~~~~~~~
drivers/pci/dwc/pcie-designware-ep.c:177:12: note: declared here
 static int dw_pcie_ep_map_addr(struct pci_epc *epc, u8 func_no,
            ^~~~~~~~~~~~~~~~~~~

drivers/pci/dwc/pcie-designware-ep.c:300:2: error: too few arguments to function 'dw_pcie_ep_unmap_addr'
dw_pcie_ep_unmap_addr(epc, ep->msi_mem_phys);
^~~~~~~~~~~~~~~~~~~~~
drivers/pci/dwc/pcie-designware-ep.c:161:13: note: declared here
static void dw_pcie_ep_unmap_addr(struct pci_epc *epc, u8 func_no,

             ^~~~~~~~~~~~~~~~~~~~~

Caused by commit

4494738de0d9 ("PCI: endpoint: Add the function number as argument to EPC ops")

interacting with commit

6f6d7873711c ("PCI: designware-ep: Add generic function for raising MSI irq")

This should have been fixed up in commit

Quoted 7 lines
Quoted 3 lines

26b259ab4fe8 ("Merge remote-tracking branch 'lorenzo/pci/dwc' into next")

I have used the pci tree from next-20180131 for today.

Hello,

A suggested merge resolution included as an attachment.

The resolution is OK to me - we have not spotted it since PCI_ENDPOINT is being turned on in the config file in question only in -next, it is not on by default in current mainline, apologies.

Lorenzo

#3 lore raw
Quoted 37 lines · Lorenzo Pieralisi
Quoted 36 lines · Niklas Cassel
Quoted 25 lines · Stephen Rothwell

Hi Bjorn,

After merging the pci tree, today's linux-next build (arm multi_v7_defconfig) failed like this:

drivers/pci/dwc/pcie-designware-ep.c: In function 'dw_pcie_ep_raise_msi_irq':
drivers/pci/dwc/pcie-designware-ep.c:293:8: error: too few arguments to function 'dw_pcie_ep_map_addr'
ret = dw_pcie_ep_map_addr(epc, ep->msi_mem_phys, msg_addr,

        ^~~~~~~~~~~~~~~~~~~
drivers/pci/dwc/pcie-designware-ep.c:177:12: note: declared here
 static int dw_pcie_ep_map_addr(struct pci_epc *epc, u8 func_no,
            ^~~~~~~~~~~~~~~~~~~

drivers/pci/dwc/pcie-designware-ep.c:300:2: error: too few arguments to function 'dw_pcie_ep_unmap_addr'
dw_pcie_ep_unmap_addr(epc, ep->msi_mem_phys);
^~~~~~~~~~~~~~~~~~~~~
drivers/pci/dwc/pcie-designware-ep.c:161:13: note: declared here
static void dw_pcie_ep_unmap_addr(struct pci_epc *epc, u8 func_no,

             ^~~~~~~~~~~~~~~~~~~~~

Caused by commit

4494738de0d9 ("PCI: endpoint: Add the function number as argument to EPC ops")

interacting with commit

Quoted 7 lines

6f6d7873711c ("PCI: designware-ep: Add generic function for raising MSI irq")

This should have been fixed up in commit

26b259ab4fe8 ("Merge remote-tracking branch 'lorenzo/pci/dwc' into next")

I have used the pci tree from next-20180131 for today.

Hello,

Quoted 7 lines
Quoted 1 line

A suggested merge resolution included as an attachment.

The resolution is OK to me - we have not spotted it since PCI_ENDPOINT is being turned on in the config file in question only in -next, it is not on by default in current mainline, apologies.

Lorenzo

Adding Kishon to CC, he should probably have a look.

https://marc.info/?l=linux-kernel&m=151747537928327&w=2

If Kishon approves the suggested merge resolution, perhaps it can be squashed with Cyrille's patch.

Regards,
Niklas

#4 lore raw

Hi Niklas,

Quoted 44 lines · Niklas Cassel
Quoted 43 lines · Lorenzo Pieralisi
Quoted 30 lines · Niklas Cassel
Quoted 29 lines · Stephen Rothwell

Hi Bjorn,

After merging the pci tree, today's linux-next build (arm multi_v7_defconfig) failed like this:

drivers/pci/dwc/pcie-designware-ep.c: In function 'dw_pcie_ep_raise_msi_irq':
drivers/pci/dwc/pcie-designware-ep.c:293:8: error: too few arguments to function 'dw_pcie_ep_map_addr'
ret = dw_pcie_ep_map_addr(epc, ep->msi_mem_phys, msg_addr,

        ^~~~~~~~~~~~~~~~~~~
drivers/pci/dwc/pcie-designware-ep.c:177:12: note: declared here
 static int dw_pcie_ep_map_addr(struct pci_epc *epc, u8 func_no,
            ^~~~~~~~~~~~~~~~~~~

drivers/pci/dwc/pcie-designware-ep.c:300:2: error: too few arguments to function 'dw_pcie_ep_unmap_addr'
dw_pcie_ep_unmap_addr(epc, ep->msi_mem_phys);
^~~~~~~~~~~~~~~~~~~~~
drivers/pci/dwc/pcie-designware-ep.c:161:13: note: declared here
static void dw_pcie_ep_unmap_addr(struct pci_epc *epc, u8 func_no,

             ^~~~~~~~~~~~~~~~~~~~~

Caused by commit

4494738de0d9 ("PCI: endpoint: Add the function number as argument to EPC ops")

interacting with commit

6f6d7873711c ("PCI: designware-ep: Add generic function for raising MSI irq")

This should have been fixed up in commit

Quoted 7 lines
Quoted 3 lines

26b259ab4fe8 ("Merge remote-tracking branch 'lorenzo/pci/dwc' into next")

I have used the pci tree from next-20180131 for today.

Hello,

A suggested merge resolution included as an attachment.

The resolution is OK to me - we have not spotted it since PCI_ENDPOINT is being turned on in the config file in question only in -next, it is not on by default in current mainline, apologies.

Quoted 8 lines
Quoted 1 line

Lorenzo

Adding Kishon to CC, he should probably have a look.

https://marc.info/?l=linux-kernel&m=151747537928327&w=2

If Kishon approves the suggested merge resolution, perhaps it can be squashed with Cyrille's patch.

The patch looks good to me.

Thanks
Kishon

#5 lore raw
Quoted 49 lines · Kishon Vijay Abraham I

Hi Niklas,

Quoted 46 lines · Niklas Cassel
Quoted 44 lines · Lorenzo Pieralisi
Quoted 30 lines · Niklas Cassel
Quoted 29 lines · Stephen Rothwell

Hi Bjorn,

After merging the pci tree, today's linux-next build (arm multi_v7_defconfig) failed like this:

drivers/pci/dwc/pcie-designware-ep.c: In function 'dw_pcie_ep_raise_msi_irq':
drivers/pci/dwc/pcie-designware-ep.c:293:8: error: too few arguments to function 'dw_pcie_ep_map_addr'
ret = dw_pcie_ep_map_addr(epc, ep->msi_mem_phys, msg_addr,

        ^~~~~~~~~~~~~~~~~~~
drivers/pci/dwc/pcie-designware-ep.c:177:12: note: declared here
 static int dw_pcie_ep_map_addr(struct pci_epc *epc, u8 func_no,
            ^~~~~~~~~~~~~~~~~~~

drivers/pci/dwc/pcie-designware-ep.c:300:2: error: too few arguments to function 'dw_pcie_ep_unmap_addr'
dw_pcie_ep_unmap_addr(epc, ep->msi_mem_phys);
^~~~~~~~~~~~~~~~~~~~~
drivers/pci/dwc/pcie-designware-ep.c:161:13: note: declared here
static void dw_pcie_ep_unmap_addr(struct pci_epc *epc, u8 func_no,

             ^~~~~~~~~~~~~~~~~~~~~

Caused by commit

4494738de0d9 ("PCI: endpoint: Add the function number as argument to EPC ops")

interacting with commit

6f6d7873711c ("PCI: designware-ep: Add generic function for raising MSI irq")

This should have been fixed up in commit

Quoted 7 lines
Quoted 3 lines

26b259ab4fe8 ("Merge remote-tracking branch 'lorenzo/pci/dwc' into next")

I have used the pci tree from next-20180131 for today.

Hello,

A suggested merge resolution included as an attachment.

The resolution is OK to me - we have not spotted it since PCI_ENDPOINT is being turned on in the config file in question only in -next, it is not on by default in current mainline, apologies.

Lorenzo

Quoted 8 lines
Quoted 6 lines

Adding Kishon to CC, he should probably have a look.

https://marc.info/?l=linux-kernel&m=151747537928327&w=2

If Kishon approves the suggested merge resolution, perhaps it can be squashed with Cyrille's patch.

The patch looks good to me.

Since dw_pcie_ep_map_addr()/dw_pcie_ep_unmap_addr() ignores func_no, I guess another merge resoluton would be:

drivers/pci/dwc/pcie-designware-ep.c +2 -2
@@ -290,14 +290,14 @@ int dw_pcie_ep_raise_msi_irq(struct dw_pcie_ep *ep,
                msg_data = dw_pcie_readw_dbi(pci, MSI_MESSAGE_DATA_32);
        }
        msg_addr = ((u64) msg_addr_upper) << 32 | msg_addr_lower;
-       ret = dw_pcie_ep_map_addr(epc, ep->msi_mem_phys, msg_addr,
+       ret = dw_pcie_ep_map_addr(epc, 0, ep->msi_mem_phys, msg_addr,
                                  epc->mem->page_size);
        if (ret)
                return ret;
 
        writel(msg_data | (interrupt_num - 1), ep->msi_mem);
 
-       dw_pcie_ep_unmap_addr(epc, ep->msi_mem_phys);
+       dw_pcie_ep_unmap_addr(epc, 0, ep->msi_mem_phys);
 
        return 0;
 }

But in case pcie-designware-ep.c is ever going to support multi-function devices (will it? will it not?), perhaps the first merge resolution is prefered.

Regards,
Niklas

#6 lore raw
In reply to Niklas Cassel

[+cc Kishon, linux-pci]

Quoted 30 lines · Niklas Cassel
Quoted 29 lines · Stephen Rothwell

Hi Bjorn,

After merging the pci tree, today's linux-next build (arm multi_v7_defconfig) failed like this:

drivers/pci/dwc/pcie-designware-ep.c: In function 'dw_pcie_ep_raise_msi_irq':
drivers/pci/dwc/pcie-designware-ep.c:293:8: error: too few arguments to function 'dw_pcie_ep_map_addr'
ret = dw_pcie_ep_map_addr(epc, ep->msi_mem_phys, msg_addr,

        ^~~~~~~~~~~~~~~~~~~
drivers/pci/dwc/pcie-designware-ep.c:177:12: note: declared here
 static int dw_pcie_ep_map_addr(struct pci_epc *epc, u8 func_no,
            ^~~~~~~~~~~~~~~~~~~

drivers/pci/dwc/pcie-designware-ep.c:300:2: error: too few arguments to function 'dw_pcie_ep_unmap_addr'
dw_pcie_ep_unmap_addr(epc, ep->msi_mem_phys);
^~~~~~~~~~~~~~~~~~~~~
drivers/pci/dwc/pcie-designware-ep.c:161:13: note: declared here
static void dw_pcie_ep_unmap_addr(struct pci_epc *epc, u8 func_no,

             ^~~~~~~~~~~~~~~~~~~~~

Caused by commit

4494738de0d9 ("PCI: endpoint: Add the function number as argument to EPC ops")

interacting with commit

6f6d7873711c ("PCI: designware-ep: Add generic function for raising MSI irq")

This should have been fixed up in commit

Quoted 7 lines
Quoted 3 lines

26b259ab4fe8 ("Merge remote-tracking branch 'lorenzo/pci/dwc' into next")

I have used the pci tree from next-20180131 for today.

Hello,

A suggested merge resolution included as an attachment.

I applied this resolution to the merge of lorenzo/pci/dwc.

Quoted 108 lines
drivers/pci/dwc/pci-dra7xx.c +1 -1
index 39e4a9744863..ed8558d638e5 100644
@@ -368,7 +368,7 @@ static void dra7xx_pcie_raise_msi_irq(struct dra7xx_pcie *dra7xx,
 	dra7xx_pcie_writel(dra7xx, PCIECTRL_TI_CONF_MSI_XMT, reg);
 }
 
-static int dra7xx_pcie_raise_irq(struct dw_pcie_ep *ep,
+static int dra7xx_pcie_raise_irq(struct dw_pcie_ep *ep, u8 func_no,
 				 enum pci_epc_irq_type type, u8 interrupt_num)
 {
 	struct dw_pcie *pci = to_dw_pcie_from_ep(ep);
drivers/pci/dwc/pcie-artpec6.c +2 -2
index 34ae163603ee..93b3df9ed1b5 100644
@@ -445,7 +445,7 @@ static void artpec6_pcie_ep_init(struct dw_pcie_ep *ep)
 		dw_pcie_ep_reset_bar(pci, bar);
 }
 
-static int artpec6_pcie_raise_irq(struct dw_pcie_ep *ep,
+static int artpec6_pcie_raise_irq(struct dw_pcie_ep *ep, u8 func_no,
 				  enum pci_epc_irq_type type, u8 interrupt_num)
 {
 	struct dw_pcie *pci = to_dw_pcie_from_ep(ep);
@@ -455,7 +455,7 @@ static int artpec6_pcie_raise_irq(struct dw_pcie_ep *ep,
 		dev_err(pci->dev, "EP cannot trigger legacy IRQs\n");
 		return -EINVAL;
 	case PCI_EPC_IRQ_MSI:
-		return dw_pcie_ep_raise_msi_irq(ep, interrupt_num);
+		return dw_pcie_ep_raise_msi_irq(ep, func_no, interrupt_num);
 	default:
 		dev_err(pci->dev, "UNKNOWN IRQ type\n");
 	}
drivers/pci/dwc/pcie-designware-ep.c +4 -4
index c0395e1f470a..3a6feeff5f5b 100644
@@ -229,7 +229,7 @@ static int dw_pcie_ep_raise_irq(struct pci_epc *epc, u8 func_no,
 	if (!ep->ops->raise_irq)
 		return -EINVAL;
 
-	return ep->ops->raise_irq(ep, type, interrupt_num);
+	return ep->ops->raise_irq(ep, func_no, type, interrupt_num);
 }
 
 static void dw_pcie_ep_stop(struct pci_epc *epc)
@@ -267,7 +267,7 @@ static const struct pci_epc_ops epc_ops = {
 	.stop			= dw_pcie_ep_stop,
 };
 
-int dw_pcie_ep_raise_msi_irq(struct dw_pcie_ep *ep,
+int dw_pcie_ep_raise_msi_irq(struct dw_pcie_ep *ep, u8 func_no,
 			     u8 interrupt_num)
 {
 	struct dw_pcie *pci = to_dw_pcie_from_ep(ep);
@@ -290,14 +290,14 @@ int dw_pcie_ep_raise_msi_irq(struct dw_pcie_ep *ep,
 		msg_data = dw_pcie_readw_dbi(pci, MSI_MESSAGE_DATA_32);
 	}
 	msg_addr = ((u64) msg_addr_upper) << 32 | msg_addr_lower;
-	ret = dw_pcie_ep_map_addr(epc, ep->msi_mem_phys, msg_addr,
+	ret = dw_pcie_ep_map_addr(epc, func_no, ep->msi_mem_phys, msg_addr,
 				  epc->mem->page_size);
 	if (ret)
 		return ret;
 
 	writel(msg_data | (interrupt_num - 1), ep->msi_mem);
 
-	dw_pcie_ep_unmap_addr(epc, ep->msi_mem_phys);
+	dw_pcie_ep_unmap_addr(epc, func_no, ep->msi_mem_phys);
 
 	return 0;
 }
drivers/pci/dwc/pcie-designware.h +5 -4
index 7e52119f0e96..11b13864a406 100644
@@ -186,8 +186,8 @@ enum dw_pcie_as_type {
 
 struct dw_pcie_ep_ops {
 	void	(*ep_init)(struct dw_pcie_ep *ep);
-	int	(*raise_irq)(struct dw_pcie_ep *ep, enum pci_epc_irq_type type,
-			     u8 interrupt_num);
+	int	(*raise_irq)(struct dw_pcie_ep *ep, u8 func_no,
+			     enum pci_epc_irq_type type, u8 interrupt_num);
 };
 
 struct dw_pcie_ep {
@@ -342,7 +342,8 @@ static inline int dw_pcie_host_init(struct pcie_port *pp)
 void dw_pcie_ep_linkup(struct dw_pcie_ep *ep);
 int dw_pcie_ep_init(struct dw_pcie_ep *ep);
 void dw_pcie_ep_exit(struct dw_pcie_ep *ep);
-int dw_pcie_ep_raise_msi_irq(struct dw_pcie_ep *ep, u8 interrupt_num);
+int dw_pcie_ep_raise_msi_irq(struct dw_pcie_ep *ep, u8 func_no,
+			     u8 interrupt_num);
 void dw_pcie_ep_reset_bar(struct dw_pcie *pci, enum pci_barno bar);
 #else
 static inline void dw_pcie_ep_linkup(struct dw_pcie_ep *ep)
@@ -358,7 +359,7 @@ static inline void dw_pcie_ep_exit(struct dw_pcie_ep *ep)
 {
 }
 
-static inline int dw_pcie_ep_raise_msi_irq(struct dw_pcie_ep *ep,
+static inline int dw_pcie_ep_raise_msi_irq(struct dw_pcie_ep *ep, u8 func_no,
 					   u8 interrupt_num)
 {
 	return 0;
#7 lore raw

Hi Bjorn,

Quoted 2 lines · On Thu, 1 Feb 2018 13:00:33 -0600 Bjorn Helgaas <[email protected]> wrote:

I applied this resolution to the merge of lorenzo/pci/dwc.

Excellent, thanks.

Signature · 2 lines
Cheers,
Stephen Rothwell