consistent.c (605B)
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 */ 8 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> 17 18void arch_dma_prep_coherent(struct page *page, size_t size) 19{ 20 phys_addr_t paddr = page_to_phys(page); 21 22 flush_dcache_range(paddr, paddr + size); 23}