aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mm
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2013-10-27 20:43:41 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2013-10-30 18:20:26 -0400
commit2098990e7c558c175b96213d41058983e00a7919 (patch)
tree361449d9c852d07544b16dd0daec5a72541e8bda /arch/arm/mm
parent5e4432d3bd6b5b19e10bb263e7dbe8e74d7cf1c2 (diff)
parentfdb07aee0b2b9d7d1893c97f5ce79ec355caaf1f (diff)
Merge branch 'baserock/bjdooks/312-rc4/be/core-v3' of git://git.baserock.org/delta/linux into devel-stable
Conflicts: arch/arm/kernel/head.S This series has been well tested and it would be great to get this merged now. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mm')
-rw-r--r--arch/arm/mm/Kconfig6
-rw-r--r--arch/arm/mm/abort-ev6.S5
-rw-r--r--arch/arm/mm/alignment.c9
-rw-r--r--arch/arm/mm/proc-v6.S4
-rw-r--r--arch/arm/mm/proc-v7.S4
5 files changed, 17 insertions, 11 deletions
diff --git a/arch/arm/mm/Kconfig b/arch/arm/mm/Kconfig
index cd2c88e7a8f7..1f8fed94c2a4 100644
--- a/arch/arm/mm/Kconfig
+++ b/arch/arm/mm/Kconfig
@@ -952,3 +952,9 @@ config ARCH_HAS_BARRIERS
952 help 952 help
953 This option allows the use of custom mandatory barriers 953 This option allows the use of custom mandatory barriers
954 included via the mach/barriers.h file. 954 included via the mach/barriers.h file.
955
956config ARCH_SUPPORTS_BIG_ENDIAN
957 bool
958 help
959 This option specifies the architecture can support big endian
960 operation.
diff --git a/arch/arm/mm/abort-ev6.S b/arch/arm/mm/abort-ev6.S
index 80741992a9fc..3815a8262af0 100644
--- a/arch/arm/mm/abort-ev6.S
+++ b/arch/arm/mm/abort-ev6.S
@@ -38,9 +38,8 @@ ENTRY(v6_early_abort)
38 bne do_DataAbort 38 bne do_DataAbort
39 bic r1, r1, #1 << 11 @ clear bit 11 of FSR 39 bic r1, r1, #1 << 11 @ clear bit 11 of FSR
40 ldr r3, [r4] @ read aborted ARM instruction 40 ldr r3, [r4] @ read aborted ARM instruction
41#ifdef CONFIG_CPU_ENDIAN_BE8 41 ARM_BE8(rev r3, r3)
42 rev r3, r3 42
43#endif
44 do_ldrd_abort tmp=ip, insn=r3 43 do_ldrd_abort tmp=ip, insn=r3
45 tst r3, #1 << 20 @ L = 0 -> write 44 tst r3, #1 << 20 @ L = 0 -> write
46 orreq r1, r1, #1 << 11 @ yes. 45 orreq r1, r1, #1 << 11 @ yes.
diff --git a/arch/arm/mm/alignment.c b/arch/arm/mm/alignment.c
index 6f4585b89078..924036473b16 100644
--- a/arch/arm/mm/alignment.c
+++ b/arch/arm/mm/alignment.c
@@ -25,6 +25,7 @@
25#include <asm/cp15.h> 25#include <asm/cp15.h>
26#include <asm/system_info.h> 26#include <asm/system_info.h>
27#include <asm/unaligned.h> 27#include <asm/unaligned.h>
28#include <asm/opcodes.h>
28 29
29#include "fault.h" 30#include "fault.h"
30 31
@@ -762,21 +763,25 @@ do_alignment(unsigned long addr, unsigned int fsr, struct pt_regs *regs)
762 if (thumb_mode(regs)) { 763 if (thumb_mode(regs)) {
763 u16 *ptr = (u16 *)(instrptr & ~1); 764 u16 *ptr = (u16 *)(instrptr & ~1);
764 fault = probe_kernel_address(ptr, tinstr); 765 fault = probe_kernel_address(ptr, tinstr);
766 tinstr = __mem_to_opcode_thumb16(tinstr);
765 if (!fault) { 767 if (!fault) {
766 if (cpu_architecture() >= CPU_ARCH_ARMv7 && 768 if (cpu_architecture() >= CPU_ARCH_ARMv7 &&
767 IS_T32(tinstr)) { 769 IS_T32(tinstr)) {
768 /* Thumb-2 32-bit */ 770 /* Thumb-2 32-bit */
769 u16 tinst2 = 0; 771 u16 tinst2 = 0;
770 fault = probe_kernel_address(ptr + 1, tinst2); 772 fault = probe_kernel_address(ptr + 1, tinst2);
771 instr = (tinstr << 16) | tinst2; 773 tinst2 = __mem_to_opcode_thumb16(tinst2);
774 instr = __opcode_thumb32_compose(tinstr, tinst2);
772 thumb2_32b = 1; 775 thumb2_32b = 1;
773 } else { 776 } else {
774 isize = 2; 777 isize = 2;
775 instr = thumb2arm(tinstr); 778 instr = thumb2arm(tinstr);
776 } 779 }
777 } 780 }
778 } else 781 } else {
779 fault = probe_kernel_address(instrptr, instr); 782 fault = probe_kernel_address(instrptr, instr);
783 instr = __mem_to_opcode_arm(instr);
784 }
780 785
781 if (fault) { 786 if (fault) {
782 type = TYPE_FAULT; 787 type = TYPE_FAULT;
diff --git a/arch/arm/mm/proc-v6.S b/arch/arm/mm/proc-v6.S
index 1128064fddcb..45dc29f85d56 100644
--- a/arch/arm/mm/proc-v6.S
+++ b/arch/arm/mm/proc-v6.S
@@ -220,9 +220,7 @@ __v6_setup:
220#endif /* CONFIG_MMU */ 220#endif /* CONFIG_MMU */
221 adr r5, v6_crval 221 adr r5, v6_crval
222 ldmia r5, {r5, r6} 222 ldmia r5, {r5, r6}
223#ifdef CONFIG_CPU_ENDIAN_BE8 223 ARM_BE8(orr r6, r6, #1 << 25) @ big-endian page tables
224 orr r6, r6, #1 << 25 @ big-endian page tables
225#endif
226 mrc p15, 0, r0, c1, c0, 0 @ read control register 224 mrc p15, 0, r0, c1, c0, 0 @ read control register
227 bic r0, r0, r5 @ clear bits them 225 bic r0, r0, r5 @ clear bits them
228 orr r0, r0, r6 @ set them 226 orr r0, r0, r6 @ set them
diff --git a/arch/arm/mm/proc-v7.S b/arch/arm/mm/proc-v7.S
index c63d9bdee51e..60920f62fdf5 100644
--- a/arch/arm/mm/proc-v7.S
+++ b/arch/arm/mm/proc-v7.S
@@ -367,9 +367,7 @@ __v7_setup:
367#endif 367#endif
368 adr r5, v7_crval 368 adr r5, v7_crval
369 ldmia r5, {r5, r6} 369 ldmia r5, {r5, r6}
370#ifdef CONFIG_CPU_ENDIAN_BE8 370 ARM_BE8(orr r6, r6, #1 << 25) @ big-endian page tables
371 orr r6, r6, #1 << 25 @ big-endian page tables
372#endif
373#ifdef CONFIG_SWP_EMULATE 371#ifdef CONFIG_SWP_EMULATE
374 orr r5, r5, #(1 << 10) @ set SW bit in "clear" 372 orr r5, r5, #(1 << 10) @ set SW bit in "clear"
375 bic r6, r6, #(1 << 10) @ clear it in "mmuset" 373 bic r6, r6, #(1 << 10) @ clear it in "mmuset"