hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/arch/mips/kernel/pm-cps.c
....@@ -1,11 +1,7 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * Copyright (C) 2014 Imagination Technologies
34 * Author: Paul Burton <paul.burton@mips.com>
4
- *
5
- * This program is free software; you can redistribute it and/or modify it
6
- * under the terms of the GNU General Public License as published by the
7
- * Free Software Foundation; either version 2 of the License, or (at your
8
- * option) any later version.
95 */
106
117 #include <linux/cpuhotplug.h>
....@@ -311,7 +307,7 @@
311307 }
312308
313309 /* Barrier ensuring previous cache invalidates are complete */
314
- uasm_i_sync(pp, STYPE_SYNC);
310
+ uasm_i_sync(pp, __SYNC_full);
315311 uasm_i_ehb(pp);
316312
317313 /* Check whether the pipeline stalled due to the FSB being full */
....@@ -401,7 +397,7 @@
401397
402398 if (coupled_coherence) {
403399 /* Increment ready_count */
404
- uasm_i_sync(&p, STYPE_SYNC_MB);
400
+ uasm_i_sync(&p, __SYNC_mb);
405401 uasm_build_label(&l, p, lbl_incready);
406402 uasm_i_ll(&p, t1, 0, r_nc_count);
407403 uasm_i_addiu(&p, t2, t1, 1);
....@@ -410,7 +406,7 @@
410406 uasm_i_addiu(&p, t1, t1, 1);
411407
412408 /* Barrier ensuring all CPUs see the updated r_nc_count value */
413
- uasm_i_sync(&p, STYPE_SYNC_MB);
409
+ uasm_i_sync(&p, __SYNC_mb);
414410
415411 /*
416412 * If this is the last VPE to become ready for non-coherence
....@@ -477,7 +473,7 @@
477473 Index_Writeback_Inv_D, lbl_flushdcache);
478474
479475 /* Barrier ensuring previous cache invalidates are complete */
480
- uasm_i_sync(&p, STYPE_SYNC);
476
+ uasm_i_sync(&p, __SYNC_full);
481477 uasm_i_ehb(&p);
482478
483479 if (mips_cm_revision() < CM_REV_CM3) {
....@@ -491,7 +487,7 @@
491487 uasm_i_lw(&p, t0, 0, r_pcohctl);
492488
493489 /* Barrier to ensure write to coherence control is complete */
494
- uasm_i_sync(&p, STYPE_SYNC);
490
+ uasm_i_sync(&p, __SYNC_full);
495491 uasm_i_ehb(&p);
496492 }
497493
....@@ -538,7 +534,7 @@
538534 }
539535
540536 /* Barrier to ensure write to CPC command is complete */
541
- uasm_i_sync(&p, STYPE_SYNC);
537
+ uasm_i_sync(&p, __SYNC_full);
542538 uasm_i_ehb(&p);
543539 }
544540
....@@ -576,13 +572,13 @@
576572 uasm_i_lw(&p, t0, 0, r_pcohctl);
577573
578574 /* Barrier to ensure write to coherence control is complete */
579
- uasm_i_sync(&p, STYPE_SYNC);
575
+ uasm_i_sync(&p, __SYNC_full);
580576 uasm_i_ehb(&p);
581577
582578 if (coupled_coherence && (state == CPS_PM_NC_WAIT)) {
583579 /* Decrement ready_count */
584580 uasm_build_label(&l, p, lbl_decready);
585
- uasm_i_sync(&p, STYPE_SYNC_MB);
581
+ uasm_i_sync(&p, __SYNC_mb);
586582 uasm_i_ll(&p, t1, 0, r_nc_count);
587583 uasm_i_addiu(&p, t2, t1, -1);
588584 uasm_i_sc(&p, t2, 0, r_nc_count);
....@@ -590,7 +586,7 @@
590586 uasm_i_andi(&p, v0, t1, (1 << fls(smp_num_siblings)) - 1);
591587
592588 /* Barrier ensuring all CPUs see the updated r_nc_count value */
593
- uasm_i_sync(&p, STYPE_SYNC_MB);
589
+ uasm_i_sync(&p, __SYNC_mb);
594590 }
595591
596592 if (coupled_coherence && (state == CPS_PM_CLOCK_GATED)) {
....@@ -612,7 +608,7 @@
612608 uasm_build_label(&l, p, lbl_secondary_cont);
613609
614610 /* Barrier ensuring all CPUs see the updated r_nc_count value */
615
- uasm_i_sync(&p, STYPE_SYNC_MB);
611
+ uasm_i_sync(&p, __SYNC_mb);
616612 }
617613
618614 /* The core is coherent, time to return to C code */