Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp1814528pxb; Wed, 9 Feb 2022 05:11:57 -0800 (PST) X-Google-Smtp-Source: ABdhPJzcnIZRi9MaP4+TJh6bLnmkiU/+28FKfAEhUlkyvYgnOfcdsOpOLFB3Kv4FjnclwlM3P5Lx X-Received: by 2002:a63:565a:: with SMTP id g26mr1889897pgm.48.1644412317100; Wed, 09 Feb 2022 05:11:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644412317; cv=none; d=google.com; s=arc-20160816; b=ioTVvOTU1Axn1x9gJWXz8rCsGQKrd063G6Hs7Zee4o+UKlWUDra3ioLnyAcX4mh0Xq HUckxg3SoX/YnZ6+o8VqQpzeAWkiTQNzLcM0UGIW24VUNHuYIEWyEr1l49jVwk/g00SS 7PO4TjPFNfZhgtsReGRGv1v9nCm+/rGUwp2tDGqwZ7WyTcnV58Jj4TY6oP5S2UQ0n8cN k3igVD6RLDB+AAV6Gvp0EtoShDmZxe6B2eVETiPLyGfeg0ZOHuUpaz9w5fEqQCHTJfwg YXOLIA44s1Hka9mv8W2qxzYkAQ458BxAyGMmrET8Am+CJWWekQYpiOs1WRlkAnW/4XTr 8XaQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:subject:user-agent:mime-version:date:message-id; bh=DGtTThxG8eMu4l5AGbCfdljxxRFo/AQI1NlViNH60a4=; b=fqK36g3LKYr1IJuRRH2ajCG+zQI5ukSwp+e+zOIOHtShqORSub6IukWeDGP1+i8CsC JeuHipqeGCC1BxIf9Xzw07Pj4Gm7EfiT21M+T+BMxpPQXc2i44Kapkn3Ne4i0rOvpabm cqZawEz5onQtMYPPgR3WhraLBOFEd4cfQN2gwGuLUc9pDL5LzVaZM5cwwwFaRAkgCwP7 JDIcssAMPQck+3EEb6rMOOkkJUtPCsbhM8YtBt2s47TlhCYZwDtRda9KXkfJjuMJfzTF YkF2M8auQY9Wce5xITMMEdH4w3PiJzx5Zx+VRxwY6X7Sfen3iT3/KJd4YIMI88ns+rK+ Ndig== ARC-Authentication-Results: i=1; mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id 23si16096730pgb.427.2022.02.09.05.11.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Feb 2022 05:11:57 -0800 (PST) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 98A13E17ECF3; Wed, 9 Feb 2022 02:37:12 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235477AbiBIJvE (ORCPT + 99 others); Wed, 9 Feb 2022 04:51:04 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58172 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237766AbiBIJvA (ORCPT ); Wed, 9 Feb 2022 04:51:00 -0500 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id EB96BE073E0C for ; Wed, 9 Feb 2022 01:50:53 -0800 (PST) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id D25BF1FB; Wed, 9 Feb 2022 01:42:31 -0800 (PST) Received: from [10.57.88.251] (unknown [10.57.88.251]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id A38703F73B; Wed, 9 Feb 2022 01:42:30 -0800 (PST) Message-ID: <5fbadc11-0371-7dec-3189-ef5908fb3122@arm.com> Date: Wed, 9 Feb 2022 09:42:29 +0000 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.5.1 Subject: Re: [PATCH v2 RESEND 1/4] coresight: etm4x: Add lock for reading virtual context ID comparator To: Leo Yan Cc: Mathieu Poirier , Mike Leach , Alexander Shishkin , coresight@lists.linaro.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org 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> From: Suzuki K Poulose In-Reply-To: <20220209093304.GA334894@leoy-ThinkPad-X240s> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A, RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 ? Cheers Suzuki