Message ID | 20230106152331.1374973-1-james.clark@arm.com |
---|---|
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp879490wrt; Fri, 6 Jan 2023 07:25:17 -0800 (PST) X-Google-Smtp-Source: AMrXdXuqw2JkDhsfI7YvHYANrQrD4Was8hZQalyo/kAcg3nVUWkdIuM75sTHg1W6dToMd8ufkrfH X-Received: by 2002:a62:5f87:0:b0:576:1c37:5720 with SMTP id t129-20020a625f87000000b005761c375720mr49988390pfb.4.1673018716682; Fri, 06 Jan 2023 07:25:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673018716; cv=none; d=google.com; s=arc-20160816; b=gxBeZXspNQDy0MZDfaGw6apVCoJGOz+YcKOD+28q1pz0GNb8zLK3ZI7JT0Pu7p4kjM C9J4/8y8Un3HA06Qt2Oc1PO8LCnMFRMDMklJLoaQw12+11iCknKkPG7d5tcl+ZIqkWKJ 6hyrMsiqOiUfYHtlBH8O/n9gKgaLFo78HF1KTyJ2VpdwqpqVIY+GACApD0oLppF2c5S0 UwuPY72YOonCUmT5lK3w8g5yHLWOUaIaAZWmGFyrg4akQ2S4MOtLlvycAp/gp4UcAft2 95n02W8qIpRE9GPKhVR0mGCmOH43ZfcfJ3QLmBL0TePxZ3fzwZ9zp2u4rbvrukjro+4l xICQ== 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=rWHGO1h9Z9waxdHDVJeIpZheFFqSPJA4hWkroX0tVIk=; b=0ct66Ir0I2btIvdya3tt8kw6Z6G7MTCUSR1AEu86EB5wEVKBOJIt2OfVOY4cye9wmX lN0/AQGzoUm4Qny0uz7dZiTCxztIjVU56rdbNBV8vi6gY8YKYyL4MR4/zyWxF3iFG0Vg f+aBg7eeahgXRqUOOadPRdYvQGf6PUzWAN3xHgRtIbd0emMBHO3RVz6nhC1+r+dzORvW 5ALio7Zev1xUEJ64MOVjOCLb1JdTbVIIIs8lq/VwMm3T4EWFgReNnJ1aSJ+AiJAl1pjN xhDNJcmXQJcJfXKY/klG0Sh44EYrrK25R8iJOHFibmFHW1P1dK/DIwzC92C3HXrZTe7s xprg== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h12-20020a056a00170c00b0058286279c89si1727074pfc.309.2023.01.06.07.25.04; Fri, 06 Jan 2023 07:25:16 -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 S233287AbjAFPXp (ORCPT <rfc822;tmhikaru@gmail.com> + 99 others); Fri, 6 Jan 2023 10:23:45 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39352 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231764AbjAFPXl (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 6 Jan 2023 10:23:41 -0500 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id D264045666 for <linux-kernel@vger.kernel.org>; Fri, 6 Jan 2023 07:23:39 -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 454F8113E; Fri, 6 Jan 2023 07:24:21 -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 D0C8A3F71A; Fri, 6 Jan 2023 07:23:37 -0800 (PST) From: James Clark <james.clark@arm.com> To: coresight@lists.linaro.org, quic_jinlmao@quicinc.com, suzuki.poulose@arm.com, mike.leach@linaro.org Cc: James Clark <james.clark@arm.com>, Mathieu Poirier <mathieu.poirier@linaro.org>, Leo Yan <leo.yan@linaro.org>, Alexander Shishkin <alexander.shishkin@linux.intel.com>, Greg Kroah-Hartman <gregkh@linuxfoundation.org>, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 0/3] coresight: cti: Add PM runtime call in enable_store Date: Fri, 6 Jan 2023 15:23:27 +0000 Message-Id: <20230106152331.1374973-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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1754287273721936916?= X-GMAIL-MSGID: =?utf-8?q?1754287273721936916?= |
Series |
coresight: cti: Add PM runtime call in enable_store
|
|
Message
James Clark
Jan. 6, 2023, 3:23 p.m. UTC
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: c767c34740132ffc478226864a7461493cdc2413