Commit d51f86cf authored by Alexey Kardashevskiy's avatar Alexey Kardashevskiy Committed by Michael Ellerman

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: default avatarAlexey Kardashevskiy <aik@ozlabs.ru>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20211221055904.555763-6-aik@ozlabs.ru
parent d72c4a36
...@@ -249,6 +249,7 @@ ...@@ -249,6 +249,7 @@
#define PPC_INST_COPY 0x7c20060c #define PPC_INST_COPY 0x7c20060c
#define PPC_INST_DCBA 0x7c0005ec #define PPC_INST_DCBA 0x7c0005ec
#define PPC_INST_DCBA_MASK 0xfc0007fe #define PPC_INST_DCBA_MASK 0xfc0007fe
#define PPC_INST_DSSALL 0x7e00066c
#define PPC_INST_ISEL 0x7c00001e #define PPC_INST_ISEL 0x7c00001e
#define PPC_INST_ISEL_MASK 0xfc00003e #define PPC_INST_ISEL_MASK 0xfc00003e
#define PPC_INST_LSWI 0x7c0004aa #define PPC_INST_LSWI 0x7c0004aa
...@@ -577,6 +578,7 @@ ...@@ -577,6 +578,7 @@
#define PPC_DCBZL(a, b) stringify_in_c(.long PPC_RAW_DCBZL(a, b)) #define PPC_DCBZL(a, b) stringify_in_c(.long PPC_RAW_DCBZL(a, b))
#define PPC_DIVDE(t, a, b) stringify_in_c(.long PPC_RAW_DIVDE(t, a, b)) #define PPC_DIVDE(t, a, b) stringify_in_c(.long PPC_RAW_DIVDE(t, a, b))
#define PPC_DIVDEU(t, a, b) stringify_in_c(.long PPC_RAW_DIVDEU(t, a, b)) #define PPC_DIVDEU(t, a, b) stringify_in_c(.long PPC_RAW_DIVDEU(t, a, b))
#define PPC_DSSALL stringify_in_c(.long PPC_INST_DSSALL)
#define PPC_LQARX(t, a, b, eh) stringify_in_c(.long PPC_RAW_LQARX(t, a, b, eh)) #define PPC_LQARX(t, a, b, eh) stringify_in_c(.long PPC_RAW_LQARX(t, a, b, eh))
#define PPC_STQCX(t, a, b) stringify_in_c(.long PPC_RAW_STQCX(t, a, b)) #define PPC_STQCX(t, a, b) stringify_in_c(.long PPC_RAW_STQCX(t, a, b))
#define PPC_MADDHD(t, a, b, c) stringify_in_c(.long PPC_RAW_MADDHD(t, a, b, c)) #define PPC_MADDHD(t, a, b, c) stringify_in_c(.long PPC_RAW_MADDHD(t, a, b, c))
......
...@@ -82,7 +82,7 @@ void power4_idle(void) ...@@ -82,7 +82,7 @@ void power4_idle(void)
return; return;
if (cpu_has_feature(CPU_FTR_ALTIVEC)) if (cpu_has_feature(CPU_FTR_ALTIVEC))
asm volatile("DSSALL ; sync" ::: "memory"); asm volatile(PPC_DSSALL " ; sync" ::: "memory");
power4_idle_nap(); power4_idle_nap();
......
...@@ -129,7 +129,7 @@ BEGIN_FTR_SECTION ...@@ -129,7 +129,7 @@ BEGIN_FTR_SECTION
END_FTR_SECTION_IFCLR(CPU_FTR_NO_DPM) END_FTR_SECTION_IFCLR(CPU_FTR_NO_DPM)
mtspr SPRN_HID0,r4 mtspr SPRN_HID0,r4
BEGIN_FTR_SECTION BEGIN_FTR_SECTION
DSSALL PPC_DSSALL
sync sync
END_FTR_SECTION_IFSET(CPU_FTR_ALTIVEC) END_FTR_SECTION_IFSET(CPU_FTR_ALTIVEC)
lwz r8,TI_LOCAL_FLAGS(r2) /* set napping bit */ lwz r8,TI_LOCAL_FLAGS(r2) /* set napping bit */
......
...@@ -96,7 +96,7 @@ END_FTR_SECTION_IFCLR(CPU_FTR_L2CR) ...@@ -96,7 +96,7 @@ END_FTR_SECTION_IFCLR(CPU_FTR_L2CR)
/* Stop DST streams */ /* Stop DST streams */
BEGIN_FTR_SECTION BEGIN_FTR_SECTION
DSSALL PPC_DSSALL
sync sync
END_FTR_SECTION_IFSET(CPU_FTR_ALTIVEC) END_FTR_SECTION_IFSET(CPU_FTR_ALTIVEC)
...@@ -292,7 +292,7 @@ END_FTR_SECTION_IFCLR(CPU_FTR_L3CR) ...@@ -292,7 +292,7 @@ END_FTR_SECTION_IFCLR(CPU_FTR_L3CR)
isync isync
/* Stop DST streams */ /* Stop DST streams */
DSSALL PPC_DSSALL
sync sync
/* Get the current enable bit of the L3CR into r4 */ /* Get the current enable bit of the L3CR into r4 */
...@@ -401,7 +401,7 @@ END_FTR_SECTION_IFSET(CPU_FTR_L3CR) ...@@ -401,7 +401,7 @@ END_FTR_SECTION_IFSET(CPU_FTR_L3CR)
_GLOBAL(__flush_disable_L1) _GLOBAL(__flush_disable_L1)
/* Stop pending alitvec streams and memory accesses */ /* Stop pending alitvec streams and memory accesses */
BEGIN_FTR_SECTION BEGIN_FTR_SECTION
DSSALL PPC_DSSALL
END_FTR_SECTION_IFSET(CPU_FTR_ALTIVEC) END_FTR_SECTION_IFSET(CPU_FTR_ALTIVEC)
sync sync
......
...@@ -181,7 +181,7 @@ _GLOBAL(swsusp_arch_resume) ...@@ -181,7 +181,7 @@ _GLOBAL(swsusp_arch_resume)
#ifdef CONFIG_ALTIVEC #ifdef CONFIG_ALTIVEC
/* Stop pending alitvec streams and memory accesses */ /* Stop pending alitvec streams and memory accesses */
BEGIN_FTR_SECTION BEGIN_FTR_SECTION
DSSALL PPC_DSSALL
END_FTR_SECTION_IFSET(CPU_FTR_ALTIVEC) END_FTR_SECTION_IFSET(CPU_FTR_ALTIVEC)
#endif #endif
sync sync
......
...@@ -141,7 +141,7 @@ END_FW_FTR_SECTION_IFCLR(FW_FEATURE_LPAR) ...@@ -141,7 +141,7 @@ END_FW_FTR_SECTION_IFCLR(FW_FEATURE_LPAR)
_GLOBAL(swsusp_arch_resume) _GLOBAL(swsusp_arch_resume)
/* Stop pending alitvec streams and memory accesses */ /* Stop pending alitvec streams and memory accesses */
BEGIN_FTR_SECTION BEGIN_FTR_SECTION
DSSALL PPC_DSSALL
END_FTR_SECTION_IFSET(CPU_FTR_ALTIVEC) END_FTR_SECTION_IFSET(CPU_FTR_ALTIVEC)
sync sync
......
...@@ -90,7 +90,7 @@ void switch_mm_irqs_off(struct mm_struct *prev, struct mm_struct *next, ...@@ -90,7 +90,7 @@ void switch_mm_irqs_off(struct mm_struct *prev, struct mm_struct *next,
* context * context
*/ */
if (cpu_has_feature(CPU_FTR_ALTIVEC)) if (cpu_has_feature(CPU_FTR_ALTIVEC))
asm volatile ("dssall"); asm volatile (PPC_DSSALL);
if (!new_on_cpu) if (!new_on_cpu)
membarrier_arch_switch_mm(prev, next, tsk); membarrier_arch_switch_mm(prev, next, tsk);
......
...@@ -48,7 +48,7 @@ flush_disable_75x: ...@@ -48,7 +48,7 @@ flush_disable_75x:
/* Stop DST streams */ /* Stop DST streams */
BEGIN_FTR_SECTION BEGIN_FTR_SECTION
DSSALL PPC_DSSALL
sync sync
END_FTR_SECTION_IFSET(CPU_FTR_ALTIVEC) END_FTR_SECTION_IFSET(CPU_FTR_ALTIVEC)
...@@ -197,7 +197,7 @@ flush_disable_745x: ...@@ -197,7 +197,7 @@ flush_disable_745x:
isync isync
/* Stop prefetch streams */ /* Stop prefetch streams */
DSSALL PPC_DSSALL
sync sync
/* Disable L2 prefetching */ /* Disable L2 prefetching */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment