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

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

Merge "coresight:byte-cntr: fix the byte-counter of ETR"

parents e79b26e2 976ee49d
Loading
Loading
Loading
Loading
+5 −1
Original line number Original line Diff line number Diff line
@@ -268,8 +268,12 @@ static int tmc_etr_byte_cntr_open(struct inode *in, struct file *fp)
		return -EINVAL;
		return -EINVAL;
	}
	}


	/* IRQ is a '8- byte' counter and to observe interrupt at
	 * 'block_size' bytes of data
	 */
	coresight_csr_set_byte_cntr(byte_cntr_data->csr,
	coresight_csr_set_byte_cntr(byte_cntr_data->csr,
				byte_cntr_data->block_size);
				(byte_cntr_data->block_size) / 8);

	fp->private_data = byte_cntr_data;
	fp->private_data = byte_cntr_data;
	nonseekable_open(in, fp);
	nonseekable_open(in, fp);
	byte_cntr_data->enable = true;
	byte_cntr_data->enable = true;
+6 −1
Original line number Original line Diff line number Diff line
@@ -487,8 +487,13 @@ static ssize_t block_size_store(struct device *dev,
	if (!drvdata->byte_cntr)
	if (!drvdata->byte_cntr)
		return -EINVAL;
		return -EINVAL;


	if (val && val < 16) {
		pr_err("Assign minimum block size of 16 bytes\n");
		return -EINVAL;
	}

	mutex_lock(&drvdata->byte_cntr->byte_cntr_lock);
	mutex_lock(&drvdata->byte_cntr->byte_cntr_lock);
	drvdata->byte_cntr->block_size = val * 8;
	drvdata->byte_cntr->block_size = val;
	mutex_unlock(&drvdata->byte_cntr->byte_cntr_lock);
	mutex_unlock(&drvdata->byte_cntr->byte_cntr_lock);


	return size;
	return size;