From: Joerg Roedel <joro@8bytes.org>
To: Vasant Hegde <vasant.hegde@amd.com>
Cc: iommu@lists.linux-foundation.org
Subject: Re: [PATCH 1/5] iommu/amd: Improve error handling for amd_iommu_init_pci
Date: Mon, 28 Feb 2022 13:47:15 +0100 [thread overview]
Message-ID: <YhzEU28x5FS1yAfw@8bytes.org> (raw)
In-Reply-To: <20220221045916.19701-2-vasant.hegde@amd.com>
On Mon, Feb 21, 2022 at 10:29:12AM +0530, Vasant Hegde wrote:
> From: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
>
> Add error messages to prevent silent failure.
>
> Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
> Signed-off-by: Vasant Hegde <vasant.hegde@amd.com>
> ---
> drivers/iommu/amd/init.c | 12 +++++++++---
> 1 file changed, 9 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/iommu/amd/init.c b/drivers/iommu/amd/init.c
> index 1eacd43cb436..770ac679b682 100644
> --- a/drivers/iommu/amd/init.c
> +++ b/drivers/iommu/amd/init.c
> @@ -1942,9 +1942,10 @@ static int __init amd_iommu_init_pci(void)
>
> for_each_iommu(iommu) {
> ret = iommu_init_pci(iommu);
> - if (ret)
> - break;
> -
> + if (ret) {
> + pr_err("IOMMU:%d Failed to initialize!\n", iommu->index);
Please make that message "IOMMU%d: Failed to initialize IOMMU Hardware (error=%d)!\n".
> + goto out;
> + }
> /* Need to setup range after PCI init */
> iommu_set_cwwb_range(iommu);
> }
> @@ -1960,6 +1961,10 @@ static int __init amd_iommu_init_pci(void)
> * active.
> */
> ret = amd_iommu_init_api();
> + if (ret) {
> + pr_err("IOMMU: Failed to initialize api!\n");
And that "IOMMU: Failed to initialize IOMMU-API interface (error=%d)!\n"
> + goto out;
> + }
>
> init_device_table_dma();
>
> @@ -1969,6 +1974,7 @@ static int __init amd_iommu_init_pci(void)
> if (!ret)
> print_iommu_info();
>
> +out:
> return ret;
> }
>
> --
> 2.27.0
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu
next prev parent reply other threads:[~2022-02-28 12:47 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-21 4:59 [PATCH 0/5] iommu/amd: Cleanup and fixes Vasant Hegde via iommu
2022-02-21 4:59 ` [PATCH 1/5] iommu/amd: Improve error handling for amd_iommu_init_pci Vasant Hegde via iommu
2022-02-28 12:47 ` Joerg Roedel [this message]
2022-03-01 8:58 ` Vasant Hegde via iommu
2022-02-21 4:59 ` [PATCH 2/5] iommu/amd: Call memunmap in error path Vasant Hegde via iommu
2022-02-21 4:59 ` [PATCH 3/5] iommu/amd: Clean up function declarations Vasant Hegde via iommu
2022-02-21 4:59 ` [PATCH 4/5] iommu/amd: Remove unused struct fault.devid Vasant Hegde via iommu
2022-02-21 4:59 ` [PATCH 5/5] iommu/amd: Improve amd_iommu_v2_exit() Vasant Hegde via iommu
2022-02-28 12:48 ` [PATCH 0/5] iommu/amd: Cleanup and fixes 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=YhzEU28x5FS1yAfw@8bytes.org \
--to=joro@8bytes.org \
--cc=iommu@lists.linux-foundation.org \
--cc=vasant.hegde@amd.com \
/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.