From: Minghuan.Lian@freescale.com (Minghuan.Lian at freescale.com)
To: linux-arm-kernel@lists.infradead.org
Subject: 答复: [PATCH 1/2] PCI: designware: change MSI-related pcie_host_ops
Date: Fri, 5 Sep 2014 06:15:05 +0000 [thread overview]
Message-ID: <1409926544877.11059@freescale.com> (raw)
In-Reply-To: <CAErSpo5kEVSKmZn9CxZ=G=PbnKcAaso=ZwCwp=aEvJsnS_AKyQ@mail.gmail.com>
Hi Bjorn,
Thanks for your comment.
I will split them in next version.
Currently, the get_msi_addr() function returns u32 address, but MSI message address is 64bits.
Should we change get_msi_addr() to return u64 address?
Thanks,
Minghuan
________________________________________
???: Bjorn Helgaas <bhelgaas@google.com>
????: 2014?9?4? 21:20
???: Lian Minghuan-B31939
??: linux-pci at vger.kernel.org; linux-arm; Zang Roy-R61911; Hu Mingkai-B21284
??: Re: [PATCH 1/2] PCI: designware: change MSI-related pcie_host_ops
On Thu, Sep 4, 2014 at 12:45 PM, Minghuan Lian
<Minghuan.Lian@freescale.com> wrote:
> 1. Change original get_msi_data() to get_msi_addr(), since this
> function returns MSI message address.
> 2. Add a new function get_msi_data() to return MSI message data.
This looks like two patches: one that merely renames a function, with
no functional change at all, and a second that adds a new function.
Please split them.
> Signed-off-by: Minghuan Lian <Minghuan.Lian@freescale.com>
> ---
> drivers/pci/host/pcie-designware.c | 11 ++++++++---
> drivers/pci/host/pcie-designware.h | 3 ++-
> 2 files changed, 10 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/pci/host/pcie-designware.c b/drivers/pci/host/pcie-designware.c
> index 52bd3a1..c84913e 100644
> --- a/drivers/pci/host/pcie-designware.c
> +++ b/drivers/pci/host/pcie-designware.c
> @@ -373,12 +373,17 @@ static int dw_msi_setup_irq(struct msi_chip *chip, struct pci_dev *pdev,
> */
> desc->msi_attrib.multiple = msgvec;
>
> - if (pp->ops->get_msi_data)
> - msg.address_lo = pp->ops->get_msi_data(pp);
> + if (pp->ops->get_msi_addr)
> + msg.address_lo = pp->ops->get_msi_addr(pp);
> else
> msg.address_lo = virt_to_phys((void *)pp->msi_data);
> msg.address_hi = 0x0;
> - msg.data = pos;
> +
> + if (pp->ops->get_msi_data)
> + msg.data = pp->ops->get_msi_data(pp, pos);
> + else
> + msg.data = pos;
> +
> write_msi_msg(irq, &msg);
>
> return 0;
> diff --git a/drivers/pci/host/pcie-designware.h b/drivers/pci/host/pcie-designware.h
> index daf81f9..7f08807 100644
> --- a/drivers/pci/host/pcie-designware.h
> +++ b/drivers/pci/host/pcie-designware.h
> @@ -73,7 +73,8 @@ struct pcie_host_ops {
> void (*host_init)(struct pcie_port *pp);
> void (*msi_set_irq)(struct pcie_port *pp, int irq);
> void (*msi_clear_irq)(struct pcie_port *pp, int irq);
> - u32 (*get_msi_data)(struct pcie_port *pp);
> + u32 (*get_msi_addr)(struct pcie_port *pp);
> + u32 (*get_msi_data)(struct pcie_port *pp, int pos);
> };
>
> int dw_pcie_cfg_read(void __iomem *addr, int where, int size, u32 *val);
> --
> 1.9.1
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-pci" in
> the body of a message to majordomo at vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2014-09-05 6:15 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-04 18:45 [PATCH 1/2] PCI: designware: change MSI-related pcie_host_ops Minghuan Lian
2014-09-04 13:20 ` Bjorn Helgaas
2014-09-05 6:15 ` Minghuan.Lian at freescale.com [this message]
2014-09-04 18:45 ` [PATCH 2/2] PCI: Layerscape: Add Layerscape PCIe driver Minghuan Lian
2014-09-04 12:14 ` Arnd Bergmann
2014-09-04 13:51 ` Arnd Bergmann
2014-09-04 13:57 ` Arnd Bergmann
2014-09-05 7:22 ` 答复: " Minghuan.Lian at freescale.com
2014-09-05 8:44 ` Arnd Bergmann
2014-09-09 17:25 ` Lian Minghuan-B31939
2014-09-09 9:56 ` Arnd Bergmann
2014-09-09 18:46 ` Lian Minghuan-B31939
2014-09-09 10:50 ` Arnd Bergmann
2014-09-09 19:16 ` Lian Minghuan-B31939
2014-09-09 11:58 ` Arnd Bergmann
2014-09-10 11:29 ` Lian Minghuan-B31939
2014-09-04 13:24 ` Bjorn Helgaas
2014-09-05 7:24 ` 答复: " Minghuan.Lian at freescale.com
2014-09-04 20:21 ` Fabio Estevam
2014-09-04 21:12 ` Arnd Bergmann
2014-09-05 6:43 ` 答复: " Minghuan.Lian at freescale.com
2014-09-05 7:40 ` Minghuan.Lian at freescale.com
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1409926544877.11059@freescale.com \
--to=minghuan.lian@freescale.com \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).