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

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

Merge "coresight: add support for cti save disable"

parents c02360cc 1bbccd2f
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -49,6 +49,16 @@ config CORESIGHT_CTI
	  hardware component to another. It can also be used to pass
	  software generated events.

config CORESIGHT_CTI_SAVE_DISABLE
	bool "Turn off CTI save and restore"
	help
	  Turns off CoreSight CTI save and restore support for cpu CTIs. This
	  avoids voting for the clocks during probe as well as the associated
	  save and restore latency at the cost of breaking cpu CTI support on
	  targets where cpu CTIs have to be preserved across power collapse.

	  If unsure, say 'N' here to avoid breaking cpu CTI support.

config CORESIGHT_CSR
	bool "CoreSight Slave Register driver"
	help
+22 −1
Original line number Diff line number Diff line
@@ -102,6 +102,11 @@ struct cti_drvdata {

static LIST_HEAD(cti_list);
static DEFINE_MUTEX(cti_lock);
#ifdef CONFIG_CORESIGHT_CTI_SAVE_DISABLE
static int cti_save_disable = 1;
#else
static int cti_save_disable;
#endif

static int cti_verify_trigger_bound(int trig)
{
@@ -134,6 +139,14 @@ void coresight_cti_ctx_save(void)
	int trig, cpuid, cpu;
	unsigned long flag;

	/*
	 * Explicitly check and return to avoid latency associated with
	 * traversing the linked list of all CTIs and checking for their
	 * respective cti_save flag.
	 */
	if (cti_save_disable)
		return;

	cpu = raw_smp_processor_id();

	list_for_each_entry(cti, &cti_list, link) {
@@ -170,6 +183,14 @@ void coresight_cti_ctx_restore(void)
	int trig, cpuid, cpu;
	unsigned long flag;

	/*
	 * Explicitly check and return to avoid latency associated with
	 * traversing the linked list of all CTIs and checking for their
	 * respective cti_save flag.
	 */
	if (cti_save_disable)
		return;

	cpu = raw_smp_processor_id();

	list_for_each_entry(cti, &cti_list, link) {
@@ -1378,7 +1399,7 @@ static int cti_probe(struct platform_device *pdev)
		}
	}

	if (pdev->dev.of_node)
	if (pdev->dev.of_node && !cti_save_disable)
		drvdata->cti_save = of_property_read_bool(pdev->dev.of_node,
							  "qcom,cti-save");
	if (drvdata->cti_save) {