diff options
Diffstat (limited to 'arch/arm64')
-rw-r--r-- | arch/arm64/configs/defconfig | 9 | ||||
-rw-r--r-- | arch/arm64/include/asm/dma-mapping.h | 11 | ||||
-rw-r--r-- | arch/arm64/include/asm/pgtable.h | 5 | ||||
-rw-r--r-- | arch/arm64/kernel/suspend.c | 14 |
4 files changed, 27 insertions, 12 deletions
diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig index dd301be89ecc..5376d908eabe 100644 --- a/arch/arm64/configs/defconfig +++ b/arch/arm64/configs/defconfig | |||
@@ -1,6 +1,7 @@ | |||
1 | # CONFIG_LOCALVERSION_AUTO is not set | 1 | # CONFIG_LOCALVERSION_AUTO is not set |
2 | CONFIG_SYSVIPC=y | 2 | CONFIG_SYSVIPC=y |
3 | CONFIG_POSIX_MQUEUE=y | 3 | CONFIG_POSIX_MQUEUE=y |
4 | CONFIG_FHANDLE=y | ||
4 | CONFIG_AUDIT=y | 5 | CONFIG_AUDIT=y |
5 | CONFIG_NO_HZ_IDLE=y | 6 | CONFIG_NO_HZ_IDLE=y |
6 | CONFIG_HIGH_RES_TIMERS=y | 7 | CONFIG_HIGH_RES_TIMERS=y |
@@ -13,14 +14,12 @@ CONFIG_TASK_IO_ACCOUNTING=y | |||
13 | CONFIG_IKCONFIG=y | 14 | CONFIG_IKCONFIG=y |
14 | CONFIG_IKCONFIG_PROC=y | 15 | CONFIG_IKCONFIG_PROC=y |
15 | CONFIG_LOG_BUF_SHIFT=14 | 16 | CONFIG_LOG_BUF_SHIFT=14 |
16 | CONFIG_RESOURCE_COUNTERS=y | ||
17 | CONFIG_MEMCG=y | 17 | CONFIG_MEMCG=y |
18 | CONFIG_MEMCG_SWAP=y | 18 | CONFIG_MEMCG_SWAP=y |
19 | CONFIG_MEMCG_KMEM=y | 19 | CONFIG_MEMCG_KMEM=y |
20 | CONFIG_CGROUP_HUGETLB=y | 20 | CONFIG_CGROUP_HUGETLB=y |
21 | # CONFIG_UTS_NS is not set | 21 | # CONFIG_UTS_NS is not set |
22 | # CONFIG_IPC_NS is not set | 22 | # CONFIG_IPC_NS is not set |
23 | # CONFIG_PID_NS is not set | ||
24 | # CONFIG_NET_NS is not set | 23 | # CONFIG_NET_NS is not set |
25 | CONFIG_SCHED_AUTOGROUP=y | 24 | CONFIG_SCHED_AUTOGROUP=y |
26 | CONFIG_BLK_DEV_INITRD=y | 25 | CONFIG_BLK_DEV_INITRD=y |
@@ -92,7 +91,6 @@ CONFIG_SERIAL_AMBA_PL011_CONSOLE=y | |||
92 | CONFIG_SERIAL_OF_PLATFORM=y | 91 | CONFIG_SERIAL_OF_PLATFORM=y |
93 | CONFIG_VIRTIO_CONSOLE=y | 92 | CONFIG_VIRTIO_CONSOLE=y |
94 | # CONFIG_HW_RANDOM is not set | 93 | # CONFIG_HW_RANDOM is not set |
95 | # CONFIG_HMC_DRV is not set | ||
96 | CONFIG_SPI=y | 94 | CONFIG_SPI=y |
97 | CONFIG_SPI_PL022=y | 95 | CONFIG_SPI_PL022=y |
98 | CONFIG_GPIO_PL061=y | 96 | CONFIG_GPIO_PL061=y |
@@ -133,6 +131,8 @@ CONFIG_EXT3_FS=y | |||
133 | CONFIG_EXT4_FS=y | 131 | CONFIG_EXT4_FS=y |
134 | CONFIG_FANOTIFY=y | 132 | CONFIG_FANOTIFY=y |
135 | CONFIG_FANOTIFY_ACCESS_PERMISSIONS=y | 133 | CONFIG_FANOTIFY_ACCESS_PERMISSIONS=y |
134 | CONFIG_QUOTA=y | ||
135 | CONFIG_AUTOFS4_FS=y | ||
136 | CONFIG_FUSE_FS=y | 136 | CONFIG_FUSE_FS=y |
137 | CONFIG_CUSE=y | 137 | CONFIG_CUSE=y |
138 | CONFIG_VFAT_FS=y | 138 | CONFIG_VFAT_FS=y |
@@ -152,14 +152,15 @@ CONFIG_MAGIC_SYSRQ=y | |||
152 | CONFIG_DEBUG_KERNEL=y | 152 | CONFIG_DEBUG_KERNEL=y |
153 | CONFIG_LOCKUP_DETECTOR=y | 153 | CONFIG_LOCKUP_DETECTOR=y |
154 | # CONFIG_SCHED_DEBUG is not set | 154 | # CONFIG_SCHED_DEBUG is not set |
155 | # CONFIG_DEBUG_PREEMPT is not set | ||
155 | # CONFIG_FTRACE is not set | 156 | # CONFIG_FTRACE is not set |
157 | CONFIG_KEYS=y | ||
156 | CONFIG_SECURITY=y | 158 | CONFIG_SECURITY=y |
157 | CONFIG_CRYPTO_ANSI_CPRNG=y | 159 | CONFIG_CRYPTO_ANSI_CPRNG=y |
158 | CONFIG_ARM64_CRYPTO=y | 160 | CONFIG_ARM64_CRYPTO=y |
159 | CONFIG_CRYPTO_SHA1_ARM64_CE=y | 161 | CONFIG_CRYPTO_SHA1_ARM64_CE=y |
160 | CONFIG_CRYPTO_SHA2_ARM64_CE=y | 162 | CONFIG_CRYPTO_SHA2_ARM64_CE=y |
161 | CONFIG_CRYPTO_GHASH_ARM64_CE=y | 163 | CONFIG_CRYPTO_GHASH_ARM64_CE=y |
162 | CONFIG_CRYPTO_AES_ARM64_CE=y | ||
163 | CONFIG_CRYPTO_AES_ARM64_CE_CCM=y | 164 | CONFIG_CRYPTO_AES_ARM64_CE_CCM=y |
164 | CONFIG_CRYPTO_AES_ARM64_CE_BLK=y | 165 | CONFIG_CRYPTO_AES_ARM64_CE_BLK=y |
165 | CONFIG_CRYPTO_AES_ARM64_NEON_BLK=y | 166 | CONFIG_CRYPTO_AES_ARM64_NEON_BLK=y |
diff --git a/arch/arm64/include/asm/dma-mapping.h b/arch/arm64/include/asm/dma-mapping.h index d34189bceff7..9ce3e680ae1c 100644 --- a/arch/arm64/include/asm/dma-mapping.h +++ b/arch/arm64/include/asm/dma-mapping.h | |||
@@ -52,13 +52,14 @@ static inline void set_dma_ops(struct device *dev, struct dma_map_ops *ops) | |||
52 | dev->archdata.dma_ops = ops; | 52 | dev->archdata.dma_ops = ops; |
53 | } | 53 | } |
54 | 54 | ||
55 | static inline int set_arch_dma_coherent_ops(struct device *dev) | 55 | static inline void arch_setup_dma_ops(struct device *dev, u64 dma_base, u64 size, |
56 | struct iommu_ops *iommu, bool coherent) | ||
56 | { | 57 | { |
57 | dev->archdata.dma_coherent = true; | 58 | dev->archdata.dma_coherent = coherent; |
58 | set_dma_ops(dev, &coherent_swiotlb_dma_ops); | 59 | if (coherent) |
59 | return 0; | 60 | set_dma_ops(dev, &coherent_swiotlb_dma_ops); |
60 | } | 61 | } |
61 | #define set_arch_dma_coherent_ops set_arch_dma_coherent_ops | 62 | #define arch_setup_dma_ops arch_setup_dma_ops |
62 | 63 | ||
63 | /* do not use this function in a driver */ | 64 | /* do not use this function in a driver */ |
64 | static inline bool is_device_dma_coherent(struct device *dev) | 65 | static inline bool is_device_dma_coherent(struct device *dev) |
diff --git a/arch/arm64/include/asm/pgtable.h b/arch/arm64/include/asm/pgtable.h index df22314f57cf..210d632aa5ad 100644 --- a/arch/arm64/include/asm/pgtable.h +++ b/arch/arm64/include/asm/pgtable.h | |||
@@ -298,7 +298,6 @@ void pmdp_splitting_flush(struct vm_area_struct *vma, unsigned long address, | |||
298 | #define pfn_pmd(pfn,prot) (__pmd(((phys_addr_t)(pfn) << PAGE_SHIFT) | pgprot_val(prot))) | 298 | #define pfn_pmd(pfn,prot) (__pmd(((phys_addr_t)(pfn) << PAGE_SHIFT) | pgprot_val(prot))) |
299 | #define mk_pmd(page,prot) pfn_pmd(page_to_pfn(page),prot) | 299 | #define mk_pmd(page,prot) pfn_pmd(page_to_pfn(page),prot) |
300 | 300 | ||
301 | #define pmd_page(pmd) pfn_to_page(__phys_to_pfn(pmd_val(pmd) & PHYS_MASK)) | ||
302 | #define pud_write(pud) pte_write(pud_pte(pud)) | 301 | #define pud_write(pud) pte_write(pud_pte(pud)) |
303 | #define pud_pfn(pud) (((pud_val(pud) & PUD_MASK) & PHYS_MASK) >> PAGE_SHIFT) | 302 | #define pud_pfn(pud) (((pud_val(pud) & PUD_MASK) & PHYS_MASK) >> PAGE_SHIFT) |
304 | 303 | ||
@@ -401,7 +400,7 @@ static inline pmd_t *pmd_offset(pud_t *pud, unsigned long addr) | |||
401 | return (pmd_t *)pud_page_vaddr(*pud) + pmd_index(addr); | 400 | return (pmd_t *)pud_page_vaddr(*pud) + pmd_index(addr); |
402 | } | 401 | } |
403 | 402 | ||
404 | #define pud_page(pud) pmd_page(pud_pmd(pud)) | 403 | #define pud_page(pud) pfn_to_page(__phys_to_pfn(pud_val(pud) & PHYS_MASK)) |
405 | 404 | ||
406 | #endif /* CONFIG_ARM64_PGTABLE_LEVELS > 2 */ | 405 | #endif /* CONFIG_ARM64_PGTABLE_LEVELS > 2 */ |
407 | 406 | ||
@@ -437,6 +436,8 @@ static inline pud_t *pud_offset(pgd_t *pgd, unsigned long addr) | |||
437 | return (pud_t *)pgd_page_vaddr(*pgd) + pud_index(addr); | 436 | return (pud_t *)pgd_page_vaddr(*pgd) + pud_index(addr); |
438 | } | 437 | } |
439 | 438 | ||
439 | #define pgd_page(pgd) pfn_to_page(__phys_to_pfn(pgd_val(pgd) & PHYS_MASK)) | ||
440 | |||
440 | #endif /* CONFIG_ARM64_PGTABLE_LEVELS > 3 */ | 441 | #endif /* CONFIG_ARM64_PGTABLE_LEVELS > 3 */ |
441 | 442 | ||
442 | #define pgd_ERROR(pgd) __pgd_error(__FILE__, __LINE__, pgd_val(pgd)) | 443 | #define pgd_ERROR(pgd) __pgd_error(__FILE__, __LINE__, pgd_val(pgd)) |
diff --git a/arch/arm64/kernel/suspend.c b/arch/arm64/kernel/suspend.c index 3771b72b6569..2d6b6065fe7f 100644 --- a/arch/arm64/kernel/suspend.c +++ b/arch/arm64/kernel/suspend.c | |||
@@ -5,6 +5,7 @@ | |||
5 | #include <asm/debug-monitors.h> | 5 | #include <asm/debug-monitors.h> |
6 | #include <asm/pgtable.h> | 6 | #include <asm/pgtable.h> |
7 | #include <asm/memory.h> | 7 | #include <asm/memory.h> |
8 | #include <asm/mmu_context.h> | ||
8 | #include <asm/smp_plat.h> | 9 | #include <asm/smp_plat.h> |
9 | #include <asm/suspend.h> | 10 | #include <asm/suspend.h> |
10 | #include <asm/tlbflush.h> | 11 | #include <asm/tlbflush.h> |
@@ -98,7 +99,18 @@ int __cpu_suspend(unsigned long arg, int (*fn)(unsigned long)) | |||
98 | */ | 99 | */ |
99 | ret = __cpu_suspend_enter(arg, fn); | 100 | ret = __cpu_suspend_enter(arg, fn); |
100 | if (ret == 0) { | 101 | if (ret == 0) { |
101 | cpu_switch_mm(mm->pgd, mm); | 102 | /* |
103 | * We are resuming from reset with TTBR0_EL1 set to the | ||
104 | * idmap to enable the MMU; restore the active_mm mappings in | ||
105 | * TTBR0_EL1 unless the active_mm == &init_mm, in which case | ||
106 | * the thread entered __cpu_suspend with TTBR0_EL1 set to | ||
107 | * reserved TTBR0 page tables and should be restored as such. | ||
108 | */ | ||
109 | if (mm == &init_mm) | ||
110 | cpu_set_reserved_ttbr0(); | ||
111 | else | ||
112 | cpu_switch_mm(mm->pgd, mm); | ||
113 | |||
102 | flush_tlb_all(); | 114 | flush_tlb_all(); |
103 | 115 | ||
104 | /* | 116 | /* |