[SPARC64]: Sanitize %pstate writes for sun4v.
[linux-2.6.git] / arch / sparc64 / mm / ultra.S
index cac58d66fca904f178c4a5b7b46acf01665a347e..5dd86ad0d29f83a1a75c0d25c2761af3cb6434f0 100644 (file)
@@ -444,8 +444,15 @@ xcall_flush_tlb_kernel_range:      /* 22 insns */
         */
        .globl          xcall_sync_tick
 xcall_sync_tick:
-       rdpr            %pstate, %g2
+
+661:   rdpr            %pstate, %g2
        wrpr            %g2, PSTATE_IG | PSTATE_AG, %pstate
+       .section        .gl_2insn_patch, "ax"
+       .word           661b
+       nop
+       nop
+       .previous
+
        rdpr            %pil, %g2
        wrpr            %g0, 15, %pil
        sethi           %hi(109f), %g7
@@ -468,8 +475,15 @@ xcall_sync_tick:
         */
        .globl          xcall_report_regs
 xcall_report_regs:
-       rdpr            %pstate, %g2
+
+661:   rdpr            %pstate, %g2
        wrpr            %g2, PSTATE_IG | PSTATE_AG, %pstate
+       .section        .gl_2insn_patch, "ax"
+       .word           661b
+       nop
+       nop
+       .previous
+
        rdpr            %pil, %g2
        wrpr            %g0, 15, %pil
        sethi           %hi(109f), %g7