diff options
Diffstat (limited to 'arch/arm64/include/asm')
-rw-r--r-- | arch/arm64/include/asm/Kbuild | 1 | ||||
-rw-r--r-- | arch/arm64/include/asm/fixmap.h | 67 | ||||
-rw-r--r-- | arch/arm64/include/asm/io.h | 1 | ||||
-rw-r--r-- | arch/arm64/include/asm/memory.h | 2 | ||||
-rw-r--r-- | arch/arm64/include/asm/mmu.h | 1 |
5 files changed, 71 insertions, 1 deletions
diff --git a/arch/arm64/include/asm/Kbuild b/arch/arm64/include/asm/Kbuild index 4bca4923fc0b..83f71b3004a8 100644 --- a/arch/arm64/include/asm/Kbuild +++ b/arch/arm64/include/asm/Kbuild | |||
@@ -10,6 +10,7 @@ generic-y += delay.h | |||
10 | generic-y += div64.h | 10 | generic-y += div64.h |
11 | generic-y += dma.h | 11 | generic-y += dma.h |
12 | generic-y += emergency-restart.h | 12 | generic-y += emergency-restart.h |
13 | generic-y += early_ioremap.h | ||
13 | generic-y += errno.h | 14 | generic-y += errno.h |
14 | generic-y += ftrace.h | 15 | generic-y += ftrace.h |
15 | generic-y += hash.h | 16 | generic-y += hash.h |
diff --git a/arch/arm64/include/asm/fixmap.h b/arch/arm64/include/asm/fixmap.h new file mode 100644 index 000000000000..5f7bfe6df723 --- /dev/null +++ b/arch/arm64/include/asm/fixmap.h | |||
@@ -0,0 +1,67 @@ | |||
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 | * Copyright (C) 2013 Mark Salter <msalter@redhat.com> | ||
10 | * | ||
11 | * Adapted from arch/x86_64 version. | ||
12 | * | ||
13 | */ | ||
14 | |||
15 | #ifndef _ASM_ARM64_FIXMAP_H | ||
16 | #define _ASM_ARM64_FIXMAP_H | ||
17 | |||
18 | #ifndef __ASSEMBLY__ | ||
19 | #include <linux/kernel.h> | ||
20 | #include <asm/page.h> | ||
21 | |||
22 | /* | ||
23 | * Here we define all the compile-time 'special' virtual | ||
24 | * addresses. The point is to have a constant address at | ||
25 | * compile time, but to set the physical address only | ||
26 | * in the boot process. | ||
27 | * | ||
28 | * These 'compile-time allocated' memory buffers are | ||
29 | * page-sized. Use set_fixmap(idx,phys) to associate | ||
30 | * physical memory with fixmap indices. | ||
31 | * | ||
32 | */ | ||
33 | enum fixed_addresses { | ||
34 | FIX_EARLYCON_MEM_BASE, | ||
35 | __end_of_permanent_fixed_addresses, | ||
36 | |||
37 | /* | ||
38 | * Temporary boot-time mappings, used by early_ioremap(), | ||
39 | * before ioremap() is functional. | ||
40 | */ | ||
41 | #ifdef CONFIG_ARM64_64K_PAGES | ||
42 | #define NR_FIX_BTMAPS 4 | ||
43 | #else | ||
44 | #define NR_FIX_BTMAPS 64 | ||
45 | #endif | ||
46 | #define FIX_BTMAPS_SLOTS 7 | ||
47 | #define TOTAL_FIX_BTMAPS (NR_FIX_BTMAPS * FIX_BTMAPS_SLOTS) | ||
48 | |||
49 | FIX_BTMAP_END = __end_of_permanent_fixed_addresses, | ||
50 | FIX_BTMAP_BEGIN = FIX_BTMAP_END + TOTAL_FIX_BTMAPS - 1, | ||
51 | __end_of_fixed_addresses | ||
52 | }; | ||
53 | |||
54 | #define FIXADDR_SIZE (__end_of_permanent_fixed_addresses << PAGE_SHIFT) | ||
55 | #define FIXADDR_START (FIXADDR_TOP - FIXADDR_SIZE) | ||
56 | |||
57 | #define FIXMAP_PAGE_IO __pgprot(PROT_DEVICE_nGnRE) | ||
58 | |||
59 | extern void __early_set_fixmap(enum fixed_addresses idx, | ||
60 | phys_addr_t phys, pgprot_t flags); | ||
61 | |||
62 | #define __set_fixmap __early_set_fixmap | ||
63 | |||
64 | #include <asm-generic/fixmap.h> | ||
65 | |||
66 | #endif /* !__ASSEMBLY__ */ | ||
67 | #endif /* _ASM_ARM64_FIXMAP_H */ | ||
diff --git a/arch/arm64/include/asm/io.h b/arch/arm64/include/asm/io.h index 7846a6bb0833..a1bef78f0303 100644 --- a/arch/arm64/include/asm/io.h +++ b/arch/arm64/include/asm/io.h | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <asm/byteorder.h> | 27 | #include <asm/byteorder.h> |
28 | #include <asm/barrier.h> | 28 | #include <asm/barrier.h> |
29 | #include <asm/pgtable.h> | 29 | #include <asm/pgtable.h> |
30 | #include <asm/early_ioremap.h> | ||
30 | 31 | ||
31 | #include <xen/xen.h> | 32 | #include <xen/xen.h> |
32 | 33 | ||
diff --git a/arch/arm64/include/asm/memory.h b/arch/arm64/include/asm/memory.h index 9dc5dc39fded..e94f9458aa6f 100644 --- a/arch/arm64/include/asm/memory.h +++ b/arch/arm64/include/asm/memory.h | |||
@@ -49,7 +49,7 @@ | |||
49 | #define PAGE_OFFSET (UL(0xffffffffffffffff) << (VA_BITS - 1)) | 49 | #define PAGE_OFFSET (UL(0xffffffffffffffff) << (VA_BITS - 1)) |
50 | #define MODULES_END (PAGE_OFFSET) | 50 | #define MODULES_END (PAGE_OFFSET) |
51 | #define MODULES_VADDR (MODULES_END - SZ_64M) | 51 | #define MODULES_VADDR (MODULES_END - SZ_64M) |
52 | #define EARLYCON_IOBASE (MODULES_VADDR - SZ_4M) | 52 | #define FIXADDR_TOP (MODULES_VADDR - SZ_2M - PAGE_SIZE) |
53 | #define TASK_SIZE_64 (UL(1) << VA_BITS) | 53 | #define TASK_SIZE_64 (UL(1) << VA_BITS) |
54 | 54 | ||
55 | #ifdef CONFIG_COMPAT | 55 | #ifdef CONFIG_COMPAT |
diff --git a/arch/arm64/include/asm/mmu.h b/arch/arm64/include/asm/mmu.h index 2494fc01896a..f600d400c07d 100644 --- a/arch/arm64/include/asm/mmu.h +++ b/arch/arm64/include/asm/mmu.h | |||
@@ -27,5 +27,6 @@ typedef struct { | |||
27 | extern void paging_init(void); | 27 | extern void paging_init(void); |
28 | extern void setup_mm_for_reboot(void); | 28 | extern void setup_mm_for_reboot(void); |
29 | extern void __iomem *early_io_map(phys_addr_t phys, unsigned long virt); | 29 | extern void __iomem *early_io_map(phys_addr_t phys, unsigned long virt); |
30 | extern void init_mem_pgprot(void); | ||
30 | 31 | ||
31 | #endif | 32 | #endif |