Re: Exynos IOMMU driver doesn't work?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 9 January 2015 at 23:34, Javier Martinez Canillas
<javier@xxxxxxxxxxxx> wrote:
> [adding Marek, Sjoerd and Joonyoung that were discussing about iommu
> support in another thread]

Thank you Javier.

>
> Hello Hongbo,
>
> On Fri, Jan 9, 2015 at 8:31 AM, Hongbo Zhang <hongbo.zhang@xxxxxxxxxx> wrote:
>> Add linux-samsung-soc@xxxxxxxxxxxxxxx mailing list.
>>
>> On 7 January 2015 at 18:31, Hongbo Zhang <hongbo.zhang@xxxxxxxxxx> wrote:
>>> Hi Cho KyongHo, Joerg et al,
>>> I found the latest Exynos IOMMU driver doesn't work, the line 481:
>>> BUG_ON(!has_sysmmu(dev));
>>> in function __exynos_sysmmu_enable() in file exynos-iommu.c triggers
>>> kernel panic.
>>>
>>> Then I found the dev->archdata.iommu isn't initialized at all, it
>>> should be the root cause.
>>>
>
> That's correct, I found the same the other day since and thought about
> posting a patch to return -ENODEV if !has_sysmmu(dev) instead to avoid
> the driver to panic the kernel. But then I realized this is already
> fixed in Marek's "[PATCH v3 00/19] Exynos SYSMMU (IOMMU) integration
> with DT and DMA-mapping subsystem" series [0].
>
>>> Another problem is this driver is added support of device tree, but
>>> there is no device tree nodes in the dts file, so I had to search from
>>> internet and added those nodes manually.
>>>
>>> I've found these links of v12 and v13 patches
>>> https://lkml.org/lkml/2014/4/27/171
>>> https://lkml.org/lkml/2014/5/12/34
>>> patch v13 was merged into mainline kernel, but as a part of v12, it
>>> isn't complete and doesn't work alone, eg dts nodes are missing.
>>> (I didn't research much dev->archdata.iommu initialization error is
>>> introduced by which patch, but it seems in very old codes there is no
>>> such problem)
>>>
>
> Yes, please take a look to Marek series [0]. Keep in mind that the
> series does not support all sysmmu revisions so IOMMU is not supported
> for some SoCs (e.g: Exynos5). Support for that is planned once that
> series land into mainline though [1].
>
> May I ask why are you interested in IOMMU support on Exynos? I'm
> asking because the reason why I tried to enable IOMMU support (and hit
> the same issue) was to try using the Exynos DRM HDMI driver with IOMMU
> since I found that HDMI is working on the downstream Samsung kernel
> [2] that has IOMMU support, but is not working on mainline.

Because I am testing vfio-platform patches, IOMMU is used in this case.
http://www.spinics.net/lists/kvm-arm/msg12445.html

And I am glad to find a working kernel as you pointed out, then I
found these two commits in this tree may solve my problem:
841a7fe TEMP/TO POST: iommu: exynos: Add "mmu-masters" support
bd7e4c7 TEMP/TO POST: ARM: dts: add System MMU nodes of Exynos SoCs

>
> At the end the HDMI problem seems to not be IOMMU related but
> something with the power domains and clocking but in case you are
> facing the same issue, you may be interested in that discussion [3].
>
> Best regards,
> Javier
>
> [0]: http://www.spinics.net/lists/linux-samsung-soc/msg39168.html
> [1]: http://www.spinics.net/lists/linux-samsung-soc/msg39980.html
> [2]: git@xxxxxxxxxx:exynos-reference/kernel.git
> [3]: http://www.spinics.net/lists/linux-samsung-soc/msg40828.html
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux SoC Development]     [Linux Rockchip Development]     [Linux USB Development]     [Video for Linux]     [Linux Audio Users]     [Linux SCSI]     [Yosemite News]

  Powered by Linux