lkml.org 
[lkml]   [2007]   [May]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 20/32] Blackfin arch: dma_memcpy borken for > 64K
Hi Bryan,

On 5/21/07, Bryan Wu <bryan.wu@analog.com> wrote:
> -void *dma_memcpy(void *dest, const void *src, size_t size)
> +void *_dma_memcpy(void *dest, const void *src, size_t size)

Minor nitpick: the established naming convention is two underscores, not one.

> +void *dma_memcpy(void *dest, const void *src, size_t size)
> +{
> + size_t bulk;
> + size_t rest;
> + void * addr;
> +
> + bulk = (size >> 16) << 16;

I assume this is significantly faster on your architecture than:

bulk = size & ~0xFFFFUL;

which is more readable?

> + rest = size - bulk;
> + if (bulk)
> + _dma_memcpy(dest, src, bulk);
> + addr = _dma_memcpy(dest+bulk, src+bulk, rest);
> + return addr;

Does this work for 128K and up? Why?
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2007-05-21 13:29    [W:0.184 / U:1.132 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site