]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
powerpc/mm: Switch obsolete dssall to .long
authorAlexey Kardashevskiy <aik@ozlabs.ru>
Tue, 21 Dec 2021 05:59:03 +0000 (16:59 +1100)
committerStefan Bader <stefan.bader@canonical.com>
Fri, 26 Aug 2022 08:53:14 +0000 (10:53 +0200)
BugLink: https://bugs.launchpad.net/bugs/1982968
commit d51f86cfd8e378d4907958db77da3074f6dce3ba upstream.

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 <aik@ozlabs.ru>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20211221055904.555763-6-aik@ozlabs.ru
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
arch/powerpc/include/asm/ppc-opcode.h
arch/powerpc/kernel/idle.c
arch/powerpc/kernel/idle_6xx.S
arch/powerpc/kernel/l2cr_6xx.S
arch/powerpc/kernel/swsusp_32.S
arch/powerpc/kernel/swsusp_asm64.S
arch/powerpc/mm/mmu_context.c
arch/powerpc/platforms/powermac/cache.S

index bca31a61e57f884f3ae737a444b538a5b47aee1d..536d997539bb7637953bfcd01f08915509cbcbaf 100644 (file)
 #define PPC_INST_COPY                  0x7c20060c
 #define PPC_INST_DCBA                  0x7c0005ec
 #define PPC_INST_DCBA_MASK             0xfc0007fe
+#define PPC_INST_DSSALL                        0x7e00066c
 #define PPC_INST_ISEL                  0x7c00001e
 #define PPC_INST_ISEL_MASK             0xfc00003e
 #define PPC_INST_LSWI                  0x7c0004aa
 #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_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_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))
index f0271daa8f6a66df6d68a0719a2f795888a5dfef..77cd4c5a2d631f1a716b5a3341d0ecca5ce261f3 100644 (file)
@@ -82,7 +82,7 @@ void power4_idle(void)
                return;
 
        if (cpu_has_feature(CPU_FTR_ALTIVEC))
-               asm volatile("DSSALL ; sync" ::: "memory");
+               asm volatile(PPC_DSSALL " ; sync" ::: "memory");
 
        power4_idle_nap();
 
index 13cad9297d8222fb5f37605f5798909095296991..3c097356366b8c1c165d5113414ef571f6f7fa95 100644 (file)
@@ -129,7 +129,7 @@ BEGIN_FTR_SECTION
 END_FTR_SECTION_IFCLR(CPU_FTR_NO_DPM)
        mtspr   SPRN_HID0,r4
 BEGIN_FTR_SECTION
-       DSSALL
+       PPC_DSSALL
        sync
 END_FTR_SECTION_IFSET(CPU_FTR_ALTIVEC)
        lwz     r8,TI_LOCAL_FLAGS(r2)   /* set napping bit */
index 225511d73bef560b536ab8bc2d9abc4a2b17b88c..f2e03ed423d0fc1cc660afc032899161e34acf3b 100644 (file)
@@ -96,7 +96,7 @@ END_FTR_SECTION_IFCLR(CPU_FTR_L2CR)
 
        /* Stop DST streams */
 BEGIN_FTR_SECTION
-       DSSALL
+       PPC_DSSALL
        sync
 END_FTR_SECTION_IFSET(CPU_FTR_ALTIVEC)
 
@@ -292,7 +292,7 @@ END_FTR_SECTION_IFCLR(CPU_FTR_L3CR)
        isync
 
        /* Stop DST streams */
-       DSSALL
+       PPC_DSSALL
        sync
 
        /* Get the current enable bit of the L3CR into r4 */
@@ -401,7 +401,7 @@ END_FTR_SECTION_IFSET(CPU_FTR_L3CR)
 _GLOBAL(__flush_disable_L1)
        /* Stop pending alitvec streams and memory accesses */
 BEGIN_FTR_SECTION
-       DSSALL
+       PPC_DSSALL
 END_FTR_SECTION_IFSET(CPU_FTR_ALTIVEC)
        sync
 
index f73f4d72fea43570a76eedafbebd5d00750ed49e..e0cbd63007f21e01e9ee8c444672f97fcfca65f9 100644 (file)
@@ -181,7 +181,7 @@ _GLOBAL(swsusp_arch_resume)
 #ifdef CONFIG_ALTIVEC
        /* Stop pending alitvec streams and memory accesses */
 BEGIN_FTR_SECTION
-       DSSALL
+       PPC_DSSALL
 END_FTR_SECTION_IFSET(CPU_FTR_ALTIVEC)
 #endif
        sync
index 6d3189830dd3230de6c4e08b587dd8244022497e..068a268a8013e9d916984d9eda1e0977f0098778 100644 (file)
@@ -142,7 +142,7 @@ END_FW_FTR_SECTION_IFCLR(FW_FEATURE_LPAR)
 _GLOBAL(swsusp_arch_resume)
        /* Stop pending alitvec streams and memory accesses */
 BEGIN_FTR_SECTION
-       DSSALL
+       PPC_DSSALL
 END_FTR_SECTION_IFSET(CPU_FTR_ALTIVEC)
        sync
 
index 74246536b83263514b110d0b6d3ba5e8472a51fc..aca34d37b519774601e78ecbfb894d4d150d89d3 100644 (file)
@@ -81,7 +81,7 @@ void switch_mm_irqs_off(struct mm_struct *prev, struct mm_struct *next,
         * context
         */
        if (cpu_has_feature(CPU_FTR_ALTIVEC))
-               asm volatile ("dssall");
+               asm volatile (PPC_DSSALL);
 
        if (!new_on_cpu)
                membarrier_arch_switch_mm(prev, next, tsk);
index ced2254154860af64c21c69a733c9e458558b050..b8ae56e9f41466c8a6c28bb688912e69ed6fee16 100644 (file)
@@ -48,7 +48,7 @@ flush_disable_75x:
 
        /* Stop DST streams */
 BEGIN_FTR_SECTION
-       DSSALL
+       PPC_DSSALL
        sync
 END_FTR_SECTION_IFSET(CPU_FTR_ALTIVEC)
 
@@ -197,7 +197,7 @@ flush_disable_745x:
        isync
 
        /* Stop prefetch streams */
-       DSSALL
+       PPC_DSSALL
        sync
 
        /* Disable L2 prefetching */