> static inline unsigned long iommu_num_pages(unsigned long addr,> unsigned long len,> unsigned long io_page_size)> {> unsigned long size = (addr & (io_page_size - 1)) + len;>> return DIV_ROUND_UP(size, io_page_size);> }> >> That doesn't look right to me...>> The powerpc iommu code at least uses that with an addr which may not be> page aligned (ie, result of sg_virt() which include the offset).>> The above code will align the start before adding the len which is wrong