xref: /openbmc/linux/arch/xtensa/include/asm/fixmap.h (revision f5c27da4)
1 /*
2  * fixmap.h: compile-time virtual memory allocation
3  *
4  * This file is subject to the terms and conditions of the GNU General Public
5  * License.  See the file "COPYING" in the main directory of this archive
6  * for more details.
7  *
8  * Copyright (C) 1998 Ingo Molnar
9  *
10  * Support of BIGMEM added by Gerhard Wichert, Siemens AG, July 1999
11  */
12 
13 #ifndef _ASM_FIXMAP_H
14 #define _ASM_FIXMAP_H
15 
16 #ifdef CONFIG_HIGHMEM
17 #include <linux/threads.h>
18 #include <linux/pgtable.h>
19 #include <asm/kmap_size.h>
20 
21 /* The map slots for temporary mappings via kmap_atomic/local(). */
22 enum fixed_addresses {
23 	FIX_KMAP_BEGIN,
24 	FIX_KMAP_END = FIX_KMAP_BEGIN +
25 		(KM_MAX_IDX * NR_CPUS * DCACHE_N_COLORS) - 1,
26 	__end_of_fixed_addresses
27 };
28 
29 #define FIXADDR_END     (XCHAL_KSEG_CACHED_VADDR - PAGE_SIZE)
30 #define FIXADDR_SIZE	(__end_of_fixed_addresses << PAGE_SHIFT)
31 /* Enforce that FIXADDR_START is PMD aligned to handle cache aliasing */
32 #define FIXADDR_START	((FIXADDR_END - FIXADDR_SIZE) & PMD_MASK)
33 #define FIXADDR_TOP	(FIXADDR_START + FIXADDR_SIZE - PAGE_SIZE)
34 
35 #include <asm-generic/fixmap.h>
36 
37 #endif /* CONFIG_HIGHMEM */
38 #endif
39