Patch "coresight: etm4x: Fix access to resource selector registers" has been added to the 6.1-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

    coresight: etm4x: Fix access to resource selector registers

to the 6.1-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:
     coresight-etm4x-fix-access-to-resource-selector-regi.patch
and it can be found in the queue-6.1 subdirectory.

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



commit b4f8aad44b1e819ef044410a7741ccb956a36c68
Author: Suzuki K Poulose <suzuki.poulose@xxxxxxx>
Date:   Fri Apr 12 15:27:02 2024 +0100

    coresight: etm4x: Fix access to resource selector registers
    
    [ Upstream commit d6fc00d0f640d6010b51054aa8b0fd191177dbc9 ]
    
    Resource selector pair 0 is always implemented and reserved. We must not
    touch it, even during save/restore for CPU Idle. Rest of the driver is
    well behaved. Fix the offending ones.
    
    Reported-by: Yabin Cui <yabinc@xxxxxxxxxx>
    Fixes: f188b5e76aae ("coresight: etm4x: Save/restore state across CPU low power states")
    Signed-off-by: Suzuki K Poulose <suzuki.poulose@xxxxxxx>
    Tested-by: Yabin Cui <yabinc@xxxxxxxxxx>
    Reviewed-by: Mike Leach <mike.leach@xxxxxxxxxx>
    Link: https://lore.kernel.org/r/20240412142702.2882478-5-suzuki.poulose@xxxxxxx
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/hwtracing/coresight/coresight-etm4x-core.c b/drivers/hwtracing/coresight/coresight-etm4x-core.c
index e2e5b1422cdb7..354267edcb45f 100644
--- a/drivers/hwtracing/coresight/coresight-etm4x-core.c
+++ b/drivers/hwtracing/coresight/coresight-etm4x-core.c
@@ -1641,7 +1641,8 @@ static int __etm4_cpu_save(struct etmv4_drvdata *drvdata)
 		state->trccntvr[i] = etm4x_read32(csa, TRCCNTVRn(i));
 	}
 
-	for (i = 0; i < drvdata->nr_resource * 2; i++)
+	/* Resource selector pair 0 is reserved */
+	for (i = 2; i < drvdata->nr_resource * 2; i++)
 		state->trcrsctlr[i] = etm4x_read32(csa, TRCRSCTLRn(i));
 
 	for (i = 0; i < drvdata->nr_ss_cmp; i++) {
@@ -1772,7 +1773,8 @@ static void __etm4_cpu_restore(struct etmv4_drvdata *drvdata)
 		etm4x_relaxed_write32(csa, state->trccntvr[i], TRCCNTVRn(i));
 	}
 
-	for (i = 0; i < drvdata->nr_resource * 2; i++)
+	/* Resource selector pair 0 is reserved */
+	for (i = 2; i < drvdata->nr_resource * 2; i++)
 		etm4x_relaxed_write32(csa, state->trcrsctlr[i], TRCRSCTLRn(i));
 
 	for (i = 0; i < drvdata->nr_ss_cmp; i++) {




[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