coresight: etb10: Move etb_disable_hw() outside of lock
authorMathieu Poirier <mathieu.poirier@linaro.org>
Wed, 2 Aug 2017 16:21:58 +0000 (10:21 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 28 Aug 2017 14:05:47 +0000 (16:05 +0200)
Function etb_disable_hw() is already taking care of unlocking and locking
the coresight access register and as such doesn't need to be placed
within the unlock/lock of function etb_update_buffer().

Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/hwtracing/coresight/coresight-etb10.c

index 42360306f049cefba9a911ec45d93e519e3a7f4b..d0d186575c5d67c0afefd0418e10c54a729307c7 100644 (file)
@@ -376,8 +376,8 @@ static void etb_update_buffer(struct coresight_device *csdev,
 
        capacity = drvdata->buffer_depth * ETB_FRAME_SIZE_WORDS;
 
-       CS_UNLOCK(drvdata->base);
        etb_disable_hw(drvdata);
+       CS_UNLOCK(drvdata->base);
 
        /* unit is in words, not bytes */
        read_ptr = readl_relaxed(drvdata->base + ETB_RAM_READ_POINTER);