perf tools: Don't clone maps from parent when synthesizing forks
[linux/fpc-iii.git] / arch / nds32 / include / asm / highmem.h
blob425d546cb05912d8723bfe85dccc24e5b5bd8b41
1 // SPDX-License-Identifier: GPL-2.0
2 // Copyright (C) 2005-2017 Andes Technology Corporation
4 #ifndef _ASM_HIGHMEM_H
5 #define _ASM_HIGHMEM_H
7 #include <asm/proc-fns.h>
8 #include <asm/kmap_types.h>
9 #include <asm/fixmap.h>
10 #include <asm/pgtable.h>
13 * Right now we initialize only a single pte table. It can be extended
14 * easily, subsequent pte tables have to be allocated in one physical
15 * chunk of RAM.
18 * Ordering is (from lower to higher memory addresses):
20 * high_memory
21 * Persistent kmap area
22 * PKMAP_BASE
23 * fixed_addresses
24 * FIXADDR_START
25 * FIXADDR_TOP
26 * Vmalloc area
27 * VMALLOC_START
28 * VMALLOC_END
30 #define PKMAP_BASE ((FIXADDR_START - PGDIR_SIZE) & (PGDIR_MASK))
31 #define LAST_PKMAP PTRS_PER_PTE
32 #define LAST_PKMAP_MASK (LAST_PKMAP - 1)
33 #define PKMAP_NR(virt) (((virt) - (PKMAP_BASE)) >> PAGE_SHIFT)
34 #define PKMAP_ADDR(nr) (PKMAP_BASE + ((nr) << PAGE_SHIFT))
35 #define kmap_prot PAGE_KERNEL
37 static inline void flush_cache_kmaps(void)
39 cpu_dcache_wbinval_all();
42 /* declarations for highmem.c */
43 extern unsigned long highstart_pfn, highend_pfn;
45 extern pte_t *pkmap_page_table;
47 extern void *kmap_high(struct page *page);
48 extern void kunmap_high(struct page *page);
50 extern void kmap_init(void);
53 * The following functions are already defined by <linux/highmem.h>
54 * when CONFIG_HIGHMEM is not set.
56 #ifdef CONFIG_HIGHMEM
57 extern void *kmap(struct page *page);
58 extern void kunmap(struct page *page);
59 extern void *kmap_atomic(struct page *page);
60 extern void __kunmap_atomic(void *kvaddr);
61 extern void *kmap_atomic_pfn(unsigned long pfn);
62 extern struct page *kmap_atomic_to_page(void *ptr);
63 #endif
65 #endif