From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id F20D2C433EF for ; Mon, 1 Nov 2021 11:01:06 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C20AF60231 for ; Mon, 1 Nov 2021 11:01:06 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org C20AF60231 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=yr+1FWkIna6Hnm7ukncICUxGPoMM4g4G0mW0tTpvChs=; b=cWwZo+vBuu1yLZ yZeNocUYm1D3fRdBGL67SnKVF3qQmDoXWjAfEGPdu8i+vfiFMB5OAvX2zUjG7Ka6Rk9fIFLgde6r2 cF9pxcdJhCgIYeAdTCSEF/L2qDRDF19wbN9ZH2ALvQ/28+8MWpxNck+49EwgtKNCmma0VqkOkPR3E qIUiax8IrolfWBs2ZgnM7tf/cW4wH1Qw/YwHIzd+3NsFCkOmuTkrojLz2iRZReR7IR+bI5blDw/7I 37I7BlJktK5dmtDdYtPZgefXZcsRY51iH2wHePcAffEg8ZncYljWu6g5Uy4PAtkfDWLs2CjSo8F9Q lQjhNg6SAPeDO7mTgeLQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mhV2Z-00G17m-Jy; Mon, 01 Nov 2021 10:59:47 +0000 Received: from mail-pg1-x52d.google.com ([2607:f8b0:4864:20::52d]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mhV2V-00G16W-Cj for linux-arm-kernel@lists.infradead.org; Mon, 01 Nov 2021 10:59:44 +0000 Received: by mail-pg1-x52d.google.com with SMTP id b4so9796737pgh.10 for ; Mon, 01 Nov 2021 03:59:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=Du3RdDKeh8d/WwM1bhUDKYYDQzg7en92iJDHOWcBOyo=; b=ZOPdrP9trG9iG2RXxn/odr2iVHSdmsIZMm6sKg2WEzvoH9qJpVF5Lo6TJEW/+RTrCH 0t4gzaB5v0+6vuXoTm6U4nMq2w8By79rxMJUfcB3gg6GZ+YkEokPM0EeNi58s4Bgb/Tm UNQ4pVa43n0SR2iQcD5CcLwGHUasv2mizrAvHra1IfHABknLYmE2ZTffOjKo6cPQEZ6L i6lHcjNi+EdRQAT/NnfrId5t91DTDOwBUN0Br2/rrJgbAbTbnVZTerpzNniw8eyi1rN8 sSjjh6/XsWYuDDVXfh1WZuSGDxCCCyAtFo+XR4izv5NEVA+1pEMsuPSaZDmgPXonFWGP jM/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=Du3RdDKeh8d/WwM1bhUDKYYDQzg7en92iJDHOWcBOyo=; b=XoPgzjv6bJDNQqKD3ndoDC32Ecx8c/fOxcZL6dhTq2UUMSNCbSFmoEiImut6mrRI0K 67YRpj1unNL9tPzd34338jZ/NZxebSX3dBwGzTKrutRuhzsxpG+9Wr8/+otLGym5ywyd xwUglA19jS/igI6DZa2CPKUq/qH080+ODC1mTW3t3+YrgRUWhzLuoVg1EXJHoNMq7zI5 +zWlwlweqU2conmI9FYH7dfEkKiZEsO+z9PjnGbFmWNAiwlxDip4Op5uxc7y7G1JaSsd ZknmGyt6Y4XiGVlAN/qpJDyhNjYAXAURmC+yBtQxmbOGAGdUzMgRyQxN1loq37AWg+a8 5h8g== X-Gm-Message-State: AOAM531oAtXOmWuFseYGCrwhH6EMk+OybaK6vbskA2jZoNJOVrBwEx+h Y274w4yU4EwXt1868OAokQALNILXwHNDhhEsW9M= X-Google-Smtp-Source: ABdhPJyjqamA36C/F4jzZl5mgFp20XtycHRu1lZlE+OPkr7oKWZ8pR/b6abnMjLy4KU+zz9qy+pv8w== X-Received: by 2002:a63:6f4c:: with SMTP id k73mr21295263pgc.61.1635764382391; Mon, 01 Nov 2021 03:59:42 -0700 (PDT) Received: from leoy-ThinkPad-X240s ([103.136.124.227]) by smtp.gmail.com with ESMTPSA id h18sm16015568pfh.144.2021.11.01.03.59.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 Nov 2021 03:59:41 -0700 (PDT) Date: Mon, 1 Nov 2021 18:59:36 +0800 From: Leo Yan To: Suzuki K Poulose Cc: Mathieu Poirier , Mike Leach , Alexander Shishkin , James Clark , coresight@lists.linaro.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v1 1/4] coresight: etm4x: Add lock for reading virtual context ID comparator Message-ID: <20211101105936.GA352474@leoy-ThinkPad-X240s> References: <20211031144214.237879-1-leo.yan@linaro.org> <20211031144214.237879-2-leo.yan@linaro.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211101_035943_463877_A49520C7 X-CRM114-Status: GOOD ( 16.54 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Suzuki, On Mon, Nov 01, 2021 at 09:49:06AM +0000, Suzuki Kuruppassery Poulose wrote: > Hi Leo > > On 31/10/2021 14:42, Leo Yan wrote: > > When read the virtual context ID comparator value via sysfs node, the > > driver firstly reads out the index, then reads the comparator value > > based on index. > > > This patch adds the spinlock to protect the atomicity for up two steps. > > minor nit: This could be : > > "Updates to the values and the index are protected via the > spinlock. Ensure we use the same lock to read the value > safely" Yeah, this is more simple and clear. Will use it. > With that: > > Reviewed-by: Suzuki K Poulose Thanks for review. Leo _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel