Skip to content

Commit d51f86c

Browse files
aikmpe
authored andcommitted
powerpc/mm: Switch obsolete dssall to .long
The dssall ("Data Stream Stop All") instruction is obsolete altogether with other Data Cache Instructions since ISA 2.03 (year 2006). LLVM IAS does not support it but PPC970 seems to be using it. This switches dssall to .long as there is no much point in fixing LLVM. Signed-off-by: Alexey Kardashevskiy <[email protected]> Signed-off-by: Michael Ellerman <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent d72c4a3 commit d51f86c

File tree

8 files changed

+12
-10
lines changed

8 files changed

+12
-10
lines changed

arch/powerpc/include/asm/ppc-opcode.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,7 @@
249249
#define PPC_INST_COPY 0x7c20060c
250250
#define PPC_INST_DCBA 0x7c0005ec
251251
#define PPC_INST_DCBA_MASK 0xfc0007fe
252+
#define PPC_INST_DSSALL 0x7e00066c
252253
#define PPC_INST_ISEL 0x7c00001e
253254
#define PPC_INST_ISEL_MASK 0xfc00003e
254255
#define PPC_INST_LSWI 0x7c0004aa
@@ -577,6 +578,7 @@
577578
#define PPC_DCBZL(a, b) stringify_in_c(.long PPC_RAW_DCBZL(a, b))
578579
#define PPC_DIVDE(t, a, b) stringify_in_c(.long PPC_RAW_DIVDE(t, a, b))
579580
#define PPC_DIVDEU(t, a, b) stringify_in_c(.long PPC_RAW_DIVDEU(t, a, b))
581+
#define PPC_DSSALL stringify_in_c(.long PPC_INST_DSSALL)
580582
#define PPC_LQARX(t, a, b, eh) stringify_in_c(.long PPC_RAW_LQARX(t, a, b, eh))
581583
#define PPC_STQCX(t, a, b) stringify_in_c(.long PPC_RAW_STQCX(t, a, b))
582584
#define PPC_MADDHD(t, a, b, c) stringify_in_c(.long PPC_RAW_MADDHD(t, a, b, c))

arch/powerpc/kernel/idle.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ void power4_idle(void)
8282
return;
8383

8484
if (cpu_has_feature(CPU_FTR_ALTIVEC))
85-
asm volatile("DSSALL ; sync" ::: "memory");
85+
asm volatile(PPC_DSSALL " ; sync" ::: "memory");
8686

8787
power4_idle_nap();
8888

arch/powerpc/kernel/idle_6xx.S

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ BEGIN_FTR_SECTION
129129
END_FTR_SECTION_IFCLR(CPU_FTR_NO_DPM)
130130
mtspr SPRN_HID0,r4
131131
BEGIN_FTR_SECTION
132-
DSSALL
132+
PPC_DSSALL
133133
sync
134134
END_FTR_SECTION_IFSET(CPU_FTR_ALTIVEC)
135135
lwz r8,TI_LOCAL_FLAGS(r2) /* set napping bit */

arch/powerpc/kernel/l2cr_6xx.S

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ END_FTR_SECTION_IFCLR(CPU_FTR_L2CR)
9696

9797
/* Stop DST streams */
9898
BEGIN_FTR_SECTION
99-
DSSALL
99+
PPC_DSSALL
100100
sync
101101
END_FTR_SECTION_IFSET(CPU_FTR_ALTIVEC)
102102

@@ -292,7 +292,7 @@ END_FTR_SECTION_IFCLR(CPU_FTR_L3CR)
292292
isync
293293

294294
/* Stop DST streams */
295-
DSSALL
295+
PPC_DSSALL
296296
sync
297297

298298
/* Get the current enable bit of the L3CR into r4 */
@@ -401,7 +401,7 @@ END_FTR_SECTION_IFSET(CPU_FTR_L3CR)
401401
_GLOBAL(__flush_disable_L1)
402402
/* Stop pending alitvec streams and memory accesses */
403403
BEGIN_FTR_SECTION
404-
DSSALL
404+
PPC_DSSALL
405405
END_FTR_SECTION_IFSET(CPU_FTR_ALTIVEC)
406406
sync
407407

arch/powerpc/kernel/swsusp_32.S

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ _GLOBAL(swsusp_arch_resume)
181181
#ifdef CONFIG_ALTIVEC
182182
/* Stop pending alitvec streams and memory accesses */
183183
BEGIN_FTR_SECTION
184-
DSSALL
184+
PPC_DSSALL
185185
END_FTR_SECTION_IFSET(CPU_FTR_ALTIVEC)
186186
#endif
187187
sync

arch/powerpc/kernel/swsusp_asm64.S

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ END_FW_FTR_SECTION_IFCLR(FW_FEATURE_LPAR)
141141
_GLOBAL(swsusp_arch_resume)
142142
/* Stop pending alitvec streams and memory accesses */
143143
BEGIN_FTR_SECTION
144-
DSSALL
144+
PPC_DSSALL
145145
END_FTR_SECTION_IFSET(CPU_FTR_ALTIVEC)
146146
sync
147147

arch/powerpc/mm/mmu_context.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ void switch_mm_irqs_off(struct mm_struct *prev, struct mm_struct *next,
9090
* context
9191
*/
9292
if (cpu_has_feature(CPU_FTR_ALTIVEC))
93-
asm volatile ("dssall");
93+
asm volatile (PPC_DSSALL);
9494

9595
if (!new_on_cpu)
9696
membarrier_arch_switch_mm(prev, next, tsk);

arch/powerpc/platforms/powermac/cache.S

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ flush_disable_75x:
4848

4949
/* Stop DST streams */
5050
BEGIN_FTR_SECTION
51-
DSSALL
51+
PPC_DSSALL
5252
sync
5353
END_FTR_SECTION_IFSET(CPU_FTR_ALTIVEC)
5454

@@ -197,7 +197,7 @@ flush_disable_745x:
197197
isync
198198

199199
/* Stop prefetch streams */
200-
DSSALL
200+
PPC_DSSALL
201201
sync
202202

203203
/* Disable L2 prefetching */

0 commit comments

Comments
 (0)