]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
arm64: dts: qcom: sdm845: Define guard pages within the rmtfs region
authorDavid Heidelberg <david@ixit.cz>
Mon, 20 Oct 2025 21:12:56 +0000 (23:12 +0200)
committerBjorn Andersson <andersson@kernel.org>
Mon, 27 Oct 2025 17:31:20 +0000 (12:31 -0500)
Use qcom,use-guard-pages property instead of polluting device-tree with
lower and upper rmtfs guard nodes.

No functional change intended.

cosmetic: set name the node rmtfs-region.

Signed-off-by: David Heidelberg <david@ixit.cz>
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Tested-By: Paul Sajna <sajattack@postmarketos.org>
Link: https://lore.kernel.org/r/20251020-sdm845-use-guard-pages-v1-1-64d714f8bd73@ixit.cz
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
arch/arm64/boot/dts/qcom/sdm845-lg-common.dtsi
arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi

index 99dafc6716e76e25aad0755e6004dc952779689f..83b98bad19dd2824650378da7ad02e6f41a68d9f 100644 (file)
                        no-map;
                };
 
-               /* rmtfs lower guard */
-               memory@f0800000 {
-                       reg = <0 0xf0800000 0 0x1000>;
-                       no-map;
-               };
-
-               rmtfs_mem: memory@f0801000 {
+               rmtfs_mem: rmtfs-region@f0800000 {
                        compatible = "qcom,rmtfs-mem";
-                       reg = <0 0xf0801000 0 0x200000>;
+                       reg = <0 0xf0800000 0 0x202000>;
+                       qcom,use-guard-pages;
                        no-map;
 
                        qcom,client-id = <1>;
                        qcom,vmid = <QCOM_SCM_VMID_MSS_MSA>;
                };
-
-               /* rmtfs upper guard */
-               memory@f0a01000 {
-                       reg = <0 0xf0a01000 0 0x1000>;
-                       no-map;
-               };
        };
 
        gpio-keys {
index 51a9a276399ac7de42f4269ace257120236fa81a..eb708ebdb0202c7e453bd01124166dd050de8d28 100644 (file)
        };
 
        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: rmtfs-lower-guard@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
                 * where the modem firmware expects it to be.
                 */
-               rmtfs_mem: rmtfs-mem@f5b01000 {
+               rmtfs_mem: rmtfs-region@f5b00000 {
                        compatible = "qcom,rmtfs-mem";
-                       reg = <0 0xf5b01000 0 0x200000>;
+                       reg = <0 0xf5b00000 0 0x202000>;
+                       qcom,use-guard-pages;
                        no-map;
 
                        qcom,client-id = <1>;
                        qcom,vmid = <QCOM_SCM_VMID_MSS_MSA>;
                };
-               rmtfs_upper_guard: rmtfs-upper-guard@f5d01000 {
-                       no-map;
-                       reg = <0 0xf5d01000 0 0x1000>;
-               };
 
                /*
                 * It seems like reserving the old rmtfs_mem region is also needed to prevent