diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2015-02-27 19:09:37 -0500 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-02-27 19:09:37 -0500 |
| commit | 8d20a3dd4a719e8456999ababaa7b5b6e80af5d8 (patch) | |
| tree | 54e1184ecb294dea83b73763a1544a81e1ee69b1 | |
| parent | 1c0705151e8efb186139c2a8f3e9d8ee8583a07f (diff) | |
| parent | af4819af8db05da4753b3b74a11cb00b381247e7 (diff) | |
Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux
Pull arm64 fixes from Catalin Marinas:
"Various arm64 fixes:
- ftrace branch generation fix
- branch instruction encoding fix
- include files, guards and unused prototypes clean-up
- minor VDSO ABI fix (clock_getres)
- PSCI functions moved to .S to avoid compilation error with gcc 5
- pte_modify fix to not ignore the mapping type
- crypto: AES interleaved increased to 4x (for performance reasons)
- text patching fix for modules
- swiotlb increased back to 64MB
- copy_siginfo_to_user32() fix for big endian"
* tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
arm64: cpuidle: add asm/proc-fns.h inclusion
arm64: compat Fix siginfo_t -> compat_siginfo_t conversion on big endian
arm64: Increase the swiotlb buffer size 64MB
arm64: Fix text patching logic when using fixmap
arm64: crypto: increase AES interleave to 4x
arm64: enable PTE type bit in the mask for pte_modify
arm64: mm: remove unused functions and variable protoypes
arm64: psci: move psci firmware calls out of line
arm64: vdso: minor ABI fix for clock_getres
arm64: guard asm/assembler.h against multiple inclusions
arm64: insn: fix compare-and-branch encodings
arm64: ftrace: fix ftrace_modify_graph_caller for branch replace
| -rw-r--r-- | arch/arm64/crypto/Makefile | 2 | ||||
| -rw-r--r-- | arch/arm64/include/asm/assembler.h | 5 | ||||
| -rw-r--r-- | arch/arm64/include/asm/cpuidle.h | 2 | ||||
| -rw-r--r-- | arch/arm64/include/asm/insn.h | 6 | ||||
| -rw-r--r-- | arch/arm64/include/asm/pgtable.h | 2 | ||||
| -rw-r--r-- | arch/arm64/include/asm/processor.h | 3 | ||||
| -rw-r--r-- | arch/arm64/include/asm/tlbflush.h | 5 | ||||
| -rw-r--r-- | arch/arm64/kernel/Makefile | 5 | ||||
| -rw-r--r-- | arch/arm64/kernel/ftrace.c | 2 | ||||
| -rw-r--r-- | arch/arm64/kernel/insn.c | 4 | ||||
| -rw-r--r-- | arch/arm64/kernel/psci-call.S | 28 | ||||
| -rw-r--r-- | arch/arm64/kernel/psci.c | 37 | ||||
| -rw-r--r-- | arch/arm64/kernel/signal32.c | 5 | ||||
| -rw-r--r-- | arch/arm64/kernel/vdso/gettimeofday.S | 3 | ||||
| -rw-r--r-- | arch/arm64/mm/dma-mapping.c | 16 | ||||
| -rw-r--r-- | arch/arm64/mm/init.c | 14 |
16 files changed, 68 insertions, 71 deletions
diff --git a/arch/arm64/crypto/Makefile b/arch/arm64/crypto/Makefile index 5720608c50b1..abb79b3cfcfe 100644 --- a/arch/arm64/crypto/Makefile +++ b/arch/arm64/crypto/Makefile | |||
| @@ -29,7 +29,7 @@ aes-ce-blk-y := aes-glue-ce.o aes-ce.o | |||
| 29 | obj-$(CONFIG_CRYPTO_AES_ARM64_NEON_BLK) += aes-neon-blk.o | 29 | obj-$(CONFIG_CRYPTO_AES_ARM64_NEON_BLK) += aes-neon-blk.o |
| 30 | aes-neon-blk-y := aes-glue-neon.o aes-neon.o | 30 | aes-neon-blk-y := aes-glue-neon.o aes-neon.o |
| 31 | 31 | ||
| 32 | AFLAGS_aes-ce.o := -DINTERLEAVE=2 -DINTERLEAVE_INLINE | 32 | AFLAGS_aes-ce.o := -DINTERLEAVE=4 |
| 33 | AFLAGS_aes-neon.o := -DINTERLEAVE=4 | 33 | AFLAGS_aes-neon.o := -DINTERLEAVE=4 |
| 34 | 34 | ||
| 35 | CFLAGS_aes-glue-ce.o := -DUSE_V8_CRYPTO_EXTENSIONS | 35 | CFLAGS_aes-glue-ce.o := -DUSE_V8_CRYPTO_EXTENSIONS |
diff --git a/arch/arm64/include/asm/assembler.h b/arch/arm64/include/asm/assembler.h index 5901480bfdca..750bac4e637e 100644 --- a/arch/arm64/include/asm/assembler.h +++ b/arch/arm64/include/asm/assembler.h | |||
| @@ -20,6 +20,9 @@ | |||
| 20 | #error "Only include this from assembly code" | 20 | #error "Only include this from assembly code" |
| 21 | #endif | 21 | #endif |
| 22 | 22 | ||
| 23 | #ifndef __ASM_ASSEMBLER_H | ||
| 24 | #define __ASM_ASSEMBLER_H | ||
| 25 | |||
| 23 | #include <asm/ptrace.h> | 26 | #include <asm/ptrace.h> |
| 24 | #include <asm/thread_info.h> | 27 | #include <asm/thread_info.h> |
| 25 | 28 | ||
| @@ -155,3 +158,5 @@ lr .req x30 // link register | |||
| 155 | #endif | 158 | #endif |
| 156 | orr \rd, \lbits, \hbits, lsl #32 | 159 | orr \rd, \lbits, \hbits, lsl #32 |
| 157 | .endm | 160 | .endm |
| 161 | |||
| 162 | #endif /* __ASM_ASSEMBLER_H */ | ||
diff --git a/arch/arm64/include/asm/cpuidle.h b/arch/arm64/include/asm/cpuidle.h index 0710654631e7..c60643f14cda 100644 --- a/arch/arm64/include/asm/cpuidle.h +++ b/arch/arm64/include/asm/cpuidle.h | |||
| @@ -1,6 +1,8 @@ | |||
| 1 | #ifndef __ASM_CPUIDLE_H | 1 | #ifndef __ASM_CPUIDLE_H |
| 2 | #define __ASM_CPUIDLE_H | 2 | #define __ASM_CPUIDLE_H |
| 3 | 3 | ||
| 4 | #include <asm/proc-fns.h> | ||
| 5 | |||
| 4 | #ifdef CONFIG_CPU_IDLE | 6 | #ifdef CONFIG_CPU_IDLE |
| 5 | extern int cpu_init_idle(unsigned int cpu); | 7 | extern int cpu_init_idle(unsigned int cpu); |
| 6 | extern int cpu_suspend(unsigned long arg); | 8 | extern int cpu_suspend(unsigned long arg); |
diff --git a/arch/arm64/include/asm/insn.h b/arch/arm64/include/asm/insn.h index e2ff32a93b5c..d2f49423c5dc 100644 --- a/arch/arm64/include/asm/insn.h +++ b/arch/arm64/include/asm/insn.h | |||
| @@ -264,8 +264,10 @@ __AARCH64_INSN_FUNCS(ands, 0x7F200000, 0x6A000000) | |||
| 264 | __AARCH64_INSN_FUNCS(bics, 0x7F200000, 0x6A200000) | 264 | __AARCH64_INSN_FUNCS(bics, 0x7F200000, 0x6A200000) |
| 265 | __AARCH64_INSN_FUNCS(b, 0xFC000000, 0x14000000) | 265 | __AARCH64_INSN_FUNCS(b, 0xFC000000, 0x14000000) |
| 266 | __AARCH64_INSN_FUNCS(bl, 0xFC000000, 0x94000000) | 266 | __AARCH64_INSN_FUNCS(bl, 0xFC000000, 0x94000000) |
| 267 | __AARCH64_INSN_FUNCS(cbz, 0xFE000000, 0x34000000) | 267 | __AARCH64_INSN_FUNCS(cbz, 0x7F000000, 0x34000000) |
| 268 | __AARCH64_INSN_FUNCS(cbnz, 0xFE000000, 0x35000000) | 268 | __AARCH64_INSN_FUNCS(cbnz, 0x7F000000, 0x35000000) |
| 269 | __AARCH64_INSN_FUNCS(tbz, 0x7F000000, 0x36000000) | ||
| 270 | __AARCH64_INSN_FUNCS(tbnz, 0x7F000000, 0x37000000) | ||
| 269 | __AARCH64_INSN_FUNCS(bcond, 0xFF000010, 0x54000000) | 271 | __AARCH64_INSN_FUNCS(bcond, 0xFF000010, 0x54000000) |
| 270 | __AARCH64_INSN_FUNCS(svc, 0xFFE0001F, 0xD4000001) | 272 | __AARCH64_INSN_FUNCS(svc, 0xFFE0001F, 0xD4000001) |
| 271 | __AARCH64_INSN_FUNCS(hvc, 0xFFE0001F, 0xD4000002) | 273 | __AARCH64_INSN_FUNCS(hvc, 0xFFE0001F, 0xD4000002) |
diff --git a/arch/arm64/include/asm/pgtable.h b/arch/arm64/include/asm/pgtable.h index 16449c535e50..800ec0e87ed9 100644 --- a/arch/arm64/include/asm/pgtable.h +++ b/arch/arm64/include/asm/pgtable.h | |||
| @@ -460,7 +460,7 @@ static inline pud_t *pud_offset(pgd_t *pgd, unsigned long addr) | |||
| 460 | static inline pte_t pte_modify(pte_t pte, pgprot_t newprot) | 460 | static inline pte_t pte_modify(pte_t pte, pgprot_t newprot) |
| 461 | { | 461 | { |
| 462 | const pteval_t mask = PTE_USER | PTE_PXN | PTE_UXN | PTE_RDONLY | | 462 | const pteval_t mask = PTE_USER | PTE_PXN | PTE_UXN | PTE_RDONLY | |
| 463 | PTE_PROT_NONE | PTE_VALID | PTE_WRITE; | 463 | PTE_PROT_NONE | PTE_WRITE | PTE_TYPE_MASK; |
| 464 | pte_val(pte) = (pte_val(pte) & ~mask) | (pgprot_val(newprot) & mask); | 464 | pte_val(pte) = (pte_val(pte) & ~mask) | (pgprot_val(newprot) & mask); |
| 465 | return pte; | 465 | return pte; |
| 466 | } | 466 | } |
diff --git a/arch/arm64/include/asm/processor.h b/arch/arm64/include/asm/processor.h index f9be30ea1cbd..20e9591a60cf 100644 --- a/arch/arm64/include/asm/processor.h +++ b/arch/arm64/include/asm/processor.h | |||
| @@ -45,7 +45,8 @@ | |||
| 45 | #define STACK_TOP STACK_TOP_MAX | 45 | #define STACK_TOP STACK_TOP_MAX |
| 46 | #endif /* CONFIG_COMPAT */ | 46 | #endif /* CONFIG_COMPAT */ |
| 47 | 47 | ||
| 48 | #define ARCH_LOW_ADDRESS_LIMIT PHYS_MASK | 48 | extern phys_addr_t arm64_dma_phys_limit; |
| 49 | #define ARCH_LOW_ADDRESS_LIMIT (arm64_dma_phys_limit - 1) | ||
| 49 | #endif /* __KERNEL__ */ | 50 | #endif /* __KERNEL__ */ |
| 50 | 51 | ||
| 51 | struct debug_info { | 52 | struct debug_info { |
diff --git a/arch/arm64/include/asm/tlbflush.h b/arch/arm64/include/asm/tlbflush.h index 73f0ce570fb3..4abe9b945f77 100644 --- a/arch/arm64/include/asm/tlbflush.h +++ b/arch/arm64/include/asm/tlbflush.h | |||
| @@ -24,11 +24,6 @@ | |||
| 24 | #include <linux/sched.h> | 24 | #include <linux/sched.h> |
| 25 | #include <asm/cputype.h> | 25 | #include <asm/cputype.h> |
| 26 | 26 | ||
| 27 | extern void __cpu_flush_user_tlb_range(unsigned long, unsigned long, struct vm_area_struct *); | ||
| 28 | extern void __cpu_flush_kern_tlb_range(unsigned long, unsigned long); | ||
| 29 | |||
| 30 | extern struct cpu_tlb_fns cpu_tlb; | ||
| 31 | |||
| 32 | /* | 27 | /* |
| 33 | * TLB Management | 28 | * TLB Management |
| 34 | * ============== | 29 | * ============== |
diff --git a/arch/arm64/kernel/Makefile b/arch/arm64/kernel/Makefile index bef04afd6031..5ee07eee80c2 100644 --- a/arch/arm64/kernel/Makefile +++ b/arch/arm64/kernel/Makefile | |||
| @@ -15,8 +15,9 @@ CFLAGS_REMOVE_return_address.o = -pg | |||
| 15 | arm64-obj-y := cputable.o debug-monitors.o entry.o irq.o fpsimd.o \ | 15 | arm64-obj-y := cputable.o debug-monitors.o entry.o irq.o fpsimd.o \ |
| 16 | entry-fpsimd.o process.o ptrace.o setup.o signal.o \ | 16 | entry-fpsimd.o process.o ptrace.o setup.o signal.o \ |
| 17 | sys.o stacktrace.o time.o traps.o io.o vdso.o \ | 17 | sys.o stacktrace.o time.o traps.o io.o vdso.o \ |
| 18 | hyp-stub.o psci.o cpu_ops.o insn.o return_address.o \ | 18 | hyp-stub.o psci.o psci-call.o cpu_ops.o insn.o \ |
| 19 | cpuinfo.o cpu_errata.o alternative.o cacheinfo.o | 19 | return_address.o cpuinfo.o cpu_errata.o \ |
| 20 | alternative.o cacheinfo.o | ||
| 20 | 21 | ||
| 21 | arm64-obj-$(CONFIG_COMPAT) += sys32.o kuser32.o signal32.o \ | 22 | arm64-obj-$(CONFIG_COMPAT) += sys32.o kuser32.o signal32.o \ |
| 22 | sys_compat.o entry32.o \ | 23 | sys_compat.o entry32.o \ |
diff --git a/arch/arm64/kernel/ftrace.c b/arch/arm64/kernel/ftrace.c index cf8556ae09d0..c851be795080 100644 --- a/arch/arm64/kernel/ftrace.c +++ b/arch/arm64/kernel/ftrace.c | |||
| @@ -156,7 +156,7 @@ static int ftrace_modify_graph_caller(bool enable) | |||
| 156 | 156 | ||
| 157 | branch = aarch64_insn_gen_branch_imm(pc, | 157 | branch = aarch64_insn_gen_branch_imm(pc, |
| 158 | (unsigned long)ftrace_graph_caller, | 158 | (unsigned long)ftrace_graph_caller, |
| 159 | AARCH64_INSN_BRANCH_LINK); | 159 | AARCH64_INSN_BRANCH_NOLINK); |
| 160 | nop = aarch64_insn_gen_nop(); | 160 | nop = aarch64_insn_gen_nop(); |
| 161 | 161 | ||
| 162 | if (enable) | 162 | if (enable) |
diff --git a/arch/arm64/kernel/insn.c b/arch/arm64/kernel/insn.c index 27d4864577e5..c8eca88f12e6 100644 --- a/arch/arm64/kernel/insn.c +++ b/arch/arm64/kernel/insn.c | |||
| @@ -87,8 +87,10 @@ static void __kprobes *patch_map(void *addr, int fixmap) | |||
| 87 | 87 | ||
| 88 | if (module && IS_ENABLED(CONFIG_DEBUG_SET_MODULE_RONX)) | 88 | if (module && IS_ENABLED(CONFIG_DEBUG_SET_MODULE_RONX)) |
| 89 | page = vmalloc_to_page(addr); | 89 | page = vmalloc_to_page(addr); |
| 90 | else | 90 | else if (!module && IS_ENABLED(CONFIG_DEBUG_RODATA)) |
| 91 | page = virt_to_page(addr); | 91 | page = virt_to_page(addr); |
| 92 | else | ||
| 93 | return addr; | ||
| 92 | 94 | ||
| 93 | BUG_ON(!page); | 95 | BUG_ON(!page); |
| 94 | set_fixmap(fixmap, page_to_phys(page)); | 96 | set_fixmap(fixmap, page_to_phys(page)); |
diff --git a/arch/arm64/kernel/psci-call.S b/arch/arm64/kernel/psci-call.S new file mode 100644 index 000000000000..cf83e61cd3b5 --- /dev/null +++ b/arch/arm64/kernel/psci-call.S | |||
| @@ -0,0 +1,28 @@ | |||
| 1 | /* | ||
| 2 | * This program is free software; you can redistribute it and/or modify | ||
| 3 | * it under the terms of the GNU General Public License version 2 as | ||
| 4 | * published by the Free Software Foundation. | ||
| 5 | * | ||
| 6 | * This program is distributed in the hope that it will be useful, | ||
| 7 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 8 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 9 | * GNU General Public License for more details. | ||
| 10 | * | ||
| 11 | * Copyright (C) 2015 ARM Limited | ||
| 12 | * | ||
| 13 | * Author: Will Deacon <will.deacon@arm.com> | ||
| 14 | */ | ||
| 15 | |||
| 16 | #include <linux/linkage.h> | ||
| 17 | |||
| 18 | /* int __invoke_psci_fn_hvc(u64 function_id, u64 arg0, u64 arg1, u64 arg2) */ | ||
