xref: /linux/arch/loongarch/include/asm/fixmap.h (revision 6c8c1406)
1 /* SPDX-License-Identifier: GPL-2.0 */
2 /*
3  * fixmap.h: compile-time virtual memory allocation
4  *
5  * Copyright (C) 2020-2022 Loongson Technology Corporation Limited
6  */
7 
8 #ifndef _ASM_FIXMAP_H
9 #define _ASM_FIXMAP_H
10 
11 #define NR_FIX_BTMAPS 64
12 
13 enum fixed_addresses {
14 	FIX_HOLE,
15 	FIX_EARLYCON_MEM_BASE,
16 	__end_of_fixed_addresses
17 };
18 
19 #define FIXADDR_SIZE	(__end_of_fixed_addresses << PAGE_SHIFT)
20 #define FIXADDR_START	(FIXADDR_TOP - FIXADDR_SIZE)
21 #define FIXMAP_PAGE_IO	PAGE_KERNEL_SUC
22 
23 extern void __set_fixmap(enum fixed_addresses idx,
24 			 phys_addr_t phys, pgprot_t flags);
25 
26 #include <asm-generic/fixmap.h>
27 
28 #endif
29