lkml.org 
[lkml]   [2008]   [Sep]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/4] add is_buffer_dma_capable helper function
On Tue, Sep 09, 2008 at 09:17:05AM -0700, Luck, Tony wrote:
> +static inline int is_buffer_dma_capable(u64 mask, dma_addr_t addr, size_t size)
> +{
> + return addr + size <= mask;
> +}
>
> Do we care about wrap-around (e.g. addr=0xffffffffffffffff size=2)?

I don't think so. The current code does not care about it and if it
happens its a bug in the iommu implementation.

Joerg

--
| AMD Saxony Limited Liability Company & Co. KG
Operating | Wilschdorfer Landstr. 101, 01109 Dresden, Germany
System | Register Court Dresden: HRA 4896
Research | General Partner authorized to represent:
Center | AMD Saxony LLC (Wilmington, Delaware, US)
| General Manager of AMD Saxony LLC: Dr. Hans-R. Deppe, Thomas McCoy



\
 
 \ /
  Last update: 2008-09-09 18:25    [W:0.049 / U:0.708 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site