hc
2023-12-11 1f93a7dfd1f8d5ff7a5c53246c7534fe2332d6f4
kernel/arch/sh/mm/kmap.c
....@@ -1,10 +1,9 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * arch/sh/mm/kmap.c
34 *
45 * Copyright (C) 1999, 2000, 2002 Niibe Yutaka
56 * Copyright (C) 2002 - 2009 Paul Mundt
6
- *
7
- * Released under the terms of the GNU GPL v2.0.
87 */
98 #include <linux/mm.h>
109 #include <linux/init.h>
....@@ -15,9 +14,6 @@
1514 #include <asm/mmu_context.h>
1615 #include <asm/cacheflush.h>
1716
18
-#define kmap_get_fixmap_pte(vaddr) \
19
- pte_offset_kernel(pmd_offset(pud_offset(pgd_offset_k(vaddr), (vaddr)), (vaddr)), (vaddr))
20
-
2117 static pte_t *kmap_coherent_pte;
2218
2319 void __init kmap_coherent_init(void)
....@@ -26,7 +22,7 @@
2622
2723 /* cache the first coherent kmap pte */
2824 vaddr = __fix_to_virt(FIX_CMAP_BEGIN);
29
- kmap_coherent_pte = kmap_get_fixmap_pte(vaddr);
25
+ kmap_coherent_pte = virt_to_kpte(vaddr);
3026 }
3127
3228 void *kmap_coherent(struct page *page, unsigned long addr)