mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-30 07:34:12 +08:00
MIPS: pm-cps: convert smp_mb__*()
Commit91bbefe6b0
"arch,mips: Convert smp_mb__*()" replaced the smp_mb__* functions with a simpler API, whilst commit3179d37ee1
"MIPS: pm-cps: add PM state entry code for CPS systems" introduced new uses of smp_mb__before_atomic_inc & smp_mb__after_clear_bit. Replace those calls with the corresponding before & after atomic functions of the new, simpler API in order to avoid a build failure: arch/mips/kernel/pm-cps.c: In function 'coupled_barrier': arch/mips/kernel/pm-cps.c:104:2: error: 'smp_mb__before_atomic_inc' is deprecated (declared at include/linux/atomic.h:11) [-Werror=deprecated-declarations] arch/mips/kernel/pm-cps.c: In function 'cps_pm_enter_state': arch/mips/kernel/pm-cps.c:161:2: error: 'smp_mb__after_clear_bit' is deprecated (declared at include/linux/bitops.h:48) [-Werror=deprecated-declarations] Signed-off-by: Paul Burton <paul.burton@imgtec.com> Reviewed-by: Markos Chandras <markos.chandras@imgtec.com> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/7086/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
This commit is contained in:
parent
e114ba20fe
commit
7c5491b808
@ -101,7 +101,7 @@ static void coupled_barrier(atomic_t *a, unsigned online)
|
||||
if (!coupled_coherence)
|
||||
return;
|
||||
|
||||
smp_mb__before_atomic_inc();
|
||||
smp_mb__before_atomic();
|
||||
atomic_inc(a);
|
||||
|
||||
while (atomic_read(a) < online)
|
||||
@ -158,7 +158,7 @@ int cps_pm_enter_state(enum cps_pm_state state)
|
||||
|
||||
/* Indicate that this CPU might not be coherent */
|
||||
cpumask_clear_cpu(cpu, &cpu_coherent_mask);
|
||||
smp_mb__after_clear_bit();
|
||||
smp_mb__after_atomic();
|
||||
|
||||
/* Create a non-coherent mapping of the core ready_count */
|
||||
core_ready_count = per_cpu(ready_count, core);
|
||||
|
Loading…
Reference in New Issue
Block a user