| .. | .. |
|---|
| 1 | +/* SPDX-License-Identifier: GPL-2.0-or-later */ |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * OpenRISC Linux |
|---|
| 3 | 4 | * |
|---|
| .. | .. |
|---|
| 8 | 9 | * OpenRISC implementation: |
|---|
| 9 | 10 | * Copyright (C) Jan Henrik Weinstock <jan.weinstock@rwth-aachen.de> |
|---|
| 10 | 11 | * et al. |
|---|
| 11 | | - * |
|---|
| 12 | | - * This program is free software; you can redistribute it and/or modify |
|---|
| 13 | | - * it under the terms of the GNU General Public License as published by |
|---|
| 14 | | - * the Free Software Foundation; either version 2 of the License, or |
|---|
| 15 | | - * (at your option) any later version. |
|---|
| 16 | 12 | */ |
|---|
| 17 | 13 | |
|---|
| 18 | 14 | #ifndef __ASM_CACHEFLUSH_H |
|---|
| .. | .. |
|---|
| 66 | 62 | clear_bit(PG_dc_clean, &page->flags); |
|---|
| 67 | 63 | } |
|---|
| 68 | 64 | |
|---|
| 69 | | -/* |
|---|
| 70 | | - * Other interfaces are not required since we do not have virtually |
|---|
| 71 | | - * indexed or tagged caches. So we can use the default here. |
|---|
| 72 | | - */ |
|---|
| 73 | | -#define flush_cache_all() do { } while (0) |
|---|
| 74 | | -#define flush_cache_mm(mm) do { } while (0) |
|---|
| 75 | | -#define flush_cache_dup_mm(mm) do { } while (0) |
|---|
| 76 | | -#define flush_cache_range(vma, start, end) do { } while (0) |
|---|
| 77 | | -#define flush_cache_page(vma, vmaddr, pfn) do { } while (0) |
|---|
| 78 | | -#define flush_dcache_mmap_lock(mapping) do { } while (0) |
|---|
| 79 | | -#define flush_dcache_mmap_unlock(mapping) do { } while (0) |
|---|
| 80 | | -#define flush_icache_range(start, end) do { } while (0) |
|---|
| 81 | | -#define flush_icache_page(vma, pg) do { } while (0) |
|---|
| 82 | | -#define flush_icache_user_range(vma, pg, adr, len) do { } while (0) |
|---|
| 83 | | -#define flush_cache_vmap(start, end) do { } while (0) |
|---|
| 84 | | -#define flush_cache_vunmap(start, end) do { } while (0) |
|---|
| 65 | +#define flush_icache_user_page(vma, page, addr, len) \ |
|---|
| 66 | +do { \ |
|---|
| 67 | + if (vma->vm_flags & VM_EXEC) \ |
|---|
| 68 | + sync_icache_dcache(page); \ |
|---|
| 69 | +} while (0) |
|---|
| 85 | 70 | |
|---|
| 86 | | -#define copy_to_user_page(vma, page, vaddr, dst, src, len) \ |
|---|
| 87 | | - do { \ |
|---|
| 88 | | - memcpy(dst, src, len); \ |
|---|
| 89 | | - if (vma->vm_flags & VM_EXEC) \ |
|---|
| 90 | | - sync_icache_dcache(page); \ |
|---|
| 91 | | - } while (0) |
|---|
| 92 | | - |
|---|
| 93 | | -#define copy_from_user_page(vma, page, vaddr, dst, src, len) \ |
|---|
| 94 | | - memcpy(dst, src, len) |
|---|
| 71 | +#include <asm-generic/cacheflush.h> |
|---|
| 95 | 72 | |
|---|
| 96 | 73 | #endif /* __ASM_CACHEFLUSH_H */ |
|---|