Re: [PATCH 2/2] ARM: Samsung: update/rewrite Samsung SYSMMU (IOMMU) driver

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

 



Hi Marek,

On Fri, Sep 2, 2011 at 4:56 PM, Marek Szyprowski
<m.szyprowski@xxxxxxxxxxx> wrote:
...
>  arch/arm/plat-s5p/Kconfig                      |   21 +-
>  arch/arm/plat-s5p/include/plat/sysmmu.h        |  119 ++--
>  arch/arm/plat-s5p/sysmmu.c                     |  855 ++++++++++++++++++------

Please move the driver to drivers/iommu/, where all other IOMMU API users sit.

...
> diff --git a/arch/arm/plat-s5p/Kconfig b/arch/arm/plat-s5p/Kconfig
...
> +config IOMMU_API
> +       bool

You don't need this anymore: this is already part of drivers/iommu/Kconfig.

> +static int s5p_sysmmu_unmap(struct iommu_domain *domain, unsigned long iova,
> +                           int gfp_order)
>  {
...
> +       if (SZ_1M == len) {
> +               if (!page_1m(flpt_va))
> +                       bug_unmapping_prohibited(iova, len);
..
> +       } else if (SZ_16M == len) {
> +               int i;
> +               /* first loop to verify it actually is 16M mapping */
> +               for (i = 0; i < 16; ++i)
> +                       if (!page_16m(flpt_va + 4 * i))
> +                               bug_unmapping_prohibited(iova, len);

Actually these are not bugs; iommu drivers need to unmap the page they
find in iova, and return the page size that was actually unmapped: you
may well receive a page size that is different from the page that maps
iova.

...
> +
> +       return 0;

On success, need to return the size (in page order) of the page that
was unmapped.

Regards,
Ohad.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]