1 // SPDX-License-Identifier: GPL-2.0
2 // Copyright (C) 2018 Hangzhou C-SKY Microsystems co.,ltd.
4 #include <linux/module.h>
5 #include <linux/highmem.h>
7 #include <linux/memblock.h>
8 #include <asm/fixmap.h>
9 #include <asm/tlbflush.h>
10 #include <asm/cacheflush.h>
12 unsigned long highstart_pfn, highend_pfn;
14 void kmap_flush_tlb(unsigned long addr)
18 EXPORT_SYMBOL(kmap_flush_tlb);
20 void __init kmap_init(void)
29 fixrange_init(vaddr, vaddr + PAGE_SIZE*LAST_PKMAP, swapper_pg_dir);
31 pgd = swapper_pg_dir + pgd_index(vaddr);
33 pmd = pmd_offset(pud, vaddr);
34 pte = pte_offset_kernel(pmd, vaddr);
35 pkmap_page_table = pte;