All of lore.kernel.org
 help / color / mirror / Atom feed
From: John Garry <john.garry@huawei.com>
To: Jean-Philippe Brucker <jean-philippe@linaro.org>,
	<linux-arm-kernel@lists.infradead.org>,
	<iommu@lists.linux-foundation.org>
Cc: will@kernel.org, robin.murphy@arm.com
Subject: Re: [PATCH 1/2] iommu/arm-smmu-v3: Don't display an error when IRQ lines are missing
Date: Mon, 11 Nov 2019 11:52:38 +0000	[thread overview]
Message-ID: <d0dfd82d-dcec-010c-6a69-c8f2b15f5c7a@huawei.com> (raw)
In-Reply-To: <20191111111721.4145919-1-jean-philippe@linaro.org>

On 11/11/2019 11:17, Jean-Philippe Brucker wrote:
> Since commit 7723f4c5ecdb ("driver core: platform: Add an error message
> to platform_get_irq*()"), platform_get_irq_byname() displays an error
> when the IRQ isn't found. Since the SMMUv3 driver uses that function to
> query which interrupt method is available, the message is now displayed
> during boot for any SMMUv3 that doesn't implement the combined
> interrupt, or that implements MSIs.
> 
> [   20.700337] arm-smmu-v3 arm-smmu-v3.7.auto: IRQ combined not found
> [   20.706508] arm-smmu-v3 arm-smmu-v3.7.auto: IRQ eventq not found
> [   20.712503] arm-smmu-v3 arm-smmu-v3.7.auto: IRQ priq not found
> [   20.718325] arm-smmu-v3 arm-smmu-v3.7.auto: IRQ gerror not found
> 
> Use platform_get_irq_byname_optional() to avoid displaying a spurious
> error.
> 
> Fixes: 7723f4c5ecdb ("driver core: platform: Add an error message to platform_get_irq*()")
> Signed-off-by: Jean-Philippe Brucker <jean-philippe@linaro.org>

That stops a nuisance:
Tested-by: John Garry <john.garry@huawei.com>

However, I will say though that the combined irq seems necessary for 
TX2, which is not warned about being missing now.

Finally, A cover letter would have been handy to mention that the new 
API was only introduced after rc1

thanks

> ---
>   drivers/iommu/arm-smmu-v3.c | 8 ++++----
>   1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/iommu/arm-smmu-v3.c b/drivers/iommu/arm-smmu-v3.c
> index bfa4a0f39ed0..a89797f346a4 100644
> --- a/drivers/iommu/arm-smmu-v3.c
> +++ b/drivers/iommu/arm-smmu-v3.c
> @@ -5207,19 +5207,19 @@ static int arm_smmu_device_probe(struct platform_device *pdev)
>   
>   	/* Interrupt lines */
>   
> -	irq = platform_get_irq_byname(pdev, "combined");
> +	irq = platform_get_irq_byname_optional(pdev, "combined");
>   	if (irq > 0)
>   		smmu->combined_irq = irq;
>   	else {
> -		irq = platform_get_irq_byname(pdev, "eventq");
> +		irq = platform_get_irq_byname_optional(pdev, "eventq");
>   		if (irq > 0)
>   			smmu->evtq.q.irq = irq;
>   
> -		irq = platform_get_irq_byname(pdev, "priq");
> +		irq = platform_get_irq_byname_optional(pdev, "priq");
>   		if (irq > 0)
>   			smmu->priq.q.irq = irq;
>   
> -		irq = platform_get_irq_byname(pdev, "gerror");
> +		irq = platform_get_irq_byname_optional(pdev, "gerror");
>   		if (irq > 0)
>   			smmu->gerr_irq = irq;
>   	}
> 

_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

WARNING: multiple messages have this Message-ID (diff)
From: John Garry <john.garry@huawei.com>
To: Jean-Philippe Brucker <jean-philippe@linaro.org>,
	<linux-arm-kernel@lists.infradead.org>,
	<iommu@lists.linux-foundation.org>
Cc: will@kernel.org, joro@8bytes.org, robin.murphy@arm.com
Subject: Re: [PATCH 1/2] iommu/arm-smmu-v3: Don't display an error when IRQ lines are missing
Date: Mon, 11 Nov 2019 11:52:38 +0000	[thread overview]
Message-ID: <d0dfd82d-dcec-010c-6a69-c8f2b15f5c7a@huawei.com> (raw)
In-Reply-To: <20191111111721.4145919-1-jean-philippe@linaro.org>

On 11/11/2019 11:17, Jean-Philippe Brucker wrote:
> Since commit 7723f4c5ecdb ("driver core: platform: Add an error message
> to platform_get_irq*()"), platform_get_irq_byname() displays an error
> when the IRQ isn't found. Since the SMMUv3 driver uses that function to
> query which interrupt method is available, the message is now displayed
> during boot for any SMMUv3 that doesn't implement the combined
> interrupt, or that implements MSIs.
> 
> [   20.700337] arm-smmu-v3 arm-smmu-v3.7.auto: IRQ combined not found
> [   20.706508] arm-smmu-v3 arm-smmu-v3.7.auto: IRQ eventq not found
> [   20.712503] arm-smmu-v3 arm-smmu-v3.7.auto: IRQ priq not found
> [   20.718325] arm-smmu-v3 arm-smmu-v3.7.auto: IRQ gerror not found
> 
> Use platform_get_irq_byname_optional() to avoid displaying a spurious
> error.
> 
> Fixes: 7723f4c5ecdb ("driver core: platform: Add an error message to platform_get_irq*()")
> Signed-off-by: Jean-Philippe Brucker <jean-philippe@linaro.org>

That stops a nuisance:
Tested-by: John Garry <john.garry@huawei.com>

However, I will say though that the combined irq seems necessary for 
TX2, which is not warned about being missing now.

Finally, A cover letter would have been handy to mention that the new 
API was only introduced after rc1

thanks

> ---
>   drivers/iommu/arm-smmu-v3.c | 8 ++++----
>   1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/iommu/arm-smmu-v3.c b/drivers/iommu/arm-smmu-v3.c
> index bfa4a0f39ed0..a89797f346a4 100644
> --- a/drivers/iommu/arm-smmu-v3.c
> +++ b/drivers/iommu/arm-smmu-v3.c
> @@ -5207,19 +5207,19 @@ static int arm_smmu_device_probe(struct platform_device *pdev)
>   
>   	/* Interrupt lines */
>   
> -	irq = platform_get_irq_byname(pdev, "combined");
> +	irq = platform_get_irq_byname_optional(pdev, "combined");
>   	if (irq > 0)
>   		smmu->combined_irq = irq;
>   	else {
> -		irq = platform_get_irq_byname(pdev, "eventq");
> +		irq = platform_get_irq_byname_optional(pdev, "eventq");
>   		if (irq > 0)
>   			smmu->evtq.q.irq = irq;
>   
> -		irq = platform_get_irq_byname(pdev, "priq");
> +		irq = platform_get_irq_byname_optional(pdev, "priq");
>   		if (irq > 0)
>   			smmu->priq.q.irq = irq;
>   
> -		irq = platform_get_irq_byname(pdev, "gerror");
> +		irq = platform_get_irq_byname_optional(pdev, "gerror");
>   		if (irq > 0)
>   			smmu->gerr_irq = irq;
>   	}
> 


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  parent reply	other threads:[~2019-11-11 11:52 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-11 11:17 [PATCH 1/2] iommu/arm-smmu-v3: Don't display an error when IRQ lines are missing Jean-Philippe Brucker
2019-11-11 11:17 ` Jean-Philippe Brucker
2019-11-11 11:17 ` [PATCH 2/2] iommu/arm-smmu: Remove duplicate error message Jean-Philippe Brucker
2019-11-11 11:17   ` Jean-Philippe Brucker
2019-11-11 14:37   ` Will Deacon
2019-11-11 14:37     ` Will Deacon
2019-11-11 14:43   ` Robin Murphy
2019-11-11 14:43     ` Robin Murphy
2019-11-11 11:52 ` John Garry [this message]
2019-11-11 11:52   ` [PATCH 1/2] iommu/arm-smmu-v3: Don't display an error when IRQ lines are missing John Garry
2019-11-11 14:23   ` Jean-Philippe Brucker
2019-11-11 14:23     ` Jean-Philippe Brucker
2019-11-11 14:36 ` Will Deacon
2019-11-11 14:36   ` Will Deacon
2019-11-11 14:44 ` Joerg Roedel
2019-11-11 14:44   ` Joerg Roedel

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=d0dfd82d-dcec-010c-6a69-c8f2b15f5c7a@huawei.com \
    --to=john.garry@huawei.com \
    --cc=iommu@lists.linux-foundation.org \
    --cc=jean-philippe@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=robin.murphy@arm.com \
    --cc=will@kernel.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 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.