hc
2023-12-09 b22da3d8526a935aa31e086e63f60ff3246cb61c
kernel/arch/arm64/mm/flush.c
....@@ -1,20 +1,9 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * Based on arch/arm/mm/flush.c
34 *
45 * Copyright (C) 1995-2002 Russell King
56 * 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/>.
187 */
198
209 #include <linux/export.h>
....@@ -66,9 +55,10 @@
6655 {
6756 struct page *page = pte_page(pte);
6857
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
+ }
7262 }
7363 EXPORT_SYMBOL_GPL(__sync_icache_dcache);
7464
....@@ -87,7 +77,6 @@
8777 /*
8878 * Additional functions defined in assembly.
8979 */
90
-EXPORT_SYMBOL(flush_cache_all);
9180 EXPORT_SYMBOL(__flush_icache_range);
9281
9382 #ifdef CONFIG_ARCH_HAS_PMEM_API