1 // SPDX-License-Identifier: GPL-2.0-only
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>
9 #include <linux/kernel.h>
10 #include <linux/string.h>
11 #include <linux/types.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
);