On 2/28/2022 6:17 PM, Joerg Roedel wrote:
> On Mon, Feb 21, 2022 at 10:29:12AM +0530, Vasant Hegde wrote:
>> From: Suravee Suthikulpanit <[email protected]>
>>
>> Add error messages to prevent silent failure.
>>
>> Signed-off-by: Suravee Suthikulpanit <[email protected]>
>> Signed-off-by: Vasant Hegde <[email protected]>
>> ---
>> 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".
Thanks Joerg for the review. I have fixed it in v2.
>
>> + 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"
Fixed in v2.
-Vasant
_______________________________________________
iommu mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/iommu