.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
---|
1 | 2 | /* |
---|
2 | 3 | * arch/sh/mm/kmap.c |
---|
3 | 4 | * |
---|
4 | 5 | * Copyright (C) 1999, 2000, 2002 Niibe Yutaka |
---|
5 | 6 | * Copyright (C) 2002 - 2009 Paul Mundt |
---|
6 | | - * |
---|
7 | | - * Released under the terms of the GNU GPL v2.0. |
---|
8 | 7 | */ |
---|
9 | 8 | #include <linux/mm.h> |
---|
10 | 9 | #include <linux/init.h> |
---|
.. | .. |
---|
15 | 14 | #include <asm/mmu_context.h> |
---|
16 | 15 | #include <asm/cacheflush.h> |
---|
17 | 16 | |
---|
18 | | -#define kmap_get_fixmap_pte(vaddr) \ |
---|
19 | | - pte_offset_kernel(pmd_offset(pud_offset(pgd_offset_k(vaddr), (vaddr)), (vaddr)), (vaddr)) |
---|
20 | | - |
---|
21 | 17 | static pte_t *kmap_coherent_pte; |
---|
22 | 18 | |
---|
23 | 19 | void __init kmap_coherent_init(void) |
---|
.. | .. |
---|
26 | 22 | |
---|
27 | 23 | /* cache the first coherent kmap pte */ |
---|
28 | 24 | vaddr = __fix_to_virt(FIX_CMAP_BEGIN); |
---|
29 | | - kmap_coherent_pte = kmap_get_fixmap_pte(vaddr); |
---|
| 25 | + kmap_coherent_pte = virt_to_kpte(vaddr); |
---|
30 | 26 | } |
---|
31 | 27 | |
---|
32 | 28 | void *kmap_coherent(struct page *page, unsigned long addr) |
---|