.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
---|
1 | 2 | /* |
---|
2 | 3 | * Based on arch/arm/mm/flush.c |
---|
3 | 4 | * |
---|
4 | 5 | * Copyright (C) 1995-2002 Russell King |
---|
5 | 6 | * Copyright (C) 2012 ARM Ltd. |
---|
6 | | - * |
---|
7 | | - * This program is free software; you can redistribute it and/or modify |
---|
8 | | - * it under the terms of the GNU General Public License version 2 as |
---|
9 | | - * published by the Free Software Foundation. |
---|
10 | | - * |
---|
11 | | - * This program is distributed in the hope that it will be useful, |
---|
12 | | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
13 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
14 | | - * GNU General Public License for more details. |
---|
15 | | - * |
---|
16 | | - * You should have received a copy of the GNU General Public License |
---|
17 | | - * along with this program. If not, see <http://www.gnu.org/licenses/>. |
---|
18 | 7 | */ |
---|
19 | 8 | |
---|
20 | 9 | #include <linux/export.h> |
---|
.. | .. |
---|
66 | 55 | { |
---|
67 | 56 | struct page *page = pte_page(pte); |
---|
68 | 57 | |
---|
69 | | - if (!test_and_set_bit(PG_dcache_clean, &page->flags)) |
---|
70 | | - sync_icache_aliases(page_address(page), |
---|
71 | | - PAGE_SIZE << compound_order(page)); |
---|
| 58 | + if (!test_bit(PG_dcache_clean, &page->flags)) { |
---|
| 59 | + sync_icache_aliases(page_address(page), page_size(page)); |
---|
| 60 | + set_bit(PG_dcache_clean, &page->flags); |
---|
| 61 | + } |
---|
72 | 62 | } |
---|
73 | 63 | EXPORT_SYMBOL_GPL(__sync_icache_dcache); |
---|
74 | 64 | |
---|
.. | .. |
---|
87 | 77 | /* |
---|
88 | 78 | * Additional functions defined in assembly. |
---|
89 | 79 | */ |
---|
90 | | -EXPORT_SYMBOL(flush_cache_all); |
---|
91 | 80 | EXPORT_SYMBOL(__flush_icache_range); |
---|
92 | 81 | |
---|
93 | 82 | #ifdef CONFIG_ARCH_HAS_PMEM_API |
---|