[SRU][N][PATCH 01/13] Revert "coresight-etb10: change etb_drvdata spinlock's type to raw_spinlock_t"
Noah Wager
noah.wager at canonical.com
Sat Feb 21 00:49:41 UTC 2026
BugLink: https://bugs.launchpad.net/bugs/2142336
This reverts commit de3baed78b29f7fb0ab77d55dec26b251fd997ce.
This commit causes conflicts when cherry-picking the patch set
"coresight: Separate sysfs and Perf usage and some other cleanups". This
commit arrived after said patchset in upstream, so applying it before
results in conflicts later.
The conflicts are just various context changes, but rather than modify
multiple conflicts and risk making a mistake, I elected to revert it,
apply the patch set, then cherry-pick it again where it applies cleanly.
Signed-off-by: Noah Wager <noah.wager at canonical.com>
---
drivers/hwtracing/coresight/coresight-etb10.c | 26 +++++++++----------
1 file changed, 13 insertions(+), 13 deletions(-)
diff --git a/drivers/hwtracing/coresight/coresight-etb10.c b/drivers/hwtracing/coresight/coresight-etb10.c
index d83d52dbd1a2..fa80039e0821 100644
--- a/drivers/hwtracing/coresight/coresight-etb10.c
+++ b/drivers/hwtracing/coresight/coresight-etb10.c
@@ -85,7 +85,7 @@ struct etb_drvdata {
struct clk *atclk;
struct coresight_device *csdev;
struct miscdevice miscdev;
- raw_spinlock_t spinlock;
+ spinlock_t spinlock;
local_t reading;
pid_t pid;
u8 *buf;
@@ -147,7 +147,7 @@ static int etb_enable_sysfs(struct coresight_device *csdev)
unsigned long flags;
struct etb_drvdata *drvdata = dev_get_drvdata(csdev->dev.parent);
- raw_spin_lock_irqsave(&drvdata->spinlock, flags);
+ spin_lock_irqsave(&drvdata->spinlock, flags);
/* Don't messup with perf sessions. */
if (drvdata->mode == CS_MODE_PERF) {
@@ -165,7 +165,7 @@ static int etb_enable_sysfs(struct coresight_device *csdev)
atomic_inc(&csdev->refcnt);
out:
- raw_spin_unlock_irqrestore(&drvdata->spinlock, flags);
+ spin_unlock_irqrestore(&drvdata->spinlock, flags);
return ret;
}
@@ -178,7 +178,7 @@ static int etb_enable_perf(struct coresight_device *csdev, void *data)
struct perf_output_handle *handle = data;
struct cs_buffers *buf = etm_perf_sink_config(handle);
- raw_spin_lock_irqsave(&drvdata->spinlock, flags);
+ spin_lock_irqsave(&drvdata->spinlock, flags);
/* No need to continue if the component is already in used by sysFS. */
if (drvdata->mode == CS_MODE_SYSFS) {
@@ -221,7 +221,7 @@ static int etb_enable_perf(struct coresight_device *csdev, void *data)
}
out:
- raw_spin_unlock_irqrestore(&drvdata->spinlock, flags);
+ spin_unlock_irqrestore(&drvdata->spinlock, flags);
return ret;
}
@@ -354,10 +354,10 @@ static int etb_disable(struct coresight_device *csdev)
struct etb_drvdata *drvdata = dev_get_drvdata(csdev->dev.parent);
unsigned long flags;
- raw_spin_lock_irqsave(&drvdata->spinlock, flags);
+ spin_lock_irqsave(&drvdata->spinlock, flags);
if (atomic_dec_return(&csdev->refcnt)) {
- raw_spin_unlock_irqrestore(&drvdata->spinlock, flags);
+ spin_unlock_irqrestore(&drvdata->spinlock, flags);
return -EBUSY;
}
@@ -367,7 +367,7 @@ static int etb_disable(struct coresight_device *csdev)
/* Dissociate from monitored process. */
drvdata->pid = -1;
drvdata->mode = CS_MODE_DISABLED;
- raw_spin_unlock_irqrestore(&drvdata->spinlock, flags);
+ spin_unlock_irqrestore(&drvdata->spinlock, flags);
dev_dbg(&csdev->dev, "ETB disabled\n");
return 0;
@@ -444,7 +444,7 @@ static unsigned long etb_update_buffer(struct coresight_device *csdev,
capacity = drvdata->buffer_depth * ETB_FRAME_SIZE_WORDS;
- raw_spin_lock_irqsave(&drvdata->spinlock, flags);
+ spin_lock_irqsave(&drvdata->spinlock, flags);
/* Don't do anything if another tracer is using this sink */
if (atomic_read(&csdev->refcnt) != 1)
@@ -567,7 +567,7 @@ static unsigned long etb_update_buffer(struct coresight_device *csdev,
__etb_enable_hw(drvdata);
CS_LOCK(drvdata->base);
out:
- raw_spin_unlock_irqrestore(&drvdata->spinlock, flags);
+ spin_unlock_irqrestore(&drvdata->spinlock, flags);
return to_read;
}
@@ -588,13 +588,13 @@ static void etb_dump(struct etb_drvdata *drvdata)
{
unsigned long flags;
- raw_spin_lock_irqsave(&drvdata->spinlock, flags);
+ spin_lock_irqsave(&drvdata->spinlock, flags);
if (drvdata->mode == CS_MODE_SYSFS) {
__etb_disable_hw(drvdata);
etb_dump_hw(drvdata);
__etb_enable_hw(drvdata);
}
- raw_spin_unlock_irqrestore(&drvdata->spinlock, flags);
+ spin_unlock_irqrestore(&drvdata->spinlock, flags);
dev_dbg(&drvdata->csdev->dev, "ETB dumped\n");
}
@@ -748,7 +748,7 @@ static int etb_probe(struct amba_device *adev, const struct amba_id *id)
drvdata->base = base;
desc.access = CSDEV_ACCESS_IOMEM(base);
- raw_spin_lock_init(&drvdata->spinlock);
+ spin_lock_init(&drvdata->spinlock);
drvdata->buffer_depth = etb_get_buffer_depth(drvdata);
--
2.43.0
More information about the kernel-team
mailing list