diff for duplicates of <000301d37a7b$32926f60$97b74e20$@gmail.com> diff --git a/a/1.txt b/N1/1.txt index 1c76586..6c35ed5 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -1,8 +1,8 @@ On Wednesday, December 20, 2017 2:30 PM, Joao Pinto wrote: ->=20 +> > Hi, ->=20 -> =C3=80s 11:29 PM de 12/19/2017, Niklas Cassel escreveu: +> +> Às 11:29 PM de 12/19/2017, Niklas Cassel escreveu: > > Certain SoCs need to map the MSI address in raise_irq. > > To map an address, you first need to call pci_epc_mem_alloc_addr(), > > however, pci_epc_mem_alloc_addr() calls ioremap() (which can sleep). @@ -10,8 +10,7 @@ On Wednesday, December 20, 2017 2:30 PM, Joao Pinto wrote: > > Since raise_irq is only called from atomic context, we can't call > > pci_epc_mem_alloc_addr() from raise_irq. > > -> > Pre-allocate a page in dw_pcie_ep_init(), so that this page can = -later +> > Pre-allocate a page in dw_pcie_ep_init(), so that this page can later > > be used to map/unmap the MSI address in raise_irq. > > > > Signed-off-by: Niklas Cassel <niklas.cassel@axis.com> @@ -27,7 +26,7 @@ later > > +++ b/drivers/pci/dwc/pcie-designware-ep.c > > @@ -286,6 +286,9 @@ void dw_pcie_ep_exit(struct dw_pcie_ep *ep) > > { -> > struct pci_epc *epc =3D ep->epc; +> > struct pci_epc *epc = ep->epc; > > > > + pci_epc_mem_free_addr(epc, ep->msi_mem_phys, ep->msi_mem, > > + epc->mem->page_size); @@ -39,18 +38,17 @@ later > > return ret; > > } > > -> > + ep->msi_mem =3D pci_epc_mem_alloc_addr(epc, &ep->msi_mem_phys, +> > + ep->msi_mem = pci_epc_mem_alloc_addr(epc, &ep->msi_mem_phys, > > + epc->mem->page_size); > > + if (!ep->msi_mem) { > > + dev_err(dev, "Failed to reserve memory for MSI\n"); > > + return -ENOMEM; > > + } > > + -> > ep->epc =3D epc; +> > ep->epc = epc; > > epc_set_drvdata(epc, ep); > > dw_pcie_setup(pci); -> > diff --git a/drivers/pci/dwc/pcie-designware.h = -b/drivers/pci/dwc/pcie- +> > diff --git a/drivers/pci/dwc/pcie-designware.h b/drivers/pci/dwc/pcie- > designware.h > > index 9aaf0cd04dd6..5a1da459eda5 100644 > > --- a/drivers/pci/dwc/pcie-designware.h @@ -65,7 +63,7 @@ b/drivers/pci/dwc/pcie- > > > > struct dw_pcie_ops { > > ->=20 +> > Acked-by: Joao Pinto <jpinto@synopsys.com> Acked-by: Jingoo Han <jingoohan1@gmail.com> diff --git a/a/content_digest b/N1/content_digest index 3eefc54..78c5ac8 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -14,10 +14,10 @@ "\00:1\0" "b\0" "On Wednesday, December 20, 2017 2:30 PM, Joao Pinto wrote:\n" - ">=20\n" + "> \n" "> Hi,\n" - ">=20\n" - "> =C3=80s 11:29 PM de 12/19/2017, Niklas Cassel escreveu:\n" + "> \n" + "> \303\200s 11:29 PM de 12/19/2017, Niklas Cassel escreveu:\n" "> > Certain SoCs need to map the MSI address in raise_irq.\n" "> > To map an address, you first need to call pci_epc_mem_alloc_addr(),\n" "> > however, pci_epc_mem_alloc_addr() calls ioremap() (which can sleep).\n" @@ -25,8 +25,7 @@ "> > Since raise_irq is only called from atomic context, we can't call\n" "> > pci_epc_mem_alloc_addr() from raise_irq.\n" "> >\n" - "> > Pre-allocate a page in dw_pcie_ep_init(), so that this page can =\n" - "later\n" + "> > Pre-allocate a page in dw_pcie_ep_init(), so that this page can later\n" "> > be used to map/unmap the MSI address in raise_irq.\n" "> >\n" "> > Signed-off-by: Niklas Cassel <niklas.cassel@axis.com>\n" @@ -42,7 +41,7 @@ "> > +++ b/drivers/pci/dwc/pcie-designware-ep.c\n" "> > @@ -286,6 +286,9 @@ void dw_pcie_ep_exit(struct dw_pcie_ep *ep)\n" "> > {\n" - "> > \tstruct pci_epc *epc =3D ep->epc;\n" + "> > \tstruct pci_epc *epc = ep->epc;\n" "> >\n" "> > +\tpci_epc_mem_free_addr(epc, ep->msi_mem_phys, ep->msi_mem,\n" "> > +\t\t\t epc->mem->page_size);\n" @@ -54,18 +53,17 @@ "> > \t\treturn ret;\n" "> > \t}\n" "> >\n" - "> > +\tep->msi_mem =3D pci_epc_mem_alloc_addr(epc, &ep->msi_mem_phys,\n" + "> > +\tep->msi_mem = pci_epc_mem_alloc_addr(epc, &ep->msi_mem_phys,\n" "> > +\t\t\t\t\t epc->mem->page_size);\n" "> > +\tif (!ep->msi_mem) {\n" "> > +\t\tdev_err(dev, \"Failed to reserve memory for MSI\\n\");\n" "> > +\t\treturn -ENOMEM;\n" "> > +\t}\n" "> > +\n" - "> > \tep->epc =3D epc;\n" + "> > \tep->epc = epc;\n" "> > \tepc_set_drvdata(epc, ep);\n" "> > \tdw_pcie_setup(pci);\n" - "> > diff --git a/drivers/pci/dwc/pcie-designware.h =\n" - "b/drivers/pci/dwc/pcie-\n" + "> > diff --git a/drivers/pci/dwc/pcie-designware.h b/drivers/pci/dwc/pcie-\n" "> designware.h\n" "> > index 9aaf0cd04dd6..5a1da459eda5 100644\n" "> > --- a/drivers/pci/dwc/pcie-designware.h\n" @@ -80,7 +78,7 @@ "> >\n" "> > struct dw_pcie_ops {\n" "> >\n" - ">=20\n" + "> \n" "> Acked-by: Joao Pinto <jpinto@synopsys.com>\n" "\n" "Acked-by: Jingoo Han <jingoohan1@gmail.com>\n" @@ -88,4 +86,4 @@ "Best regards,\n" Jingoo Han -532c1b71d184b236a50115a1c68006b2b1ec8207d59d099b0a0475c5967a5cf2 +7bcac0561819afbff100aa7b98a6082fe88cd7e7dacdde8d72f3ad68222ea6fd
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.