Commit 1658f914 authored by Steven J. Hill's avatar Steven J. Hill Committed by Ralf Baechle

MIPS: microMIPS: Disable LL/SC and fix linker bug.

Partially revert commit e0c14a260d66ba35935600d6435940a566fe806b
and turn off LL/SC when building a pure microMIPS kernel. This is
a temporary fix until the cmpxchg assembly macro functions are
re-written to not use the HI/LO registers in address calculations.

Also add .insn in selected user access functions which would
otherwise produce ISA mode jump incompatibilities. This is also a
temporary fix.
Signed-off-by: default avatarSteven J. Hill <Steven.Hill@imgtec.com>
parent 01be057b
...@@ -28,7 +28,11 @@ ...@@ -28,7 +28,11 @@
/* #define cpu_has_prefetch ? */ /* #define cpu_has_prefetch ? */
#define cpu_has_mcheck 1 #define cpu_has_mcheck 1
/* #define cpu_has_ejtag ? */ /* #define cpu_has_ejtag ? */
#ifdef CONFIG_CPU_MICROMIPS
#define cpu_has_llsc 0
#else
#define cpu_has_llsc 1 #define cpu_has_llsc 1
#endif
/* #define cpu_has_vtag_icache ? */ /* #define cpu_has_vtag_icache ? */
/* #define cpu_has_dc_aliases ? */ /* #define cpu_has_dc_aliases ? */
/* #define cpu_has_ic_fills_f_dc ? */ /* #define cpu_has_ic_fills_f_dc ? */
......
...@@ -261,6 +261,7 @@ do { \ ...@@ -261,6 +261,7 @@ do { \
__asm__ __volatile__( \ __asm__ __volatile__( \
"1: " insn " %1, %3 \n" \ "1: " insn " %1, %3 \n" \
"2: \n" \ "2: \n" \
" .insn \n" \
" .section .fixup,\"ax\" \n" \ " .section .fixup,\"ax\" \n" \
"3: li %0, %4 \n" \ "3: li %0, %4 \n" \
" j 2b \n" \ " j 2b \n" \
...@@ -287,7 +288,9 @@ do { \ ...@@ -287,7 +288,9 @@ do { \
__asm__ __volatile__( \ __asm__ __volatile__( \
"1: lw %1, (%3) \n" \ "1: lw %1, (%3) \n" \
"2: lw %D1, 4(%3) \n" \ "2: lw %D1, 4(%3) \n" \
"3: .section .fixup,\"ax\" \n" \ "3: \n" \
" .insn \n" \
" .section .fixup,\"ax\" \n" \
"4: li %0, %4 \n" \ "4: li %0, %4 \n" \
" move %1, $0 \n" \ " move %1, $0 \n" \
" move %D1, $0 \n" \ " move %D1, $0 \n" \
...@@ -355,6 +358,7 @@ do { \ ...@@ -355,6 +358,7 @@ do { \
__asm__ __volatile__( \ __asm__ __volatile__( \
"1: " insn " %z2, %3 # __put_user_asm\n" \ "1: " insn " %z2, %3 # __put_user_asm\n" \
"2: \n" \ "2: \n" \
" .insn \n" \
" .section .fixup,\"ax\" \n" \ " .section .fixup,\"ax\" \n" \
"3: li %0, %4 \n" \ "3: li %0, %4 \n" \
" j 2b \n" \ " j 2b \n" \
...@@ -373,6 +377,7 @@ do { \ ...@@ -373,6 +377,7 @@ do { \
"1: sw %2, (%3) # __put_user_asm_ll32 \n" \ "1: sw %2, (%3) # __put_user_asm_ll32 \n" \
"2: sw %D2, 4(%3) \n" \ "2: sw %D2, 4(%3) \n" \
"3: \n" \ "3: \n" \
" .insn \n" \
" .section .fixup,\"ax\" \n" \ " .section .fixup,\"ax\" \n" \
"4: li %0, %4 \n" \ "4: li %0, %4 \n" \
" j 3b \n" \ " j 3b \n" \
...@@ -524,6 +529,7 @@ do { \ ...@@ -524,6 +529,7 @@ do { \
__asm__ __volatile__( \ __asm__ __volatile__( \
"1: " insn " %1, %3 \n" \ "1: " insn " %1, %3 \n" \
"2: \n" \ "2: \n" \
" .insn \n" \
" .section .fixup,\"ax\" \n" \ " .section .fixup,\"ax\" \n" \
"3: li %0, %4 \n" \ "3: li %0, %4 \n" \
" j 2b \n" \ " j 2b \n" \
...@@ -549,7 +555,9 @@ do { \ ...@@ -549,7 +555,9 @@ do { \
"1: ulw %1, (%3) \n" \ "1: ulw %1, (%3) \n" \
"2: ulw %D1, 4(%3) \n" \ "2: ulw %D1, 4(%3) \n" \
" move %0, $0 \n" \ " move %0, $0 \n" \
"3: .section .fixup,\"ax\" \n" \ "3: \n" \
" .insn \n" \
" .section .fixup,\"ax\" \n" \
"4: li %0, %4 \n" \ "4: li %0, %4 \n" \
" move %1, $0 \n" \ " move %1, $0 \n" \
" move %D1, $0 \n" \ " move %D1, $0 \n" \
...@@ -616,6 +624,7 @@ do { \ ...@@ -616,6 +624,7 @@ do { \
__asm__ __volatile__( \ __asm__ __volatile__( \
"1: " insn " %z2, %3 # __put_user_unaligned_asm\n" \ "1: " insn " %z2, %3 # __put_user_unaligned_asm\n" \
"2: \n" \ "2: \n" \
" .insn \n" \
" .section .fixup,\"ax\" \n" \ " .section .fixup,\"ax\" \n" \
"3: li %0, %4 \n" \ "3: li %0, %4 \n" \
" j 2b \n" \ " j 2b \n" \
...@@ -634,6 +643,7 @@ do { \ ...@@ -634,6 +643,7 @@ do { \
"1: sw %2, (%3) # __put_user_unaligned_asm_ll32 \n" \ "1: sw %2, (%3) # __put_user_unaligned_asm_ll32 \n" \
"2: sw %D2, 4(%3) \n" \ "2: sw %D2, 4(%3) \n" \
"3: \n" \ "3: \n" \
" .insn \n" \
" .section .fixup,\"ax\" \n" \ " .section .fixup,\"ax\" \n" \
"4: li %0, %4 \n" \ "4: li %0, %4 \n" \
" j 3b \n" \ " j 3b \n" \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment