Merge tag 'usb-5.11-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
[linux/fpc-iii.git] / arch / microblaze / mm / consistent.c
blobb7ad4a98636d3cc70793829187233d264a0d450c
1 // SPDX-License-Identifier: GPL-2.0-only
2 /*
3 * Microblaze support for cache consistent memory.
4 * Copyright (C) 2010 Michal Simek <monstr@monstr.eu>
5 * Copyright (C) 2010 PetaLogix
6 * Copyright (C) 2005 John Williams <jwilliams@itee.uq.edu.au>
7 */
9 #include <linux/kernel.h>
10 #include <linux/string.h>
11 #include <linux/types.h>
12 #include <linux/mm.h>
13 #include <linux/init.h>
14 #include <linux/dma-map-ops.h>
15 #include <asm/cpuinfo.h>
16 #include <asm/cacheflush.h>
18 void arch_dma_prep_coherent(struct page *page, size_t size)
20 phys_addr_t paddr = page_to_phys(page);
22 flush_dcache_range(paddr, paddr + size);