Lines Matching refs:ua
33 u64 ua; /* userspace address */ member
56 static long mm_iommu_do_alloc(struct mm_struct *mm, unsigned long ua, in mm_iommu_do_alloc() argument
91 mem->pageshift = __ffs(ua | (entries << PAGE_SHIFT)); in mm_iommu_do_alloc()
106 ret = get_user_pages(ua + (entry << PAGE_SHIFT), n, in mm_iommu_do_alloc()
145 mem->ua = ua; in mm_iommu_do_alloc()
152 if ((mem2->ua < (ua + (entries << PAGE_SHIFT))) && in mm_iommu_do_alloc()
153 (ua < (mem2->ua + in mm_iommu_do_alloc()
183 long mm_iommu_new(struct mm_struct *mm, unsigned long ua, unsigned long entries, in mm_iommu_new() argument
186 return mm_iommu_do_alloc(mm, ua, entries, MM_IOMMU_TABLE_INVALID_HPA, in mm_iommu_new()
191 long mm_iommu_newdev(struct mm_struct *mm, unsigned long ua, in mm_iommu_newdev() argument
195 return mm_iommu_do_alloc(mm, ua, entries, dev_hpa, pmem); in mm_iommu_newdev()
285 unsigned long ua, unsigned long size) in mm_iommu_lookup() argument
290 if ((mem->ua <= ua) && in mm_iommu_lookup()
291 (ua + size <= mem->ua + in mm_iommu_lookup()
303 unsigned long ua, unsigned long size) in mm_iommu_lookup_rm() argument
309 if ((mem->ua <= ua) && in mm_iommu_lookup_rm()
310 (ua + size <= mem->ua + in mm_iommu_lookup_rm()
321 unsigned long ua, unsigned long entries) in mm_iommu_get() argument
328 if ((mem->ua == ua) && (mem->entries == entries)) { in mm_iommu_get()
342 unsigned long ua, unsigned int pageshift, unsigned long *hpa) in mm_iommu_ua_to_hpa() argument
344 const long entry = (ua - mem->ua) >> PAGE_SHIFT; in mm_iommu_ua_to_hpa()
354 *hpa = mem->dev_hpa + (ua - mem->ua); in mm_iommu_ua_to_hpa()
359 *hpa = (*va & MM_IOMMU_TABLE_GROUP_PAGE_MASK) | (ua & ~PAGE_MASK); in mm_iommu_ua_to_hpa()
366 unsigned long ua, unsigned int pageshift, unsigned long *hpa) in mm_iommu_ua_to_hpa_rm() argument
368 const long entry = (ua - mem->ua) >> PAGE_SHIFT; in mm_iommu_ua_to_hpa_rm()
378 *hpa = mem->dev_hpa + (ua - mem->ua); in mm_iommu_ua_to_hpa_rm()
386 *hpa = (*pa & MM_IOMMU_TABLE_GROUP_PAGE_MASK) | (ua & ~PAGE_MASK); in mm_iommu_ua_to_hpa_rm()
391 extern void mm_iommu_ua_mark_dirty_rm(struct mm_struct *mm, unsigned long ua) in mm_iommu_ua_mark_dirty_rm() argument
398 mem = mm_iommu_lookup_rm(mm, ua, PAGE_SIZE); in mm_iommu_ua_mark_dirty_rm()
405 entry = (ua - mem->ua) >> PAGE_SHIFT; in mm_iommu_ua_mark_dirty_rm()