void etb_disable(void) { mutex_lock(&etb.lock); __etb_disable(); etb.enabled = false; dev_info(etb.dev, "etb disabled\n"); mutex_unlock(&etb.lock); }
void etb_disable(void) { unsigned long flags; spin_lock_irqsave(&etb.spinlock, flags); __etb_disable(); etb.enabled = false; spin_unlock_irqrestore(&etb.spinlock, flags); }
void etb_disable(void) { unsigned long flags; spin_lock_irqsave(&etb.spinlock, flags); __etb_disable(); etb.enabled = false; dev_info(etb.dev, "ETB disabled\n"); spin_unlock_irqrestore(&etb.spinlock, flags); }
void etb_dump(void) { mutex_lock(&etb.lock); if (etb.enabled) { __etb_disable(); __etb_dump(); __etb_enable(); dev_info(etb.dev, "etb dumped\n"); } mutex_unlock(&etb.lock); }
static void etb_abort(struct coresight_device *csdev) { struct etb_drvdata *drvdata = dev_get_drvdata(csdev->dev.parent); unsigned long flags; spin_lock_irqsave(&drvdata->spinlock, flags); __etb_disable(drvdata); __etb_dump(drvdata); drvdata->enable = false; spin_unlock_irqrestore(&drvdata->spinlock, flags); dev_info(drvdata->dev, "ETB aborted\n"); }
void etb_dump(void) { unsigned long flags; spin_lock_irqsave(&etb.spinlock, flags); if (etb.enabled) { __etb_disable(); __etb_dump(); __etb_enable(); } spin_unlock_irqrestore(&etb.spinlock, flags); }
static void etb_dump(struct etb_drvdata *drvdata) { unsigned long flags; spin_lock_irqsave(&drvdata->spinlock, flags); if (drvdata->enable) { __etb_disable(drvdata); __etb_dump(drvdata); __etb_enable(drvdata); } spin_unlock_irqrestore(&drvdata->spinlock, flags); dev_info(drvdata->dev, "ETB dumped\n"); }