Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp7645317rwl; Tue, 10 Jan 2023 03:39:41 -0800 (PST) X-Google-Smtp-Source: AMrXdXu6yJlw9m9qxIG6LVA2i8PTS+YRPJjUi6whHud1SXS0MMOApyudZrmXr/ubJ44cOgPmHSLF X-Received: by 2002:a17:906:910:b0:7c0:f71b:8b3 with SMTP id i16-20020a170906091000b007c0f71b08b3mr54490095ejd.57.1673350781166; Tue, 10 Jan 2023 03:39:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673350781; cv=none; d=google.com; s=arc-20160816; b=pS9BEmzDMq7c734+bbq/ATMZ3EdJmgLfGqg4xUhTWFw7zbrVDM42Y0VLY01boJ+3+Q orUnsqWL24xe2l0AkSz65TR0hwycH+yYeTYvGjx8pDTiJg0mf0aP8Hlu0krrwlff53HK PC02XlcBAq0ANtHGkOuzxMZhi+CSVuy7ilQXQCvdcLTSk9aSOlTwEQgtMqsDwmPsd6LY L05MbXswNqGM6GZ46fNYHKdW7QsdlbhPOrqmR1BUc2zX7RmVnIC86gYN9SiUIVwhvAya gpMQoc7WcCgC/Vn5HfPKE3S51IDqUphS77+jNxNk31elI05AWxbioHHo4V49SpvZAJsg pySw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=hpIMBAfB78+OhwrQ7MyvyJGzGpVjsvW58450NDXci00=; b=CnvxTClqe8lpN9pujqS/wnxUwtNhn0a38rWGyc94F3AqZnONfcX5RybAodydNiS+Tt t/CarpNFj79T4n5aY6OTUoIWeSrvGXkk8Yft4qCXZPNDQzFpwK6tZXPdcwRI4XSSRgMK 1i2qXh00OzW18yoTJ5ALsVSHHniB9Kp3Ws5Ma0g3RnAx0Yh0UPct/C8C3A+u2O3PIlVL UrlLXY9kD4WpreT8aQr1lOqMoL5P8fYhJ/LUmLHMY58pvr39JHBAVFbS7pSce40vklp9 iZ3vv4/mPurhRbBvxVaS+RZfV4hYNkV0in/AiGFkZtZduxh3D0toJA2WpodjcVjdBMeh arsA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id nb40-20020a1709071ca800b00817f6980922si12852701ejc.355.2023.01.10.03.39.27; Tue, 10 Jan 2023 03:39:41 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232391AbjAJLKC (ORCPT + 53 others); Tue, 10 Jan 2023 06:10:02 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50866 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238348AbjAJLIv (ORCPT ); Tue, 10 Jan 2023 06:08:51 -0500 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id BCC7637524 for ; Tue, 10 Jan 2023 03:08:07 -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 7BEFE4B3; Tue, 10 Jan 2023 03:08:49 -0800 (PST) Received: from e126815.warwick.arm.com (e126815.arm.com [10.32.32.26]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id DF81B3F587; Tue, 10 Jan 2023 03:08:05 -0800 (PST) From: James Clark To: coresight@lists.linaro.org, quic_jinlmao@quicinc.com, suzuki.poulose@arm.com, mike.leach@linaro.org Cc: James Clark , Mathieu Poirier , Leo Yan , Alexander Shishkin , Greg Kroah-Hartman , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 0/3] coresight: cti: Add PM runtime call in enable_store Date: Tue, 10 Jan 2023 11:07:33 +0000 Message-Id: <20230110110736.2709917-1-james.clark@arm.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_NONE autolearn=ham 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 Changes since v2: * Reword first commit message and add fixes tag * Pickup Jinlong's tested-by tags ---- This should be a slight improvement on Jinlong's previous version. Now it's not possible to trigger the error message from pm_runtime_put() by calling disable twice. It's also similar to the original pre-breaking change version where pm_runtime_put() was only called if the device was actually disabled, but with one difference: Previously pm_runtime_put() was only called once for the last disable call, but because of the reference counting in pm_runtime, it should have been called once for each enable call. This meant that the clock would have never been disabled if there were ever multiple enable calls. This is now fixed. The third commit is a refactor and doesn't need to be backported. I removed one of the atomic types because it didn't appear to be required. Maybe it was added for a reason which I'm not aware of, if so it should be pretty easy to drop that change. James Clark (2): coresight: cti: Prevent negative values of enable count coresight: cti: Remove atomic type from enable_req_count Mao Jinlong (1): coresight: cti: Add PM runtime call in enable_store .../hwtracing/coresight/coresight-cti-core.c | 23 ++++++++++++------- .../hwtracing/coresight/coresight-cti-sysfs.c | 15 +++++++++--- drivers/hwtracing/coresight/coresight-cti.h | 2 +- 3 files changed, 28 insertions(+), 12 deletions(-) base-commit: 88603b6dc419445847923fcb7fe5080067a30f98 -- 2.25.1