Patch "MIPS: SMP-CPS: Fix address for GCR_ACCESS register for CM3 and later" has been added to the 6.6-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    MIPS: SMP-CPS: Fix address for GCR_ACCESS register for CM3 and later

to the 6.6-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     mips-smp-cps-fix-address-for-gcr_access-register-for.patch
and it can be found in the queue-6.6 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit e22d590345c618055b2c7e7982e6ceab3a1e7108
Author: Gregory CLEMENT <gregory.clement@xxxxxxxxxxx>
Date:   Mon Jul 22 15:15:39 2024 +0200

    MIPS: SMP-CPS: Fix address for GCR_ACCESS register for CM3 and later
    
    [ Upstream commit a263e5f309f32301e1f3ad113293f4e68a82a646 ]
    
    When the CM block migrated from CM2.5 to CM3.0, the address offset for
    the Global CSR Access Privilege register was modified. We saw this in
    the "MIPS64 I6500 Multiprocessing System Programmer's Guide," it is
    stated that "the Global CSR Access Privilege register is located at
    offset 0x0120" in section 5.4. It is at least the same for I6400.
    
    This fix allows to use the VP cores in SMP mode if the reset values
    were modified by the bootloader.
    
    Based on the work of Vladimir Kondratiev
    <vladimir.kondratiev@xxxxxxxxxxxx> and the feedback from Jiaxun Yang
    <jiaxun.yang@xxxxxxxxxxx>.
    
    Fixes: 197e89e0984a ("MIPS: mips-cm: Implement mips_cm_revision")
    Signed-off-by: Gregory CLEMENT <gregory.clement@xxxxxxxxxxx>
    Reviewed-by: Jiaxun Yang <jiaxun.yang@xxxxxxxxxxx>
    Signed-off-by: Thomas Bogendoerfer <tsbogend@xxxxxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/arch/mips/include/asm/mips-cm.h b/arch/mips/include/asm/mips-cm.h
index 23c67c0871b17..696b40beb774f 100644
--- a/arch/mips/include/asm/mips-cm.h
+++ b/arch/mips/include/asm/mips-cm.h
@@ -228,6 +228,10 @@ GCR_ACCESSOR_RO(32, 0x0d0, gic_status)
 GCR_ACCESSOR_RO(32, 0x0f0, cpc_status)
 #define CM_GCR_CPC_STATUS_EX			BIT(0)
 
+/* GCR_ACCESS - Controls core/IOCU access to GCRs */
+GCR_ACCESSOR_RW(32, 0x120, access_cm3)
+#define CM_GCR_ACCESS_ACCESSEN			GENMASK(7, 0)
+
 /* GCR_L2_CONFIG - Indicates L2 cache configuration when Config5.L2C=1 */
 GCR_ACCESSOR_RW(32, 0x130, l2_config)
 #define CM_GCR_L2_CONFIG_BYPASS			BIT(20)
diff --git a/arch/mips/kernel/smp-cps.c b/arch/mips/kernel/smp-cps.c
index dd55d59b88db3..d445f8e849abd 100644
--- a/arch/mips/kernel/smp-cps.c
+++ b/arch/mips/kernel/smp-cps.c
@@ -222,7 +222,10 @@ static void boot_core(unsigned int core, unsigned int vpe_id)
 	write_gcr_co_reset_ext_base(CM_GCR_Cx_RESET_EXT_BASE_UEB);
 
 	/* Ensure the core can access the GCRs */
-	set_gcr_access(1 << core);
+	if (mips_cm_revision() < CM_REV_CM3)
+		set_gcr_access(1 << core);
+	else
+		set_gcr_access_cm3(1 << core);
 
 	if (mips_cpc_present()) {
 		/* Reset the core */




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux