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

Commit 25e85d4a authored by qctecmdr Service's avatar qctecmdr Service Committed by Gerrit - the friendly Code Review server
Browse files

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

parents 89c2aecb bad05b4f
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -270,8 +270,12 @@ static int tmc_etr_byte_cntr_open(struct inode *in, struct file *fp)
		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,
				byte_cntr_data->block_size);
				(byte_cntr_data->block_size) / 8);

	fp->private_data = byte_cntr_data;
	nonseekable_open(in, fp);
	byte_cntr_data->enable = true;
+6 −1
Original line number Diff line number Diff line
@@ -495,8 +495,13 @@ static ssize_t block_size_store(struct device *dev,
	if (!drvdata->byte_cntr)
		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);
	drvdata->byte_cntr->block_size = val * 8;
	drvdata->byte_cntr->block_size = val;
	mutex_unlock(&drvdata->byte_cntr->byte_cntr_lock);

	return size;