From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753091AbcD0Iyq (ORCPT ); Wed, 27 Apr 2016 04:54:46 -0400 Received: from foss.arm.com ([217.140.101.70]:32908 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752603AbcD0Iyl (ORCPT ); Wed, 27 Apr 2016 04:54:41 -0400 Subject: Re: [PATCH V4 10/18] coresight: tmc: getting rid of multiple read access To: Mathieu Poirier , linux-arm-kernel@lists.infradead.org References: <1461708634-6327-1-git-send-email-mathieu.poirier@linaro.org> <1461708634-6327-11-git-send-email-mathieu.poirier@linaro.org> Cc: linux-kernel@vger.kernel.org From: Suzuki K Poulose Message-ID: <57207E49.8050504@arm.com> Date: Wed, 27 Apr 2016 09:54:33 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 MIME-Version: 1.0 In-Reply-To: <1461708634-6327-11-git-send-email-mathieu.poirier@linaro.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 Nice! Reviewed-by: Suzuki K Poulose Suzuki From mboxrd@z Thu Jan 1 00:00:00 1970 From: Suzuki.Poulose@arm.com (Suzuki K Poulose) Date: Wed, 27 Apr 2016 09:54:33 +0100 Subject: [PATCH V4 10/18] coresight: tmc: getting rid of multiple read access In-Reply-To: <1461708634-6327-11-git-send-email-mathieu.poirier@linaro.org> References: <1461708634-6327-1-git-send-email-mathieu.poirier@linaro.org> <1461708634-6327-11-git-send-email-mathieu.poirier@linaro.org> Message-ID: <57207E49.8050504@arm.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org 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 Nice! Reviewed-by: Suzuki K Poulose Suzuki