mirror of
https://github.com/rd-stuffs/msm-4.14.git
synced 2025-02-20 11:45:48 +08:00
i386: fix early usage of atomic_add_return and local_add_return on real i386
The check (boot_cpu_data.x86 == 3) in atomic_add_return() and local_add_return() fails, when those operations are used before boot_cpu_data is filled in. Change the check to (boot_cpu_data.x86 <= 3) to fix this. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
98d8256739
commit
03491c9293
@ -182,7 +182,7 @@ static __inline__ int atomic_add_return(int i, atomic_t *v)
|
|||||||
int __i;
|
int __i;
|
||||||
#ifdef CONFIG_M386
|
#ifdef CONFIG_M386
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
if(unlikely(boot_cpu_data.x86==3))
|
if(unlikely(boot_cpu_data.x86 <= 3))
|
||||||
goto no_xadd;
|
goto no_xadd;
|
||||||
#endif
|
#endif
|
||||||
/* Modern 486+ processor */
|
/* Modern 486+ processor */
|
||||||
|
@ -135,7 +135,7 @@ static __inline__ long local_add_return(long i, local_t *l)
|
|||||||
long __i;
|
long __i;
|
||||||
#ifdef CONFIG_M386
|
#ifdef CONFIG_M386
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
if(unlikely(boot_cpu_data.x86==3))
|
if(unlikely(boot_cpu_data.x86 <= 3))
|
||||||
goto no_xadd;
|
goto no_xadd;
|
||||||
#endif
|
#endif
|
||||||
/* Modern 486+ processor */
|
/* Modern 486+ processor */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user