aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm64
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2015-02-10 05:26:38 -0500
committerRussell King <rmk+kernel@arm.linux.org.uk>2015-02-10 05:26:38 -0500
commitdf9ab9771c64f5229843bfe2a20fe0ee6ac59fc1 (patch)
treea091be1024bd76627f78e791e377126e47703b7b /arch/arm64
parented8f8ce38d0f7b505d7da2d79522972e962457c2 (diff)
parent4e1c0664de11e4b5861957ab4ddff2aeeffd042f (diff)
Merge branch 'devel-stable' into for-next
Diffstat (limited to 'arch/arm64')
-rw-r--r--arch/arm64/configs/defconfig9
-rw-r--r--arch/arm64/include/asm/dma-mapping.h11
-rw-r--r--arch/arm64/include/asm/pgtable.h5
-rw-r--r--arch/arm64/kernel/suspend.c14
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
2CONFIG_SYSVIPC=y 2CONFIG_SYSVIPC=y
3CONFIG_POSIX_MQUEUE=y 3CONFIG_POSIX_MQUEUE=y
4CONFIG_FHANDLE=y
4CONFIG_AUDIT=y 5CONFIG_AUDIT=y
5CONFIG_NO_HZ_IDLE=y 6CONFIG_NO_HZ_IDLE=y
6CONFIG_HIGH_RES_TIMERS=y 7CONFIG_HIGH_RES_TIMERS=y
@@ -13,14 +14,12 @@ CONFIG_TASK_IO_ACCOUNTING=y
13CONFIG_IKCONFIG=y 14CONFIG_IKCONFIG=y
14CONFIG_IKCONFIG_PROC=y 15CONFIG_IKCONFIG_PROC=y
15CONFIG_LOG_BUF_SHIFT=14 16CONFIG_LOG_BUF_SHIFT=14
16CONFIG_RESOURCE_COUNTERS=y
17CONFIG_MEMCG=y 17CONFIG_MEMCG=y
18CONFIG_MEMCG_SWAP=y 18CONFIG_MEMCG_SWAP=y
19CONFIG_MEMCG_KMEM=y 19CONFIG_MEMCG_KMEM=y
20CONFIG_CGROUP_HUGETLB=y 20CONFIG_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
25CONFIG_SCHED_AUTOGROUP=y 24CONFIG_SCHED_AUTOGROUP=y
26CONFIG_BLK_DEV_INITRD=y 25CONFIG_BLK_DEV_INITRD=y
@@ -92,7 +91,6 @@ CONFIG_SERIAL_AMBA_PL011_CONSOLE=y
92CONFIG_SERIAL_OF_PLATFORM=y 91CONFIG_SERIAL_OF_PLATFORM=y
93CONFIG_VIRTIO_CONSOLE=y 92CONFIG_VIRTIO_CONSOLE=y
94# CONFIG_HW_RANDOM is not set 93# CONFIG_HW_RANDOM is not set
95# CONFIG_HMC_DRV is not set
96CONFIG_SPI=y 94CONFIG_SPI=y
97CONFIG_SPI_PL022=y 95CONFIG_SPI_PL022=y
98CONFIG_GPIO_PL061=y 96CONFIG_GPIO_PL061=y
@@ -133,6 +131,8 @@ CONFIG_EXT3_FS=y
133CONFIG_EXT4_FS=y 131CONFIG_EXT4_FS=y
134CONFIG_FANOTIFY=y 132CONFIG_FANOTIFY=y
135CONFIG_FANOTIFY_ACCESS_PERMISSIONS=y 133CONFIG_FANOTIFY_ACCESS_PERMISSIONS=y
134CONFIG_QUOTA=y
135CONFIG_AUTOFS4_FS=y
136CONFIG_FUSE_FS=y 136CONFIG_FUSE_FS=y
137CONFIG_CUSE=y 137CONFIG_CUSE=y
138CONFIG_VFAT_FS=y 138CONFIG_VFAT_FS=y
@@ -152,14 +152,15 @@ CONFIG_MAGIC_SYSRQ=y
152CONFIG_DEBUG_KERNEL=y 152CONFIG_DEBUG_KERNEL=y
153CONFIG_LOCKUP_DETECTOR=y 153CONFIG_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
157CONFIG_KEYS=y
156CONFIG_SECURITY=y 158CONFIG_SECURITY=y
157CONFIG_CRYPTO_ANSI_CPRNG=y 159CONFIG_CRYPTO_ANSI_CPRNG=y
158CONFIG_ARM64_CRYPTO=y 160CONFIG_ARM64_CRYPTO=y
159CONFIG_CRYPTO_SHA1_ARM64_CE=y 161CONFIG_CRYPTO_SHA1_ARM64_CE=y
160CONFIG_CRYPTO_SHA2_ARM64_CE=y 162CONFIG_CRYPTO_SHA2_ARM64_CE=y
161CONFIG_CRYPTO_GHASH_ARM64_CE=y 163CONFIG_CRYPTO_GHASH_ARM64_CE=y
162CONFIG_CRYPTO_AES_ARM64_CE=y
163CONFIG_CRYPTO_AES_ARM64_CE_CCM=y 164CONFIG_CRYPTO_AES_ARM64_CE_CCM=y
164CONFIG_CRYPTO_AES_ARM64_CE_BLK=y 165CONFIG_CRYPTO_AES_ARM64_CE_BLK=y
165CONFIG_CRYPTO_AES_ARM64_NEON_BLK=y 166CONFIG_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
55static inline int set_arch_dma_coherent_ops(struct device *dev) 55static 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 */
64static inline bool is_device_dma_coherent(struct device *dev) 65static 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 /*