Patch "arm64: dts: qcom: sdm845-oneplus-common: guard rmtfs-mem" has been added to the 5.13-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

    arm64: dts: qcom: sdm845-oneplus-common: guard rmtfs-mem

to the 5.13-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:
     arm64-dts-qcom-sdm845-oneplus-common-guard-rmtfs-mem.patch
and it can be found in the queue-5.13 subdirectory.

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



commit 4cace05e6b6567c4f7ac6a209b151cbddecee6ca
Author: Caleb Connolly <caleb@xxxxxxxxxxxxx>
Date:   Sun May 2 01:42:57 2021 +0000

    arm64: dts: qcom: sdm845-oneplus-common: guard rmtfs-mem
    
    [ Upstream commit e60fd5ac1f6851be5b2c042b39584bfcf8a66f57 ]
    
    The rmtfs_mem region is a weird one, downstream allocates it
    dynamically, and supports a "qcom,guard-memory" property which when set
    will reserve 4k above and below the rmtfs memory.
    
    A common from qcom 4.9 kernel msm_sharedmem driver:
    
    /*
     * If guard_memory is set, then the shared memory region
     * will be guarded by SZ_4K at the start and at the end.
     * This is needed to overcome the XPU limitation on few
     * MSM HW, so as to make this memory not contiguous with
     * other allocations that may possibly happen from other
     * clients in the system.
    */
    
    When the kernel tries to touch memory that is too close the
    rmtfs region it may cause an XPU violation. Such is the case on the
    OnePlus 6 where random crashes would occur usually after boot.
    
    Reserve 4k above and below the rmtfs_mem to avoid hitting these XPU
    Violations.
    
    This doesn't entirely solve the random crashes on the OnePlus 6/6T but
    it does seem to prevent the ones which happen shortly after modem
    bringup.
    
    Fixes: 288ef8a42612 ("arm64: dts: sdm845: add oneplus6/6t devices")
    Signed-off-by: Caleb Connolly <caleb@xxxxxxxxxxxxx>
    Link: https://lore.kernel.org/r/20210502014146.85642-4-caleb@xxxxxxxxxxxxx
    Signed-off-by: Bjorn Andersson <bjorn.andersson@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi b/arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi
index 8f617f7b6d34..f712771df0c7 100644
--- a/arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi
+++ b/arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi
@@ -46,6 +46,14 @@
 	};
 
 	reserved-memory {
+		/* The rmtfs_mem needs to be guarded due to "XPU limitations"
+		 * it is otherwise possible for an allocation adjacent to the
+		 * rmtfs_mem region to trigger an XPU violation, causing a crash.
+		 */
+		rmtfs_lower_guard: memory@f5b00000 {
+			no-map;
+			reg = <0 0xf5b00000 0 0x1000>;
+		};
 		/*
 		 * The rmtfs memory region in downstream is 'dynamically allocated'
 		 * but given the same address every time. Hard code it as this address is
@@ -59,6 +67,10 @@
 			qcom,client-id = <1>;
 			qcom,vmid = <15>;
 		};
+		rmtfs_upper_guard: memory@f5d01000 {
+			no-map;
+			reg = <0 0xf5d01000 0 0x2000>;
+		};
 
 		/*
 		 * It seems like reserving the old rmtfs_mem region is also needed to prevent



[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