diff options
author | Matt Redfearn <matt.redfearn@imgtec.com> | 2016-09-07 05:45:15 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2016-10-04 10:13:57 -0400 |
commit | 90b084b1bc7ebde5379017c29ae617fcc4ccd557 (patch) | |
tree | a3df59f05a5633a374c5dc5021ea80cfdfd86744 /arch/mips/kernel | |
parent | 85e540be7549c8eda90f056d30534be8f58777a7 (diff) |
MIPS: pm-cps: Use MIPS standard completion barrier
SYNC type 0 is defined in the MIPS architecture as a completion barrier
where all loads/stores in the pipeline before the sync instruction must
complete before any loads/stores subsequent to the sync instruction.
In places where we require loads / stores be globally completed, use the
standard completion sync stype.
Signed-off-by: Matt Redfearn <matt.redfearn@imgtec.com>
Reviewed-by: Paul Burton <paul.burton@imgtec.com>
Cc: Adam Buchbinder <adam.buchbinder@gmail.com>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/14224/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/kernel')
-rw-r--r-- | arch/mips/kernel/pm-cps.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/arch/mips/kernel/pm-cps.c b/arch/mips/kernel/pm-cps.c index d7037fe00d1c..953ff0db9061 100644 --- a/arch/mips/kernel/pm-cps.c +++ b/arch/mips/kernel/pm-cps.c | |||
@@ -315,7 +315,7 @@ static int __init cps_gen_flush_fsb(u32 **pp, struct uasm_label **pl, | |||
315 | } | 315 | } |
316 | 316 | ||
317 | /* Barrier ensuring previous cache invalidates are complete */ | 317 | /* Barrier ensuring previous cache invalidates are complete */ |
318 | uasm_i_sync(pp, stype_memory); | 318 | uasm_i_sync(pp, STYPE_SYNC); |
319 | uasm_i_ehb(pp); | 319 | uasm_i_ehb(pp); |
320 | 320 | ||
321 | /* Check whether the pipeline stalled due to the FSB being full */ | 321 | /* Check whether the pipeline stalled due to the FSB being full */ |
@@ -467,7 +467,7 @@ static void * __init cps_gen_entry_code(unsigned cpu, enum cps_pm_state state) | |||
467 | Index_Writeback_Inv_D, lbl_flushdcache); | 467 | Index_Writeback_Inv_D, lbl_flushdcache); |
468 | 468 | ||
469 | /* Barrier ensuring previous cache invalidates are complete */ | 469 | /* Barrier ensuring previous cache invalidates are complete */ |
470 | uasm_i_sync(&p, stype_memory); | 470 | uasm_i_sync(&p, STYPE_SYNC); |
471 | uasm_i_ehb(&p); | 471 | uasm_i_ehb(&p); |
472 | 472 | ||
473 | /* | 473 | /* |
@@ -480,7 +480,7 @@ static void * __init cps_gen_entry_code(unsigned cpu, enum cps_pm_state state) | |||
480 | uasm_i_lw(&p, t0, 0, r_pcohctl); | 480 | uasm_i_lw(&p, t0, 0, r_pcohctl); |
481 | 481 | ||
482 | /* Barrier to ensure write to coherence control is complete */ | 482 | /* Barrier to ensure write to coherence control is complete */ |
483 | uasm_i_sync(&p, stype_intervention); | 483 | uasm_i_sync(&p, STYPE_SYNC); |
484 | uasm_i_ehb(&p); | 484 | uasm_i_ehb(&p); |
485 | 485 | ||
486 | /* Disable coherence */ | 486 | /* Disable coherence */ |
@@ -526,7 +526,7 @@ static void * __init cps_gen_entry_code(unsigned cpu, enum cps_pm_state state) | |||
526 | } | 526 | } |
527 | 527 | ||
528 | /* Barrier to ensure write to CPC command is complete */ | 528 | /* Barrier to ensure write to CPC command is complete */ |
529 | uasm_i_sync(&p, stype_memory); | 529 | uasm_i_sync(&p, STYPE_SYNC); |
530 | uasm_i_ehb(&p); | 530 | uasm_i_ehb(&p); |
531 | } | 531 | } |
532 | 532 | ||
@@ -561,7 +561,7 @@ static void * __init cps_gen_entry_code(unsigned cpu, enum cps_pm_state state) | |||
561 | uasm_i_lw(&p, t0, 0, r_pcohctl); | 561 | uasm_i_lw(&p, t0, 0, r_pcohctl); |
562 | 562 | ||
563 | /* Barrier to ensure write to coherence control is complete */ | 563 | /* Barrier to ensure write to coherence control is complete */ |
564 | uasm_i_sync(&p, stype_memory); | 564 | uasm_i_sync(&p, STYPE_SYNC); |
565 | uasm_i_ehb(&p); | 565 | uasm_i_ehb(&p); |
566 | 566 | ||
567 | if (coupled_coherence && (state == CPS_PM_NC_WAIT)) { | 567 | if (coupled_coherence && (state == CPS_PM_NC_WAIT)) { |