[PATCH] powerpc/iommu: use iommu_num_pages() to calculate the number of iommu page
Wei Yang
weiyang at linux.vnet.ibm.com
Fri Oct 2 08:51:59 AEST 2015
On Thu, Oct 01, 2015 at 02:15:45PM +1000, Michael Ellerman wrote:
>On Thu, 2015-10-01 at 07:50 +0800, Wei Yang wrote:
>> Hmm... some comments on this one? like it or not?
>
>It sounds like it's fixing a bug, but you don't really say. Have you seen this
>fail in the wild?
Hmm... as described in the commit log, this would be a bug when
PAGE_SIZE is much smaller than IOMMU Page Size. This configuration doesn't
happen on current platform. So I didn't see this failure yet.
>
>Which commit introduced the breakage?
Hmm... maybe we could say it is 'commit d084775738b7
<powerpc/iommu: Update the generic code to use dynamic iommu page sizes>'.
>From this commit, powerpc iommu supports dynamic iommu page size.
Before this commit, the size is aligned with PAGE_SIZE, so the value after
shift would be non-zero. After this commit, when PAGE_SIZE is smaller than
the IOMMU Page Size, shift right will make the size 0.
>
>cheers
>
--
Richard Yang
Help you, Help me
More information about the Linuxppc-dev
mailing list