[PATCH V4 10/18] coresight: tmc: getting rid of multiple read access

Suzuki K Poulose Suzuki.Poulose at arm.com
Wed Apr 27 01:54:33 PDT 2016


On 26/04/16 23:10, Mathieu Poirier wrote:
> Allowing multiple readers to access the trace data simultaniously
> via sysFS provides no shortage of opportunity for race condition,
> mandates two variable to be maintained (drvdata::read_count and
> drvdata::reading), makes the code complex and provide little
> advantages, if any.
>
> This patch streamlines the read process by restricting trace data
> access to a single user.  That way drvdata::read_count can
> be eliminated and race conditions (along with faulty error handling)
> in function tmc_open() and tmc_release() eliminated.
>
> Signed-off-by: Mathieu Poirier <mathieu.poirier at linaro.org>

Nice!

Reviewed-by: Suzuki K Poulose <suzuki.poulose at arm.com>

Suzuki



More information about the linux-arm-kernel mailing list