From: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
To: Loic Poulain <loic.poulain@linaro.org>
Cc: hemantk@codeaurora.org, linux-arm-msm@vger.kernel.org
Subject: Re: [PATCH v2 2/2] mhi: pci_generic: Fix shared MSI vector support
Date: Wed, 6 Jan 2021 18:50:52 +0530 [thread overview]
Message-ID: <20210106132052.GI3131@thinkpad> (raw)
In-Reply-To: <1609865076-13890-2-git-send-email-loic.poulain@linaro.org>
On Tue, Jan 05, 2021 at 05:44:36PM +0100, Loic Poulain wrote:
> When a shared MSI vector must be used (e.g. when VTd is disabled on
> x86_64), each event MSI vector must be set to the shared vector idx.
>
> Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
> Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Applied to mhi-next!
Thanks,
Mani
> ---
> v2: reword MSI warning
>
> drivers/bus/mhi/pci_generic.c | 12 ++++++++----
> 1 file changed, 8 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/bus/mhi/pci_generic.c b/drivers/bus/mhi/pci_generic.c
> index 86ff0c3..5b3a23a4 100644
> --- a/drivers/bus/mhi/pci_generic.c
> +++ b/drivers/bus/mhi/pci_generic.c
> @@ -154,7 +154,7 @@ static const struct mhi_channel_config modem_qcom_v1_mhi_channels[] = {
> MHI_CHANNEL_CONFIG_HW_DL(101, "IP_HW0", 128, 3),
> };
>
> -static const struct mhi_event_config modem_qcom_v1_mhi_events[] = {
> +static struct mhi_event_config modem_qcom_v1_mhi_events[] = {
> /* first ring is control+data ring */
> MHI_EVENT_CONFIG_CTRL(0),
> /* DIAG dedicated event ring */
> @@ -164,7 +164,7 @@ static const struct mhi_event_config modem_qcom_v1_mhi_events[] = {
> MHI_EVENT_CONFIG_HW_DATA(3, 101)
> };
>
> -static const struct mhi_controller_config modem_qcom_v1_mhiv_config = {
> +static struct mhi_controller_config modem_qcom_v1_mhiv_config = {
> .max_channels = 128,
> .timeout_ms = 8000,
> .num_channels = ARRAY_SIZE(modem_qcom_v1_mhi_channels),
> @@ -295,8 +295,12 @@ static int mhi_pci_get_irqs(struct mhi_controller *mhi_cntrl,
> }
>
> if (nr_vectors < mhi_cntrl->nr_irqs) {
> - dev_warn(&pdev->dev, "Not enough MSI vectors (%d/%d), use shared MSI\n",
> - nr_vectors, mhi_cntrl_config->num_events);
> + dev_warn(&pdev->dev, "using shared MSI\n");
> +
> + /* Patch msi vectors, use only one (shared) */
> + for (i = 0; i < mhi_cntrl_config->num_events; i++)
> + mhi_cntrl_config->event_cfg[i].irq = 0;
> + mhi_cntrl->nr_irqs = 1;
> }
>
> irq = devm_kcalloc(&pdev->dev, mhi_cntrl->nr_irqs, sizeof(int), GFP_KERNEL);
> --
> 2.7.4
>
next prev parent reply other threads:[~2021-01-06 13:21 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-05 16:44 [PATCH v2 1/2] mhi: unconstify mhi_event_config Loic Poulain
2021-01-05 16:44 ` [PATCH v2 2/2] mhi: pci_generic: Fix shared MSI vector support Loic Poulain
2021-01-06 2:14 ` Hemant Kumar
2021-01-06 13:20 ` Manivannan Sadhasivam [this message]
2021-01-06 2:28 ` [PATCH v2 1/2] mhi: unconstify mhi_event_config Hemant Kumar
[not found] ` <CAMZdPi-m9WopviGqH+9XJdg7oi0wA4ASLkyXcqcBqrJdY_Oq8w@mail.gmail.com>
2021-01-06 13:16 ` Manivannan Sadhasivam
2021-01-06 13:20 ` Manivannan Sadhasivam
2021-03-01 19:59 ` patchwork-bot+linux-arm-msm
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=20210106132052.GI3131@thinkpad \
--to=manivannan.sadhasivam@linaro.org \
--cc=hemantk@codeaurora.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=loic.poulain@linaro.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).