All of lore.kernel.org
 help / color / mirror / Atom feed
From: Khiem Nguyen <khiem.nguyen.xt@renesas.com>
To: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: khiem.nguyen.xt@renesas.com,
	Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>,
	iommu@lists.linux-foundation.org, linux-sh@vger.kernel.org,
	Joerg Roedel <joro@8bytes.org>
Subject: Re: [PATCH v3] iommu: Add driver for Renesas VMSA-compatible IPMMU
Date: Thu, 10 Jul 2014 08:20:25 +0900	[thread overview]
Message-ID: <53BDCE39.1070306@renesas.com> (raw)
In-Reply-To: <1837932.hUVa08Puz4@avalon>

Hi Laurent,

Thanks for your explanation.

I'm fine with current situation. 
I have also checked other drivers and they did the same.
As you said, let's improve this driver when the time comes.

Thanks.

Best regards,
KHIEM Nguyen

On 6/4/2014 2:39 AM, Laurent Pinchart wrote:
> Hi,
> 
> On Tuesday 03 June 2014 13:57:38 Khiem Nguyen wrote:
>> Hi Laurent,
>>
>> Thanks for the patch.
>>
>>> +	if (!iommu_present(&platform_bus_type))
>>> +		bus_set_iommu(&platform_bus_type, &ipmmu_ops);
>>
>> With this code, if error occurs, it's hidden.
>>
>> I think it should be like below,
>>
>>> +	ret = bus_set_iommu(&platform_bus_type, &ipmmu_ops);
>>> +	if (ret < 0)
>>> +		return ret;
>>
>> In this case, if error occurs, -EBUSY is returned.
>> It's easier for troubleshooting the issue.
>>
>> How do you think ?
> 
> I agree that we have a problem, but the problem is broader than this. Only one 
> IOMMU type can be associated with a given bus, so things will break as soon as 
> we will compile multiple IOMMU drivers in a multiplatform kernel. I'd like to 
> fix this properly, but it requires IOMMU framework changes, and thus time. In 
> the meantime we could apply your proposed modification, but it needs an 
> additional platform_driver_unregister() call in the bus_set_iommu() error 
> path.
> 

WARNING: multiple messages have this Message-ID (diff)
From: Khiem Nguyen <khiem.nguyen.xt@renesas.com>
To: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: khiem.nguyen.xt@renesas.com,
	Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>,
	iommu@lists.linux-foundation.org, linux-sh@vger.kernel.org,
	Joerg Roedel <joro@8bytes.org>
Subject: Re: [PATCH v3] iommu: Add driver for Renesas VMSA-compatible IPMMU
Date: Wed, 09 Jul 2014 23:20:25 +0000	[thread overview]
Message-ID: <53BDCE39.1070306@renesas.com> (raw)
In-Reply-To: <1837932.hUVa08Puz4@avalon>

Hi Laurent,

Thanks for your explanation.

I'm fine with current situation. 
I have also checked other drivers and they did the same.
As you said, let's improve this driver when the time comes.

Thanks.

Best regards,
KHIEM Nguyen

On 6/4/2014 2:39 AM, Laurent Pinchart wrote:
> Hi,
> 
> On Tuesday 03 June 2014 13:57:38 Khiem Nguyen wrote:
>> Hi Laurent,
>>
>> Thanks for the patch.
>>
>>> +	if (!iommu_present(&platform_bus_type))
>>> +		bus_set_iommu(&platform_bus_type, &ipmmu_ops);
>>
>> With this code, if error occurs, it's hidden.
>>
>> I think it should be like below,
>>
>>> +	ret = bus_set_iommu(&platform_bus_type, &ipmmu_ops);
>>> +	if (ret < 0)
>>> +		return ret;
>>
>> In this case, if error occurs, -EBUSY is returned.
>> It's easier for troubleshooting the issue.
>>
>> How do you think ?
> 
> I agree that we have a problem, but the problem is broader than this. Only one 
> IOMMU type can be associated with a given bus, so things will break as soon as 
> we will compile multiple IOMMU drivers in a multiplatform kernel. I'd like to 
> fix this properly, but it requires IOMMU framework changes, and thus time. In 
> the meantime we could apply your proposed modification, but it needs an 
> additional platform_driver_unregister() call in the bus_set_iommu() error 
> path.
> 

  reply	other threads:[~2014-07-09 23:20 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-02 10:47 [PATCH v3] iommu: Add driver for Renesas VMSA-compatible IPMMU Laurent Pinchart
2014-04-02 10:47 ` Laurent Pinchart
2014-04-09 10:43 ` Laurent Pinchart
2014-04-09 10:43   ` Laurent Pinchart
2014-04-09 10:57   ` Joerg Roedel
2014-04-09 10:57     ` Joerg Roedel
2014-04-09 10:58     ` Laurent Pinchart
2014-04-09 11:00       ` Laurent Pinchart
     [not found]     ` <20140409105703.GV13491-zLv9SwRftAIdnm+yROfE0A@public.gmane.org>
2014-04-17 10:14       ` Laurent Pinchart
2014-04-17 10:14         ` Laurent Pinchart
2014-05-02 19:46         ` Laurent Pinchart
2014-05-02 19:46           ` Laurent Pinchart
2014-05-13 17:55 ` Joerg Roedel
2014-05-13 17:55   ` Joerg Roedel
2014-05-13 21:04   ` Laurent Pinchart
2014-05-13 21:04     ` Laurent Pinchart
2014-05-13 22:00     ` Joerg Roedel
2014-05-13 22:00       ` Joerg Roedel
2014-05-15 10:16       ` Laurent Pinchart
2014-05-15 10:16         ` Laurent Pinchart
2014-06-03  4:57 ` Khiem Nguyen
2014-06-03  4:57   ` Khiem Nguyen
     [not found]   ` <538D55C2.3090209-zM6kxYcvzFBBDgjK7y7TUQ@public.gmane.org>
2014-06-03 17:39     ` Laurent Pinchart
2014-06-03 17:39       ` Laurent Pinchart
2014-07-09 23:20       ` Khiem Nguyen [this message]
2014-07-09 23:20         ` Khiem Nguyen

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=53BDCE39.1070306@renesas.com \
    --to=khiem.nguyen.xt@renesas.com \
    --cc=iommu@lists.linux-foundation.org \
    --cc=joro@8bytes.org \
    --cc=laurent.pinchart+renesas@ideasonboard.com \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-sh@vger.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.