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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id BBF17C433EF for ; Wed, 9 Feb 2022 16:59:18 +0000 (UTC) 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=BP/4RsiPtri+YbtlZCPMpftm0xwzrI/3LDJXLLY+jVs=; b=lKwnvmCydAYaKC /RVK0wDAtLdKWDsVWBcjciLX5L1UTny5BcFSM5I4F5lOgAg6HV77n05bk6ewoshF1c3f3/MJwX3jx HR+cCS3ow+T/oIQKh/6aOX8eIa/Y54YAv1xNbbQ3mGY1Q1RurAwxDBzbeVjWW6at+ViomAcdNaUPO bU0Othg0/FpJ8XusABG4VDaOOitIPlIyaJmBA5RdTpP1zI/wk1Ghs9UNynqgjCX9rgIf9c/xQZ6ZV L0aS15QPVbvehNtDW/PijAOyacmHSF4ZZzQGQ46FNLWpzwXOMRUoDC5oZRxhoH50Nabt/vXmfYOho pG30rM9GpbwHAT+DGd1w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nHqID-000uJw-5w; Wed, 09 Feb 2022 16:58:09 +0000 Received: from mail-pf1-x42c.google.com ([2607:f8b0:4864:20::42c]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nHqI9-000uIa-BL for linux-arm-kernel@lists.infradead.org; Wed, 09 Feb 2022 16:58:06 +0000 Received: by mail-pf1-x42c.google.com with SMTP id r19so5317612pfh.6 for ; Wed, 09 Feb 2022 08:58:04 -0800 (PST) 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=fo6XR7spd9XcEJkq6CJIEEsCXHgqcsp2/wdsL0apsQc=; b=s4c5xPmVw4azK2xx5T7guOhuLISLqh50z5xDON+mSKfu/jhvkIl0R90HMG2BZ1bowp xPqG7tNmIPznCK+5No4lEha5zjiaDzt4rhCCE1/ea+x+C4nqsCNcnS2zbaHz97Da4+FV +bfos6Q2OVZmAqlMaKoNqxFpWkfbvg6mByHlrZR50zxLZZTar1oUVoa1ZeEufllhts8D FAGdHg+ot6eAJ4Oj/FgRRMbjaS7M2tBKKt75qCTGcO9z+h41r/rf5kg4nyya7GWAC340 lfMC2me1mEavFUn3J9o1Yrfd69gEEyDpMqBfP+Gfcw3rwtACCBXlhMXEeEru8J2UKWU7 guwg== 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=fo6XR7spd9XcEJkq6CJIEEsCXHgqcsp2/wdsL0apsQc=; b=ZDiV5cmW0dLNXSrq5HB5TKrdc1HNxMgje91eNW6r2uBvcaysvlZjMJMgOk2kPZz2By sqZzZJ3nZrl4kcBvJZ0XC+2nMkq4uf4HYRsdryqCeTNAH0jLIza4PaV64zJohaPXHz51 MvApyI51ZrSG/kBoXJETGLh+n4w6Dqr55oZuRMw6YEv3RVCxiuPw7VcyFv+gnW2GULcd 52GNJHZuEOT67ajISVDdf8ZsKCoouPzlhYFQErdc3XzoHbtYvDvu4kAjGa2QUgq3R/+P fI+yweOconPC9A+mmHXn/IVXuhwSZ0MLkf0+jsMSKe0q8xPkSRF2TcDf4dPUcGgktf5f bLlg== X-Gm-Message-State: AOAM530CM0ilv8q59x9hYWJz+MQhmVLRofUwDpYs8s1lajNI6dEB2kiT ZeIoUPYXpjvkSk9chpl5myrr3Q== X-Google-Smtp-Source: ABdhPJxOKLuoagmc/nGkJEkumRLEQI44gBYvwGBBkDi48NIEr2p9/tyMBLc3imUVjYl2fRMakDeY+g== X-Received: by 2002:a63:555b:: with SMTP id f27mr2612331pgm.468.1644425884027; Wed, 09 Feb 2022 08:58:04 -0800 (PST) Received: from p14s (S0106889e681aac74.cg.shawcable.net. [68.147.0.187]) by smtp.gmail.com with ESMTPSA id f8sm20665506pfv.24.2022.02.09.08.58.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Feb 2022 08:58:03 -0800 (PST) Date: Wed, 9 Feb 2022 09:58:00 -0700 From: Mathieu Poirier To: Suzuki K Poulose Cc: Leo Yan , Mike Leach , Alexander Shishkin , coresight@lists.linaro.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 RESEND 1/4] coresight: etm4x: Add lock for reading virtual context ID comparator Message-ID: <20220209165800.GA3548585@p14s> References: <20220204152403.71775-1-leo.yan@linaro.org> <20220204152403.71775-2-leo.yan@linaro.org> <6b91293a-1149-2c77-04a4-421a45d4e1e0@arm.com> <20220209093304.GA334894@leoy-ThinkPad-X240s> <5fbadc11-0371-7dec-3189-ef5908fb3122@arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <5fbadc11-0371-7dec-3189-ef5908fb3122@arm.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220209_085805_450481_07D8291D X-CRM114-Status: GOOD ( 33.64 ) 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 Hey guys, On Wed, Feb 09, 2022 at 09:42:29AM +0000, Suzuki K Poulose wrote: > Hi Leo > > On 09/02/2022 09:33, Leo Yan wrote: > > Hi Suzuki, > > > > On Wed, Feb 09, 2022 at 05:47:24AM +0000, Suzuki Kuruppassery Poulose wrote: > > > Hi Leo > > > > > > On 04/02/2022 15:24, Leo Yan wrote: > > > > Updates to the values and the index are protected via the spinlock. > > > > Ensure we use the same lock to read the value safely. > > > > > > > > Signed-off-by: Leo Yan > > > > Reviewed-by: Suzuki K Poulose > > > > --- > > > > drivers/hwtracing/coresight/coresight-etm4x-sysfs.c | 2 ++ > > > > 1 file changed, 2 insertions(+) > > > > > > > > diff --git a/drivers/hwtracing/coresight/coresight-etm4x-sysfs.c b/drivers/hwtracing/coresight/coresight-etm4x-sysfs.c > > > > index 10ef2a29006e..2f3b4eef8261 100644 > > > > --- a/drivers/hwtracing/coresight/coresight-etm4x-sysfs.c > > > > +++ b/drivers/hwtracing/coresight/coresight-etm4x-sysfs.c > > > > @@ -2111,7 +2111,9 @@ static ssize_t vmid_val_show(struct device *dev, > > > > struct etmv4_drvdata *drvdata = dev_get_drvdata(dev->parent); > > > > struct etmv4_config *config = &drvdata->config; > > > > + spin_lock(&drvdata->spinlock); > > > > val = (unsigned long)config->vmid_val[config->vmid_idx]; > > > > + spin_unlock(&drvdata->spinlock); > > > > return scnprintf(buf, PAGE_SIZE, "%#lx\n", val); > > > > } > > > > > > > > > I have queued this patch. > > > > Thanks! > > > > > For the rest, we would need to wait until the helper lands in the rc. > > Sorry, that was not the exact argument, see below. > > > > > The helper function patch has been landed on the mainline kernel, > > it would be safe to merge the rest patches. > > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=d7e4f8545b497b3f5687e592f1c355cbaee64c8c > > The coresight queue is based on rc1 and we already created a stable > tag for TRBE erratas, which was pulled into arm64. So, (correct me > if I am wrong), AFAIU, we cannot rebase the queue on to rc2 where > the patch landed. But happy to proceed, if there is a solution. > > Mathieu, what do you think ? Your assesment above is correct - because the commitIDs have been published and used in another tree we can't simply rebase to -rc2. Otherwise we would end up with the same patches with different commitIDs published in various trees. To deal with this we would "normally" ask Jakub Kicinski to prepare a pull request for us to use, after which Leo's patches could be applied. But in this case Catalin sent the arm64 part of the TRBE errata patchset to Linus as an -rc fix. As such those patches are already in Linus' tree with the same commitIDs we currently have in the coresight-next tree. Therefore you can simply rebase to rc2 (or rc3) and pile up Leo's patches on top of that. Thanks, Mathieu _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel