]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
arch/sparc: Avoid DCTI Couples
authorAllen Pais <allen.pais@oracle.com>
Wed, 21 Jun 2017 09:48:25 +0000 (15:18 +0530)
committerAllen Pais <allen.pais@oracle.com>
Sat, 24 Jun 2017 01:27:48 +0000 (06:57 +0530)
Avoid un-intended DCTI Couples. Use of DCTI couples is deprecated per
Oracle SPARC Architecture notes below(Section 6.3.4.7 - DCTI Couples).

"A delayed control transfer instruction (DCTI) in the delay slot of another
DCTI is referred to as a DCTI couple. The use of DCTI couples is deprecated
in the Oracle SPARC Architecture; no new software should place a DCTI in
the delay slot of another DCTI, because on future Oracle SPARC Architecture
implementations DCTI couples may execute either slowly or differently than
the programmer assumes it will."

Orabug: 25456049

Signed-off-by: Babu Moger <babu.moger@oracle.com>
Reviewed-by: Rob Gardner <rob.gardner@oracle.com>
Signed-off-by: Allen Pais <allen.pais@oracle.com>
arch/sparc/kernel/cherrs.S
arch/sparc/kernel/head_64.S
arch/sparc/kernel/rtrap_64.S
arch/sparc/kernel/sun4v_tlb_miss.S
arch/sparc/kernel/urtt_fill.S
arch/sparc/kernel/winfixup.S
arch/sparc/lib/NG2memcpy.S
arch/sparc/lib/NG4memcpy.S
arch/sparc/lib/NGmemcpy.S

index 4ee1ad420862d425cff03ba7aad8e395fcb75907..9a8877d501ff7f63260c2f6a29095e1686a6cc2b 100644 (file)
@@ -576,4 +576,5 @@ c_deferred:
        call            cheetah_deferred_handler
         add            %sp, PTREGS_OFF, %o0
        ba,a,pt         %xcc, rtrap_irq
+        nop
        .size           c_deferred,.-c_deferred
index 2f572a2e9a7779be085303118500a68732f4319a..0fbe628dbd5221b12c581a33646a9a3f588afcee 100644 (file)
@@ -103,6 +103,7 @@ sparc64_boot:
        andn    %g1, PSTATE_AM, %g1
        wrpr    %g1, 0x0, %pstate
        ba,a,pt %xcc, 1f
+        nop
 
        .globl  prom_finddev_name, prom_chosen_path, prom_root_node
        .globl  prom_getprop_name, prom_mmu_name, prom_peer_name
@@ -643,6 +644,8 @@ niagara_tlb_fixup:
         nop
 
        ba,a,pt %xcc, 80f
+        nop
+
 sparc_m7_patch:
        call    m7_patch_copyops
         nop
@@ -652,6 +655,7 @@ sparc_m7_patch:
         nop
 
        ba,a,pt %xcc, 80f
+        nop
 
 sparc_m8_patch:
        call    m8_patch_copyops
@@ -673,6 +677,7 @@ niagara4_patch:
         nop
 
        ba,a,pt %xcc, 80f
+        nop
 
 niagara2_patch:
        call    niagara2_patch_copyops
@@ -683,6 +688,7 @@ niagara2_patch:
         nop
 
        ba,a,pt %xcc, 80f
+        nop
 
 niagara_patch:
        call    niagara_patch_copyops
index 216948ca43829d0c0a5be837ff183f86d03dfb49..709a82ebd294c07bd4b87698c695325e5093a7e4 100644 (file)
@@ -237,6 +237,7 @@ rt_continue:        ldx                     [%sp + PTREGS_OFF + PT_V9_G1], %g1
                bne,pt                  %xcc, user_rtt_fill_32bit
                 wrpr                   %g1, %cwp
                ba,a,pt                 %xcc, user_rtt_fill_64bit
+                nop
 
 user_rtt_fill_fixup_dax:
                ba,pt   %xcc, user_rtt_fill_fixup_common
index 8206f585386659bb5bf8185b1e917bc8d26e9396..fe612ed9cd158357804f111ec86982fe7322204a 100644 (file)
@@ -353,6 +353,7 @@ sun4v_mna:
         add    %sp, PTREGS_OFF, %o0
        ba,a,pt %xcc, rtrap
 
+        nop
        /* Privileged Action.  */
 sun4v_privact:
        ba,pt   %xcc, etrap
index 5604a2b051d46bb822873a31b9b1f88a85253562..ca1a0c1b9d76f811ae180a014dfb52d10f2447c8 100644 (file)
@@ -93,6 +93,7 @@ user_rtt_fill_fixup_common:
                 nop
                ba,a,pt %xcc, rtrap
 
+                nop
 1:             call    spitfire_data_access_exception
                 nop
                ba,a,pt %xcc, rtrap
index 1e67ce95836972d439b50c88aa77d8395a543652..d9162a8ea3d60073964d5322db9d1bf30e216d9e 100644 (file)
@@ -153,6 +153,8 @@ fill_fixup_dax:
        call    sun4v_data_access_exception
         nop
        ba,a,pt %xcc, rtrap
+        nop
 1:     call    spitfire_data_access_exception
         nop
        ba,a,pt %xcc, rtrap
+        nop
index d5f585df2f3fc345c87f04fb1a420fa766816cb5..aa922a778be1691ebb4dfab269d4ba885c1f9693 100644 (file)
@@ -264,11 +264,13 @@ FUNC_NAME:        /* %o0=dst, %o1=src, %o2=len */
        blu             170f
         nop
        ba,a,pt         %xcc, 180f
+        nop
 
 4:     /* 32 <= low bits < 48 */
        blu             150f
         nop
        ba,a,pt         %xcc, 160f
+        nop
 5:     /* 0 < low bits < 32 */
        blu,a           6f
         cmp            %g2, 8
@@ -276,6 +278,7 @@ FUNC_NAME:  /* %o0=dst, %o1=src, %o2=len */
        blu             130f
         nop
        ba,a,pt         %xcc, 140f
+        nop
 6:     /* 0 < low bits < 16 */
        bgeu            120f
         nop
@@ -413,6 +416,7 @@ FUNC_NAME:  /* %o0=dst, %o1=src, %o2=len */
        brz,pt          %o2, 85f
         sub            %o0, %o1, GLOBAL_SPARE
        ba,a,pt         %XCC, 90f
+        nop
 
        .align          64
 75: /* 16 < len <= 64 */
index 8e13ee1f4454ea2b6478d302a9a1048bfeb60aff..3150a129aa7d0735edb96ebf99f3f8730a6fb963 100644 (file)
@@ -203,6 +203,7 @@ FUNC_NAME:  /* %o0=dst, %o1=src, %o2=len */
         nop
        ba,a,pt         %icc, .Lmedium_noprefetch
 
+        nop
 .Lexit:        retl
         mov            EX_RETVAL(%o3), %o0
 
@@ -378,4 +379,5 @@ FUNC_NAME:  /* %o0=dst, %o1=src, %o2=len */
        bne,pt          %icc, 1b
         EX_ST(STORE(stb, %g1, %o0 - 0x01))
        ba,a,pt         %icc, .Lexit
+        nop
        .size           FUNC_NAME, .-FUNC_NAME
index 96a14caf6966282cab2d97071f7c3837b2a6727a..09ba224a93097569ffd1128b2069ed9d14ed9c50 100644 (file)
@@ -311,6 +311,7 @@ FUNC_NAME:  /* %i0=dst, %i1=src, %i2=len */
        brz,pt          %i2, 85f
         sub            %o0, %i1, %i3
        ba,a,pt         %XCC, 90f
+        nop
 
        .align          64
 70: /* 16 < len <= 64 */