Commit 455531e9 authored by Christophe Leroy's avatar Christophe Leroy Committed by Michael Ellerman

powerpc: Remove IBM405 Erratum #77

This erratum is dedicated to IBM 405GP and STB03xxx
which are now gone.

Remove this erratum.
Signed-off-by: default avatarChristophe Leroy <christophe.leroy@c-s.fr>
Signed-off-by: default avatarChristophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/44dbc08e9034681eb28324cbabc086e97044c36c.1590079969.git.christophe.leroy@csgroup.eu
parent 59fb463b
#ifndef _ASM_POWERPC_ASM_405_H
#define _ASM_POWERPC_ASM_405_H
#include <asm/asm-const.h>
#ifdef __KERNEL__
#ifdef CONFIG_IBM405_ERR77
/* Erratum #77 on the 405 means we need a sync or dcbt before every
* stwcx. The old ATOMIC_SYNC_FIX covered some but not all of this.
*/
#define PPC405_ERR77(ra,rb) stringify_in_c(dcbt ra, rb;)
#define PPC405_ERR77_SYNC stringify_in_c(sync;)
#else
#define PPC405_ERR77(ra,rb)
#define PPC405_ERR77_SYNC
#endif
#endif
#endif /* _ASM_POWERPC_ASM_405_H */
...@@ -10,7 +10,6 @@ ...@@ -10,7 +10,6 @@
#include <linux/types.h> #include <linux/types.h>
#include <asm/cmpxchg.h> #include <asm/cmpxchg.h>
#include <asm/barrier.h> #include <asm/barrier.h>
#include <asm/asm-405.h>
#define ATOMIC_INIT(i) { (i) } #define ATOMIC_INIT(i) { (i) }
...@@ -47,7 +46,6 @@ static __inline__ void atomic_##op(int a, atomic_t *v) \ ...@@ -47,7 +46,6 @@ static __inline__ void atomic_##op(int a, atomic_t *v) \
__asm__ __volatile__( \ __asm__ __volatile__( \
"1: lwarx %0,0,%3 # atomic_" #op "\n" \ "1: lwarx %0,0,%3 # atomic_" #op "\n" \
#asm_op " %0,%2,%0\n" \ #asm_op " %0,%2,%0\n" \
PPC405_ERR77(0,%3) \
" stwcx. %0,0,%3 \n" \ " stwcx. %0,0,%3 \n" \
" bne- 1b\n" \ " bne- 1b\n" \
: "=&r" (t), "+m" (v->counter) \ : "=&r" (t), "+m" (v->counter) \
...@@ -63,7 +61,6 @@ static inline int atomic_##op##_return_relaxed(int a, atomic_t *v) \ ...@@ -63,7 +61,6 @@ static inline int atomic_##op##_return_relaxed(int a, atomic_t *v) \
__asm__ __volatile__( \ __asm__ __volatile__( \
"1: lwarx %0,0,%3 # atomic_" #op "_return_relaxed\n" \ "1: lwarx %0,0,%3 # atomic_" #op "_return_relaxed\n" \
#asm_op " %0,%2,%0\n" \ #asm_op " %0,%2,%0\n" \
PPC405_ERR77(0, %3) \
" stwcx. %0,0,%3\n" \ " stwcx. %0,0,%3\n" \
" bne- 1b\n" \ " bne- 1b\n" \
: "=&r" (t), "+m" (v->counter) \ : "=&r" (t), "+m" (v->counter) \
...@@ -81,7 +78,6 @@ static inline int atomic_fetch_##op##_relaxed(int a, atomic_t *v) \ ...@@ -81,7 +78,6 @@ static inline int atomic_fetch_##op##_relaxed(int a, atomic_t *v) \
__asm__ __volatile__( \ __asm__ __volatile__( \
"1: lwarx %0,0,%4 # atomic_fetch_" #op "_relaxed\n" \ "1: lwarx %0,0,%4 # atomic_fetch_" #op "_relaxed\n" \
#asm_op " %1,%3,%0\n" \ #asm_op " %1,%3,%0\n" \
PPC405_ERR77(0, %4) \
" stwcx. %1,0,%4\n" \ " stwcx. %1,0,%4\n" \
" bne- 1b\n" \ " bne- 1b\n" \
: "=&r" (res), "=&r" (t), "+m" (v->counter) \ : "=&r" (res), "=&r" (t), "+m" (v->counter) \
...@@ -130,7 +126,6 @@ static __inline__ void atomic_inc(atomic_t *v) ...@@ -130,7 +126,6 @@ static __inline__ void atomic_inc(atomic_t *v)
__asm__ __volatile__( __asm__ __volatile__(
"1: lwarx %0,0,%2 # atomic_inc\n\ "1: lwarx %0,0,%2 # atomic_inc\n\
addic %0,%0,1\n" addic %0,%0,1\n"
PPC405_ERR77(0,%2)
" stwcx. %0,0,%2 \n\ " stwcx. %0,0,%2 \n\
bne- 1b" bne- 1b"
: "=&r" (t), "+m" (v->counter) : "=&r" (t), "+m" (v->counter)
...@@ -146,7 +141,6 @@ static __inline__ int atomic_inc_return_relaxed(atomic_t *v) ...@@ -146,7 +141,6 @@ static __inline__ int atomic_inc_return_relaxed(atomic_t *v)
__asm__ __volatile__( __asm__ __volatile__(
"1: lwarx %0,0,%2 # atomic_inc_return_relaxed\n" "1: lwarx %0,0,%2 # atomic_inc_return_relaxed\n"
" addic %0,%0,1\n" " addic %0,%0,1\n"
PPC405_ERR77(0, %2)
" stwcx. %0,0,%2\n" " stwcx. %0,0,%2\n"
" bne- 1b" " bne- 1b"
: "=&r" (t), "+m" (v->counter) : "=&r" (t), "+m" (v->counter)
...@@ -163,7 +157,6 @@ static __inline__ void atomic_dec(atomic_t *v) ...@@ -163,7 +157,6 @@ static __inline__ void atomic_dec(atomic_t *v)
__asm__ __volatile__( __asm__ __volatile__(
"1: lwarx %0,0,%2 # atomic_dec\n\ "1: lwarx %0,0,%2 # atomic_dec\n\
addic %0,%0,-1\n" addic %0,%0,-1\n"
PPC405_ERR77(0,%2)\
" stwcx. %0,0,%2\n\ " stwcx. %0,0,%2\n\
bne- 1b" bne- 1b"
: "=&r" (t), "+m" (v->counter) : "=&r" (t), "+m" (v->counter)
...@@ -179,7 +172,6 @@ static __inline__ int atomic_dec_return_relaxed(atomic_t *v) ...@@ -179,7 +172,6 @@ static __inline__ int atomic_dec_return_relaxed(atomic_t *v)
__asm__ __volatile__( __asm__ __volatile__(
"1: lwarx %0,0,%2 # atomic_dec_return_relaxed\n" "1: lwarx %0,0,%2 # atomic_dec_return_relaxed\n"
" addic %0,%0,-1\n" " addic %0,%0,-1\n"
PPC405_ERR77(0, %2)
" stwcx. %0,0,%2\n" " stwcx. %0,0,%2\n"
" bne- 1b" " bne- 1b"
: "=&r" (t), "+m" (v->counter) : "=&r" (t), "+m" (v->counter)
...@@ -220,7 +212,6 @@ static __inline__ int atomic_fetch_add_unless(atomic_t *v, int a, int u) ...@@ -220,7 +212,6 @@ static __inline__ int atomic_fetch_add_unless(atomic_t *v, int a, int u)
cmpw 0,%0,%3 \n\ cmpw 0,%0,%3 \n\
beq 2f \n\ beq 2f \n\
add %0,%2,%0 \n" add %0,%2,%0 \n"
PPC405_ERR77(0,%2)
" stwcx. %0,0,%1 \n\ " stwcx. %0,0,%1 \n\
bne- 1b \n" bne- 1b \n"
PPC_ATOMIC_EXIT_BARRIER PPC_ATOMIC_EXIT_BARRIER
...@@ -251,7 +242,6 @@ static __inline__ int atomic_inc_not_zero(atomic_t *v) ...@@ -251,7 +242,6 @@ static __inline__ int atomic_inc_not_zero(atomic_t *v)
cmpwi 0,%0,0\n\ cmpwi 0,%0,0\n\
beq- 2f\n\ beq- 2f\n\
addic %1,%0,1\n" addic %1,%0,1\n"
PPC405_ERR77(0,%2)
" stwcx. %1,0,%2\n\ " stwcx. %1,0,%2\n\
bne- 1b\n" bne- 1b\n"
PPC_ATOMIC_EXIT_BARRIER PPC_ATOMIC_EXIT_BARRIER
...@@ -280,7 +270,6 @@ static __inline__ int atomic_dec_if_positive(atomic_t *v) ...@@ -280,7 +270,6 @@ static __inline__ int atomic_dec_if_positive(atomic_t *v)
cmpwi %0,1\n\ cmpwi %0,1\n\
addi %0,%0,-1\n\ addi %0,%0,-1\n\
blt- 2f\n" blt- 2f\n"
PPC405_ERR77(0,%1)
" stwcx. %0,0,%1\n\ " stwcx. %0,0,%1\n\
bne- 1b" bne- 1b"
PPC_ATOMIC_EXIT_BARRIER PPC_ATOMIC_EXIT_BARRIER
......
...@@ -41,7 +41,6 @@ ...@@ -41,7 +41,6 @@
#include <linux/compiler.h> #include <linux/compiler.h>
#include <asm/asm-compat.h> #include <asm/asm-compat.h>
#include <asm/synch.h> #include <asm/synch.h>
#include <asm/asm-405.h>
/* PPC bit number conversion */ /* PPC bit number conversion */
#define PPC_BITLSHIFT(be) (BITS_PER_LONG - 1 - (be)) #define PPC_BITLSHIFT(be) (BITS_PER_LONG - 1 - (be))
...@@ -73,7 +72,6 @@ static inline void fn(unsigned long mask, \ ...@@ -73,7 +72,6 @@ static inline void fn(unsigned long mask, \
prefix \ prefix \
"1:" PPC_LLARX(%0,0,%3,0) "\n" \ "1:" PPC_LLARX(%0,0,%3,0) "\n" \
stringify_in_c(op) "%0,%0,%2\n" \ stringify_in_c(op) "%0,%0,%2\n" \
PPC405_ERR77(0,%3) \
PPC_STLCX "%0,0,%3\n" \ PPC_STLCX "%0,0,%3\n" \
"bne- 1b\n" \ "bne- 1b\n" \
: "=&r" (old), "+m" (*p) \ : "=&r" (old), "+m" (*p) \
...@@ -119,7 +117,6 @@ static inline unsigned long fn( \ ...@@ -119,7 +117,6 @@ static inline unsigned long fn( \
prefix \ prefix \
"1:" PPC_LLARX(%0,0,%3,eh) "\n" \ "1:" PPC_LLARX(%0,0,%3,eh) "\n" \
stringify_in_c(op) "%1,%0,%2\n" \ stringify_in_c(op) "%1,%0,%2\n" \
PPC405_ERR77(0,%3) \
PPC_STLCX "%1,0,%3\n" \ PPC_STLCX "%1,0,%3\n" \
"bne- 1b\n" \ "bne- 1b\n" \
postfix \ postfix \
...@@ -175,7 +172,6 @@ clear_bit_unlock_return_word(int nr, volatile unsigned long *addr) ...@@ -175,7 +172,6 @@ clear_bit_unlock_return_word(int nr, volatile unsigned long *addr)
PPC_RELEASE_BARRIER PPC_RELEASE_BARRIER
"1:" PPC_LLARX(%0,0,%3,0) "\n" "1:" PPC_LLARX(%0,0,%3,0) "\n"
"andc %1,%0,%2\n" "andc %1,%0,%2\n"
PPC405_ERR77(0,%3)
PPC_STLCX "%1,0,%3\n" PPC_STLCX "%1,0,%3\n"
"bne- 1b\n" "bne- 1b\n"
: "=&r" (old), "=&r" (t) : "=&r" (old), "=&r" (t)
......
...@@ -6,7 +6,6 @@ ...@@ -6,7 +6,6 @@
#include <linux/compiler.h> #include <linux/compiler.h>
#include <asm/synch.h> #include <asm/synch.h>
#include <linux/bug.h> #include <linux/bug.h>
#include <asm/asm-405.h>
#ifdef __BIG_ENDIAN #ifdef __BIG_ENDIAN
#define BITOFF_CAL(size, off) ((sizeof(u32) - size - off) * BITS_PER_BYTE) #define BITOFF_CAL(size, off) ((sizeof(u32) - size - off) * BITS_PER_BYTE)
...@@ -29,7 +28,6 @@ static inline u32 __xchg_##type##sfx(volatile void *p, u32 val) \ ...@@ -29,7 +28,6 @@ static inline u32 __xchg_##type##sfx(volatile void *p, u32 val) \
"1: lwarx %0,0,%3\n" \ "1: lwarx %0,0,%3\n" \
" andc %1,%0,%5\n" \ " andc %1,%0,%5\n" \
" or %1,%1,%4\n" \ " or %1,%1,%4\n" \
PPC405_ERR77(0,%3) \
" stwcx. %1,0,%3\n" \ " stwcx. %1,0,%3\n" \
" bne- 1b\n" \ " bne- 1b\n" \
: "=&r" (prev), "=&r" (tmp), "+m" (*(u32*)p) \ : "=&r" (prev), "=&r" (tmp), "+m" (*(u32*)p) \
...@@ -60,7 +58,6 @@ u32 __cmpxchg_##type##sfx(volatile void *p, u32 old, u32 new) \ ...@@ -60,7 +58,6 @@ u32 __cmpxchg_##type##sfx(volatile void *p, u32 old, u32 new) \
" bne- 2f\n" \ " bne- 2f\n" \
" andc %1,%0,%6\n" \ " andc %1,%0,%6\n" \
" or %1,%1,%5\n" \ " or %1,%1,%5\n" \
PPC405_ERR77(0,%3) \
" stwcx. %1,0,%3\n" \ " stwcx. %1,0,%3\n" \
" bne- 1b\n" \ " bne- 1b\n" \
br2 \ br2 \
...@@ -92,7 +89,6 @@ __xchg_u32_local(volatile void *p, unsigned long val) ...@@ -92,7 +89,6 @@ __xchg_u32_local(volatile void *p, unsigned long val)
__asm__ __volatile__( __asm__ __volatile__(
"1: lwarx %0,0,%2 \n" "1: lwarx %0,0,%2 \n"
PPC405_ERR77(0,%2)
" stwcx. %3,0,%2 \n\ " stwcx. %3,0,%2 \n\
bne- 1b" bne- 1b"
: "=&r" (prev), "+m" (*(volatile unsigned int *)p) : "=&r" (prev), "+m" (*(volatile unsigned int *)p)
...@@ -109,7 +105,6 @@ __xchg_u32_relaxed(u32 *p, unsigned long val) ...@@ -109,7 +105,6 @@ __xchg_u32_relaxed(u32 *p, unsigned long val)
__asm__ __volatile__( __asm__ __volatile__(
"1: lwarx %0,0,%2\n" "1: lwarx %0,0,%2\n"
PPC405_ERR77(0, %2)
" stwcx. %3,0,%2\n" " stwcx. %3,0,%2\n"
" bne- 1b" " bne- 1b"
: "=&r" (prev), "+m" (*p) : "=&r" (prev), "+m" (*p)
...@@ -127,7 +122,6 @@ __xchg_u64_local(volatile void *p, unsigned long val) ...@@ -127,7 +122,6 @@ __xchg_u64_local(volatile void *p, unsigned long val)
__asm__ __volatile__( __asm__ __volatile__(
"1: ldarx %0,0,%2 \n" "1: ldarx %0,0,%2 \n"
PPC405_ERR77(0,%2)
" stdcx. %3,0,%2 \n\ " stdcx. %3,0,%2 \n\
bne- 1b" bne- 1b"
: "=&r" (prev), "+m" (*(volatile unsigned long *)p) : "=&r" (prev), "+m" (*(volatile unsigned long *)p)
...@@ -144,7 +138,6 @@ __xchg_u64_relaxed(u64 *p, unsigned long val) ...@@ -144,7 +138,6 @@ __xchg_u64_relaxed(u64 *p, unsigned long val)
__asm__ __volatile__( __asm__ __volatile__(
"1: ldarx %0,0,%2\n" "1: ldarx %0,0,%2\n"
PPC405_ERR77(0, %2)
" stdcx. %3,0,%2\n" " stdcx. %3,0,%2\n"
" bne- 1b" " bne- 1b"
: "=&r" (prev), "+m" (*p) : "=&r" (prev), "+m" (*p)
...@@ -229,7 +222,6 @@ __cmpxchg_u32(volatile unsigned int *p, unsigned long old, unsigned long new) ...@@ -229,7 +222,6 @@ __cmpxchg_u32(volatile unsigned int *p, unsigned long old, unsigned long new)
"1: lwarx %0,0,%2 # __cmpxchg_u32\n\ "1: lwarx %0,0,%2 # __cmpxchg_u32\n\
cmpw 0,%0,%3\n\ cmpw 0,%0,%3\n\
bne- 2f\n" bne- 2f\n"
PPC405_ERR77(0,%2)
" stwcx. %4,0,%2\n\ " stwcx. %4,0,%2\n\
bne- 1b" bne- 1b"
PPC_ATOMIC_EXIT_BARRIER PPC_ATOMIC_EXIT_BARRIER
...@@ -252,7 +244,6 @@ __cmpxchg_u32_local(volatile unsigned int *p, unsigned long old, ...@@ -252,7 +244,6 @@ __cmpxchg_u32_local(volatile unsigned int *p, unsigned long old,
"1: lwarx %0,0,%2 # __cmpxchg_u32\n\ "1: lwarx %0,0,%2 # __cmpxchg_u32\n\
cmpw 0,%0,%3\n\ cmpw 0,%0,%3\n\
bne- 2f\n" bne- 2f\n"
PPC405_ERR77(0,%2)
" stwcx. %4,0,%2\n\ " stwcx. %4,0,%2\n\
bne- 1b" bne- 1b"
"\n\ "\n\
...@@ -273,7 +264,6 @@ __cmpxchg_u32_relaxed(u32 *p, unsigned long old, unsigned long new) ...@@ -273,7 +264,6 @@ __cmpxchg_u32_relaxed(u32 *p, unsigned long old, unsigned long new)
"1: lwarx %0,0,%2 # __cmpxchg_u32_relaxed\n" "1: lwarx %0,0,%2 # __cmpxchg_u32_relaxed\n"
" cmpw 0,%0,%3\n" " cmpw 0,%0,%3\n"
" bne- 2f\n" " bne- 2f\n"
PPC405_ERR77(0, %2)
" stwcx. %4,0,%2\n" " stwcx. %4,0,%2\n"
" bne- 1b\n" " bne- 1b\n"
"2:" "2:"
...@@ -301,7 +291,6 @@ __cmpxchg_u32_acquire(u32 *p, unsigned long old, unsigned long new) ...@@ -301,7 +291,6 @@ __cmpxchg_u32_acquire(u32 *p, unsigned long old, unsigned long new)
"1: lwarx %0,0,%2 # __cmpxchg_u32_acquire\n" "1: lwarx %0,0,%2 # __cmpxchg_u32_acquire\n"
" cmpw 0,%0,%3\n" " cmpw 0,%0,%3\n"
" bne- 2f\n" " bne- 2f\n"
PPC405_ERR77(0, %2)
" stwcx. %4,0,%2\n" " stwcx. %4,0,%2\n"
" bne- 1b\n" " bne- 1b\n"
PPC_ACQUIRE_BARRIER PPC_ACQUIRE_BARRIER
......
...@@ -8,14 +8,12 @@ ...@@ -8,14 +8,12 @@
#include <linux/uaccess.h> #include <linux/uaccess.h>
#include <asm/errno.h> #include <asm/errno.h>
#include <asm/synch.h> #include <asm/synch.h>
#include <asm/asm-405.h>
#define __futex_atomic_op(insn, ret, oldval, uaddr, oparg) \ #define __futex_atomic_op(insn, ret, oldval, uaddr, oparg) \
__asm__ __volatile ( \ __asm__ __volatile ( \
PPC_ATOMIC_ENTRY_BARRIER \ PPC_ATOMIC_ENTRY_BARRIER \
"1: lwarx %0,0,%2\n" \ "1: lwarx %0,0,%2\n" \
insn \ insn \
PPC405_ERR77(0, %2) \
"2: stwcx. %1,0,%2\n" \ "2: stwcx. %1,0,%2\n" \
"bne- 1b\n" \ "bne- 1b\n" \
PPC_ATOMIC_EXIT_BARRIER \ PPC_ATOMIC_EXIT_BARRIER \
...@@ -82,7 +80,6 @@ futex_atomic_cmpxchg_inatomic(u32 *uval, u32 __user *uaddr, ...@@ -82,7 +80,6 @@ futex_atomic_cmpxchg_inatomic(u32 *uval, u32 __user *uaddr,
"1: lwarx %1,0,%3 # futex_atomic_cmpxchg_inatomic\n\ "1: lwarx %1,0,%3 # futex_atomic_cmpxchg_inatomic\n\
cmpw 0,%1,%4\n\ cmpw 0,%1,%4\n\
bne- 3f\n" bne- 3f\n"
PPC405_ERR77(0,%3)
"2: stwcx. %5,0,%3\n\ "2: stwcx. %5,0,%3\n\
bne- 1b\n" bne- 1b\n"
PPC_ATOMIC_EXIT_BARRIER PPC_ATOMIC_EXIT_BARRIER
......
...@@ -9,7 +9,6 @@ ...@@ -9,7 +9,6 @@
#include <linux/sched.h> #include <linux/sched.h>
#include <linux/threads.h> #include <linux/threads.h>
#include <asm/mmu.h> /* For sub-arch specific PPC_PIN_SIZE */ #include <asm/mmu.h> /* For sub-arch specific PPC_PIN_SIZE */
#include <asm/asm-405.h>
#ifdef CONFIG_44x #ifdef CONFIG_44x
extern int icache_44x_need_flush; extern int icache_44x_need_flush;
......
...@@ -23,7 +23,6 @@ ...@@ -23,7 +23,6 @@
#endif #endif
#include <asm/synch.h> #include <asm/synch.h>
#include <asm/ppc-opcode.h> #include <asm/ppc-opcode.h>
#include <asm/asm-405.h>
#ifdef CONFIG_PPC64 #ifdef CONFIG_PPC64
/* use 0x800000yy when locked, where yy == CPU number */ /* use 0x800000yy when locked, where yy == CPU number */
...@@ -210,7 +209,6 @@ static inline long __arch_read_trylock(arch_rwlock_t *rw) ...@@ -210,7 +209,6 @@ static inline long __arch_read_trylock(arch_rwlock_t *rw)
__DO_SIGN_EXTEND __DO_SIGN_EXTEND
" addic. %0,%0,1\n\ " addic. %0,%0,1\n\
ble- 2f\n" ble- 2f\n"
PPC405_ERR77(0,%1)
" stwcx. %0,0,%1\n\ " stwcx. %0,0,%1\n\
bne- 1b\n" bne- 1b\n"
PPC_ACQUIRE_BARRIER PPC_ACQUIRE_BARRIER
...@@ -234,7 +232,6 @@ static inline long __arch_write_trylock(arch_rwlock_t *rw) ...@@ -234,7 +232,6 @@ static inline long __arch_write_trylock(arch_rwlock_t *rw)
"1: " PPC_LWARX(%0,0,%2,1) "\n\ "1: " PPC_LWARX(%0,0,%2,1) "\n\
cmpwi 0,%0,0\n\ cmpwi 0,%0,0\n\
bne- 2f\n" bne- 2f\n"
PPC405_ERR77(0,%1)
" stwcx. %1,0,%2\n\ " stwcx. %1,0,%2\n\
bne- 1b\n" bne- 1b\n"
PPC_ACQUIRE_BARRIER PPC_ACQUIRE_BARRIER
...@@ -292,7 +289,6 @@ static inline void arch_read_unlock(arch_rwlock_t *rw) ...@@ -292,7 +289,6 @@ static inline void arch_read_unlock(arch_rwlock_t *rw)
PPC_RELEASE_BARRIER PPC_RELEASE_BARRIER
"1: lwarx %0,0,%1\n\ "1: lwarx %0,0,%1\n\
addic %0,%0,-1\n" addic %0,%0,-1\n"
PPC405_ERR77(0,%1)
" stwcx. %0,0,%1\n\ " stwcx. %0,0,%1\n\
bne- 1b" bne- 1b"
: "=&r"(tmp) : "=&r"(tmp)
......
...@@ -28,7 +28,6 @@ ...@@ -28,7 +28,6 @@
#include <asm/unistd.h> #include <asm/unistd.h>
#include <asm/ptrace.h> #include <asm/ptrace.h>
#include <asm/export.h> #include <asm/export.h>
#include <asm/asm-405.h>
#include <asm/feature-fixups.h> #include <asm/feature-fixups.h>
#include <asm/barrier.h> #include <asm/barrier.h>
#include <asm/kup.h> #include <asm/kup.h>
...@@ -541,9 +540,6 @@ syscall_exit_work: ...@@ -541,9 +540,6 @@ syscall_exit_work:
addi r12,r2,TI_FLAGS addi r12,r2,TI_FLAGS
3: lwarx r8,0,r12 3: lwarx r8,0,r12
andc r8,r8,r11 andc r8,r8,r11
#ifdef CONFIG_IBM405_ERR77
dcbt 0,r12
#endif
stwcx. r8,0,r12 stwcx. r8,0,r12
bne- 3b bne- 3b
...@@ -918,9 +914,6 @@ resume_kernel: ...@@ -918,9 +914,6 @@ resume_kernel:
addi r5,r2,TI_FLAGS addi r5,r2,TI_FLAGS
0: lwarx r8,0,r5 0: lwarx r8,0,r5
andc r8,r8,r11 andc r8,r8,r11
#ifdef CONFIG_IBM405_ERR77
dcbt 0,r5
#endif
stwcx. r8,0,r5 stwcx. r8,0,r5
bne- 0b bne- 0b
1: 1:
...@@ -997,7 +990,6 @@ END_MMU_FTR_SECTION_IFSET(MMU_FTR_TYPE_47x) ...@@ -997,7 +990,6 @@ END_MMU_FTR_SECTION_IFSET(MMU_FTR_TYPE_47x)
mtspr SPRN_XER,r10 mtspr SPRN_XER,r10
mtctr r11 mtctr r11
PPC405_ERR77(0,r1)
BEGIN_FTR_SECTION BEGIN_FTR_SECTION
lwarx r11,0,r1 lwarx r11,0,r1
END_FTR_SECTION_IFSET(CPU_FTR_NEED_PAIRED_STWCX) END_FTR_SECTION_IFSET(CPU_FTR_NEED_PAIRED_STWCX)
...@@ -1066,7 +1058,6 @@ exc_exit_start: ...@@ -1066,7 +1058,6 @@ exc_exit_start:
lwz r1,GPR1(r1) lwz r1,GPR1(r1)
.globl exc_exit_restart_end .globl exc_exit_restart_end
exc_exit_restart_end: exc_exit_restart_end:
PPC405_ERR77_SYNC
rfi rfi
b . /* prevent prefetch past rfi */ b . /* prevent prefetch past rfi */
...@@ -1109,7 +1100,6 @@ exc_exit_restart_end: ...@@ -1109,7 +1100,6 @@ exc_exit_restart_end:
lwz r11,_CTR(r1); \ lwz r11,_CTR(r1); \
mtspr SPRN_XER,r10; \ mtspr SPRN_XER,r10; \
mtctr r11; \ mtctr r11; \
PPC405_ERR77(0,r1); \
stwcx. r0,0,r1; /* to clear the reservation */ \ stwcx. r0,0,r1; /* to clear the reservation */ \
lwz r11,_LINK(r1); \ lwz r11,_LINK(r1); \
mtlr r11; \ mtlr r11; \
...@@ -1129,7 +1119,6 @@ exc_exit_restart_end: ...@@ -1129,7 +1119,6 @@ exc_exit_restart_end:
lwz r10,GPR10(r1); \ lwz r10,GPR10(r1); \
lwz r11,GPR11(r1); \ lwz r11,GPR11(r1); \
lwz r1,GPR1(r1); \ lwz r1,GPR1(r1); \
PPC405_ERR77_SYNC; \
exc_lvl_rfi; \ exc_lvl_rfi; \
b .; /* prevent prefetch past exc_lvl_rfi */ b .; /* prevent prefetch past exc_lvl_rfi */
......
...@@ -36,7 +36,6 @@ ...@@ -36,7 +36,6 @@
#include <asm/asm-offsets.h> #include <asm/asm-offsets.h>
#include <asm/ptrace.h> #include <asm/ptrace.h>
#include <asm/export.h> #include <asm/export.h>
#include <asm/asm-405.h>
#include "head_32.h" #include "head_32.h"
...@@ -487,7 +486,6 @@ _ENTRY(saved_ksp_limit) ...@@ -487,7 +486,6 @@ _ENTRY(saved_ksp_limit)
lwz r12,GPR12(r11) lwz r12,GPR12(r11)
lwz r10,crit_r10@l(0) lwz r10,crit_r10@l(0)
lwz r11,crit_r11@l(0) lwz r11,crit_r11@l(0)
PPC405_ERR77_SYNC
rfci rfci
b . b .
...@@ -569,7 +567,6 @@ finish_tlb_load: ...@@ -569,7 +567,6 @@ finish_tlb_load:
mfspr r12, SPRN_SPRG_SCRATCH3 mfspr r12, SPRN_SPRG_SCRATCH3
mfspr r11, SPRN_SPRG_SCRATCH1 mfspr r11, SPRN_SPRG_SCRATCH1
mfspr r10, SPRN_SPRG_SCRATCH0 mfspr r10, SPRN_SPRG_SCRATCH0
PPC405_ERR77_SYNC
rfi /* Should sync shadow TLBs */ rfi /* Should sync shadow TLBs */
b . /* prevent prefetch past rfi */ b . /* prevent prefetch past rfi */
......
...@@ -69,12 +69,6 @@ config PPC4xx_GPIO ...@@ -69,12 +69,6 @@ config PPC4xx_GPIO
help help
Enable gpiolib support for ppc40x based boards Enable gpiolib support for ppc40x based boards
# 40x errata/workaround config symbols, selected by the CPU models above
# All 405-based cores up until the 405GPR and 405EP have this errata.
config IBM405_ERR77
bool
config APM8018X config APM8018X
bool "APM8018X" bool "APM8018X"
depends on 40x depends on 40x
......
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