Lines Matching +full:page +full:- +full:offset
1 // SPDX-License-Identifier: GPL-2.0
2 // Copyright (C) 2018 Hangzhou C-SKY Microsystems co.,ltd.
5 #include <linux/dma-map-ops.h>
17 struct page *page = phys_to_page(paddr); in cache_op() local
18 void *start = __va(page_to_phys(page)); in cache_op()
19 unsigned long offset = offset_in_page(paddr); in cache_op() local
25 if (offset + len > PAGE_SIZE) in cache_op()
26 len = PAGE_SIZE - offset; in cache_op()
28 if (PageHighMem(page)) { in cache_op()
29 start = kmap_atomic(page); in cache_op()
31 fn((unsigned long)start + offset, in cache_op()
32 (unsigned long)start + offset + len); in cache_op()
36 fn((unsigned long)start + offset, in cache_op()
37 (unsigned long)start + offset + len); in cache_op()
39 offset = 0; in cache_op()
41 page++; in cache_op()
43 left -= len; in cache_op()
49 memset((void *)start, 0, end - start); in dma_wbinv_set_zero_range()
53 void arch_dma_prep_coherent(struct page *page, size_t size) in arch_dma_prep_coherent() argument
55 cache_op(page_to_phys(page), size, dma_wbinv_set_zero_range); in arch_dma_prep_coherent()