linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Cohen <dacohen@gmail.com>
To: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Sakari Ailus <sakari.ailus@maxwell.research.nokia.com>,
	"Ramirez Luna, Omar" <omar.ramirez@ti.com>,
	"linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>,
	"Doyu Hiroshi (Nokia-D/Helsinki)" <hiroshi.doyu@nokia.com>,
	Cohen David Abraham <david.cohen@nokia.com>
Subject: Re: [PATCH 0/4] iommu: Prevent oops in iommu_get() and while arch_iommu is in use
Date: Wed, 30 Mar 2011 18:50:17 +0300	[thread overview]
Message-ID: <BANLkTi=SocUuraFrX04LEhei1foJ8DDOHw@mail.gmail.com> (raw)
In-Reply-To: <201103301556.56822.laurent.pinchart@ideasonboard.com>

On Wed, Mar 30, 2011 at 4:56 PM, Laurent Pinchart
<laurent.pinchart@ideasonboard.com> wrote:
> On Wednesday 30 March 2011 15:50:37 Sakari Ailus wrote:
>> Laurent Pinchart wrote:
>> > Hi Sakari,
>>
>> Hi Laurent,
>>
>> > On Wednesday 30 March 2011 10:16:56 Sakari Ailus wrote:
>> >> Laurent Pinchart wrote:
>> >>> On Friday 25 March 2011 20:37:55 Ramirez Luna, Omar wrote:
>> >>>> On Fri, Mar 25, 2011 at 10:13 AM, Sakari Ailus wrote:
>> >>>>> Hi,
>> >>>>>
>> >>>>> This patchset is aimed to fix a problem in arch_iommu implementation
>> >>>>> references. When an actual arch_iommu implementation is not loaded
>> >>>>> while iommu_get() is being called results to a kernel oops, as well
>> >>>>> as removing an arch_iommu implementation which is in use.
>> >>>>
>> >>>> How about fixing the dependency instead? Right now iommu2 depends on
>> >>>> iommu because of the calls to
>> >>>> install_iommu_arch/uninstall_iommu_arch... we should change that
>> >>>> dependency to iommu depend on iommu2. Something like iommu (plat)
>> >>>> querying iommu2 (mach) for devices to install.
>> >>>
>> >>> The reason why iommu depends on iommu2 and not the other way around is
>> >>> because several mach-specific iommu implementations should be able to
>> >>> coexist in the same kernel. The right one should be loaded at runtime.
>> >>>
>> >>> I think that Sakari's patches correcty fix the problems he noticed.
>> >>> However, they won't fix one basic issue, which is that the iommu2
>> >>> module won't be automatically pulled in when the omap3isp module is
>> >>> loaded. The omap3isp driver will then fail to probe the device. That's
>> >>> better than crashing though.
>> >>
>> >> One option would be to specify the name of the module in the platform
>> >> data and request_module() that in omap_iommu_probe(). This would solve
>> >> the issue, not sure how pretty is this though.
>> >
>> > Do we need that ? My understanding is that a machine will need a single
>> > mach- specific iommu implementation only. Drivers shouldn't need to care
>> > about that.
>>
>> Well, no more than that there would have to be a driver for the IOMMU
>> for that very hardware.
>>
>> > The iommu implementation should be automatically selected based on the
>> > machine time.
>>
>> Machine type?
>>
>> I agree, but where is the selection made?
>
> The selection can be made by board code, or by the iommu implementations
> themselves if they're compiled in.

I prefer the first option. The second one will make the current
implementation be even more OMAP-only.
We have basically 3 layers:
IOVMM, IOMMU_GENERIC and IOMMU_SPECIFIC. The middle one should be
generic and don't care about machine types. The later one can be
handled by board code as it's machine specific and, for most of the
cases, I see no reason to let any other implementation besides the
machine type's to be loaded.

But the generic layer should not depend on any specific one. If
somebody decides to load the specific layer after the generic one, it
cannot be a problem.

Regards,

David

>
> --
> Regards,
>
> Laurent Pinchart
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2011-03-30 15:50 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-25 15:13 [PATCH 0/4] iommu: Prevent oops in iommu_get() and while arch_iommu is in use Sakari Ailus
2011-03-25 19:37 ` Ramirez Luna, Omar
2011-03-27 17:27   ` Sakari Ailus
2011-03-28  1:42     ` Ramirez Luna, Omar
2011-03-28  9:20       ` David Cohen
2011-03-29 15:44       ` Laurent Pinchart
2011-03-28  9:02     ` David Cohen
2011-03-29 15:32   ` Laurent Pinchart
2011-03-30  8:16     ` Sakari Ailus
2011-03-30  9:37       ` Laurent Pinchart
2011-03-30 13:50         ` Sakari Ailus
2011-03-30 13:56           ` Laurent Pinchart
2011-03-30 15:50             ` David Cohen [this message]
2011-04-04 14:05               ` Laurent Pinchart
2011-04-05  9:03                 ` Sakari Ailus
2011-04-05 11:23                   ` Laurent Pinchart
2011-04-05 11:54                     ` David Cohen
2011-04-06  8:55                       ` Laurent Pinchart
2011-04-05 15:20                     ` Sakari Ailus
2011-09-24 13:44     ` Steve Sakoman
2011-09-26 16:19       ` Laurent Pinchart
  -- strict thread matches above, loose matches on Subject: below --
2011-03-25 15:17 Sakari Ailus
2011-03-25 15:44 ` David Cohen

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='BANLkTi=SocUuraFrX04LEhei1foJ8DDOHw@mail.gmail.com' \
    --to=dacohen@gmail.com \
    --cc=david.cohen@nokia.com \
    --cc=hiroshi.doyu@nokia.com \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-omap@vger.kernel.org \
    --cc=omar.ramirez@ti.com \
    --cc=sakari.ailus@maxwell.research.nokia.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 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).