Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0e736174 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "ARM: dts: msm: disable save / restore of etm registers on msm8996"

parents 888510f4 c3a0284a
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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 {
+4 −0
Original line number Diff line number Diff line
@@ -593,6 +593,7 @@

		qcom,coresight-jtagmm-cpu = <&CPU0>;
		qcom,si-enable;
		qcom,save-restore-disable;
	};

	jtag_mm1: jtagmm@3940000 {
@@ -606,6 +607,7 @@

		qcom,coresight-jtagmm-cpu = <&CPU1>;
		qcom,si-enable;
		qcom,save-restore-disable;
	};

	jtag_mm2: jtagmm@3a40000 {
@@ -619,6 +621,7 @@

		qcom,coresight-jtagmm-cpu = <&CPU2>;
		qcom,si-enable;
		qcom,save-restore-disable;
	};

	jtag_mm3: jtagmm@3b40000 {
@@ -632,6 +635,7 @@

		qcom,coresight-jtagmm-cpu = <&CPU3>;
		qcom,si-enable;
		qcom,save-restore-disable;
	};
};

+10 −0
Original line number Diff line number Diff line
@@ -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;
@@ -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]);
@@ -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.
@@ -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,