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

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

 



On Tue, Sep 6, 2011 at 1:27 PM, KyongHo Cho <pullip.cho@xxxxxxxxxxx> wrote:
> On Fri, Sep 2, 2011 at 10:56 PM, Marek Szyprowski
>> +static int s5p_sysmmu_map(struct iommu_domain *domain, unsigned long iova,
>> +                         phys_addr_t paddr, int gfp_order, int prot)
>> +{
>> +       struct s5p_sysmmu_domain *s5p_domain = domain->priv;
>> +       int flpt_idx = flpt_index(iova);
>> +       size_t len = 0x1000UL << gfp_order;
>> +       void *flpt_va, *slpt_va;
>> +
>> +       if (len != SZ_16M && len != SZ_1M && len != SZ_64K && len != SZ_4K) {
>> +               sysmmu_debug(3, "bad order: %d\n", gfp_order);
>> +               return -EINVAL;
>> +       }
>
> Likewise, I think this driver need to support mapping 128KiB aligned,
> 128KiB physical memory, for example.
>
> Otherwise, it is somewhat restrictive than we expect.

That's actually OK, because the IOMMU core will split physically
contiguous memory regions to pages on behalf of its drivers (drivers
will just have to advertise the page sizes their hardware supports);
this way you don't duplicate the logic in every IOMMU driver.

Take a look:

http://www.spinics.net/lists/linux-omap/msg56660.html

--
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]