diff options
author | Dave Airlie <airlied@starflyer.(none)> | 2005-10-20 08:21:33 (GMT) |
---|---|---|
committer | Dave Airlie <airlied@linux.ie> | 2005-10-20 08:21:33 (GMT) |
commit | 312f5726055534be1dc9dd369be13aabd2943fcb (patch) | |
tree | 29394a3f83b4952a73b36a4aa962dfeda839e9db /arch/ppc/kernel/dma-mapping.c | |
parent | 3d5efad953c6d5ba11d5bcb584ef8e906f953a73 (diff) | |
parent | 93918e9afc76717176e9e114e79cdbb602a45ae8 (diff) | |
download | linux-312f5726055534be1dc9dd369be13aabd2943fcb.tar.xz |
merge Linus head tree into my drm tree and fix up conflicts
Diffstat (limited to 'arch/ppc/kernel/dma-mapping.c')
-rw-r--r-- | arch/ppc/kernel/dma-mapping.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/ppc/kernel/dma-mapping.c b/arch/ppc/kernel/dma-mapping.c index b566d98..8edee80 100644 --- a/arch/ppc/kernel/dma-mapping.c +++ b/arch/ppc/kernel/dma-mapping.c @@ -401,10 +401,10 @@ EXPORT_SYMBOL(__dma_sync); static inline void __dma_sync_page_highmem(struct page *page, unsigned long offset, size_t size, int direction) { - size_t seg_size = min((size_t)PAGE_SIZE, size) - offset; + size_t seg_size = min((size_t)(PAGE_SIZE - offset), size); size_t cur_size = seg_size; unsigned long flags, start, seg_offset = offset; - int nr_segs = PAGE_ALIGN(size + (PAGE_SIZE - offset))/PAGE_SIZE; + int nr_segs = 1 + ((size - seg_size) + PAGE_SIZE - 1)/PAGE_SIZE; int seg_nr = 0; local_irq_save(flags); |