Loading Documentation/devicetree/bindings/arm/msm/jtag-mm.txt +2 −0 Original line number Diff line number Diff line Loading @@ -17,6 +17,8 @@ qcom,coresight-jtagmm-cpu : specifies phandle for the cpu associated with the jtag-mm device qcom,si-enable : boolean, indicating etm save and restore is supported via system instructions qcom,save-restore-disable : boolean, to disable etm save and restore functionality Example: jtag_mm: jtagmm@fc332000 { Loading arch/arm/boot/dts/qcom/msm8996-v2.dtsi +4 −0 Original line number Diff line number Diff line Loading @@ -593,6 +593,7 @@ qcom,coresight-jtagmm-cpu = <&CPU0>; qcom,si-enable; qcom,save-restore-disable; }; jtag_mm1: jtagmm@3940000 { Loading @@ -606,6 +607,7 @@ qcom,coresight-jtagmm-cpu = <&CPU1>; qcom,si-enable; qcom,save-restore-disable; }; jtag_mm2: jtagmm@3a40000 { Loading @@ -619,6 +621,7 @@ qcom,coresight-jtagmm-cpu = <&CPU2>; qcom,si-enable; qcom,save-restore-disable; }; jtag_mm3: jtagmm@3b40000 { Loading @@ -632,6 +635,7 @@ qcom,coresight-jtagmm-cpu = <&CPU3>; qcom,si-enable; qcom,save-restore-disable; }; }; Loading drivers/soc/qcom/jtagv8-etm.c +10 −0 Original line number Diff line number Diff line Loading @@ -220,6 +220,7 @@ struct etm_ctx { uint8_t nr_resource; uint8_t nr_ss_cmp; bool si_enable; bool save_restore_disabled; bool save_restore_enabled; bool os_lock_present; bool init; Loading Loading @@ -1413,6 +1414,9 @@ void msm_jtag_etm_save_state(void) cpu = raw_smp_processor_id(); if (etm[cpu]->save_restore_disabled) return; if (etm[cpu] && etm[cpu]->save_restore_enabled) { if (etm[cpu]->si_enable) etm_si_save_state(etm[cpu]); Loading @@ -1428,6 +1432,9 @@ void msm_jtag_etm_restore_state(void) cpu = raw_smp_processor_id(); if (etm[cpu]->save_restore_disabled) return; /* * Check to ensure we attempt to restore only when save * has been done is accomplished by callee function. Loading Loading @@ -1561,6 +1568,9 @@ static int jtag_mm_etm_probe(struct platform_device *pdev, uint32_t cpu) etmdata->si_enable = of_property_read_bool(pdev->dev.of_node, "qcom,si-enable"); etmdata->save_restore_disabled = of_property_read_bool( pdev->dev.of_node, "qcom,save-restore-disable"); /* Allocate etm state save space per core */ etmdata->state = devm_kzalloc(dev, Loading Loading
Documentation/devicetree/bindings/arm/msm/jtag-mm.txt +2 −0 Original line number Diff line number Diff line Loading @@ -17,6 +17,8 @@ qcom,coresight-jtagmm-cpu : specifies phandle for the cpu associated with the jtag-mm device qcom,si-enable : boolean, indicating etm save and restore is supported via system instructions qcom,save-restore-disable : boolean, to disable etm save and restore functionality Example: jtag_mm: jtagmm@fc332000 { Loading
arch/arm/boot/dts/qcom/msm8996-v2.dtsi +4 −0 Original line number Diff line number Diff line Loading @@ -593,6 +593,7 @@ qcom,coresight-jtagmm-cpu = <&CPU0>; qcom,si-enable; qcom,save-restore-disable; }; jtag_mm1: jtagmm@3940000 { Loading @@ -606,6 +607,7 @@ qcom,coresight-jtagmm-cpu = <&CPU1>; qcom,si-enable; qcom,save-restore-disable; }; jtag_mm2: jtagmm@3a40000 { Loading @@ -619,6 +621,7 @@ qcom,coresight-jtagmm-cpu = <&CPU2>; qcom,si-enable; qcom,save-restore-disable; }; jtag_mm3: jtagmm@3b40000 { Loading @@ -632,6 +635,7 @@ qcom,coresight-jtagmm-cpu = <&CPU3>; qcom,si-enable; qcom,save-restore-disable; }; }; Loading
drivers/soc/qcom/jtagv8-etm.c +10 −0 Original line number Diff line number Diff line Loading @@ -220,6 +220,7 @@ struct etm_ctx { uint8_t nr_resource; uint8_t nr_ss_cmp; bool si_enable; bool save_restore_disabled; bool save_restore_enabled; bool os_lock_present; bool init; Loading Loading @@ -1413,6 +1414,9 @@ void msm_jtag_etm_save_state(void) cpu = raw_smp_processor_id(); if (etm[cpu]->save_restore_disabled) return; if (etm[cpu] && etm[cpu]->save_restore_enabled) { if (etm[cpu]->si_enable) etm_si_save_state(etm[cpu]); Loading @@ -1428,6 +1432,9 @@ void msm_jtag_etm_restore_state(void) cpu = raw_smp_processor_id(); if (etm[cpu]->save_restore_disabled) return; /* * Check to ensure we attempt to restore only when save * has been done is accomplished by callee function. Loading Loading @@ -1561,6 +1568,9 @@ static int jtag_mm_etm_probe(struct platform_device *pdev, uint32_t cpu) etmdata->si_enable = of_property_read_bool(pdev->dev.of_node, "qcom,si-enable"); etmdata->save_restore_disabled = of_property_read_bool( pdev->dev.of_node, "qcom,save-restore-disable"); /* Allocate etm state save space per core */ etmdata->state = devm_kzalloc(dev, Loading