From patchwork Sun Oct 18 18:24:32 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathieu Poirier X-Patchwork-Id: 7432031 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id B5E419F36A for ; Sun, 18 Oct 2015 18:33:53 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D1B5A205E3 for ; Sun, 18 Oct 2015 18:33:52 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 00F31205E1 for ; Sun, 18 Oct 2015 18:33:52 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Znskn-0006ty-Gf; Sun, 18 Oct 2015 18:32:21 +0000 Received: from mail-pa0-f45.google.com ([209.85.220.45]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Znsex-0004rv-GU for linux-arm-kernel@lists.infradead.org; Sun, 18 Oct 2015 18:26:20 +0000 Received: by padhk11 with SMTP id hk11so6281048pad.1 for ; Sun, 18 Oct 2015 11:25:58 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=yDiSXb4AaTbOZJw/hvbKK0RQqVfYXVaicMphE+RPCn4=; b=fG2n5oIWCXp+yw8CpE/Bh2sYQTuksollRNrV8oLMY5+lVzSzdBbIUHVyXUxOvInFel UAjcw1zdf4u/bHbd5G/6wp0cLy/t9roXBRE6Vb05NmJVcNW1H621EtRK8Xkz6LsvLQ7Q gXijOhFNZaMOeqPbIqyxcYoeKZ3VnAscrnpxk6Nt2hnKnJdfPvIn5d2bm7864YcGkFy1 ry8RwDSmcba9QnQKs86WUKFmKbxlVeMAa2jgEM0yRiykhQ7JZOxZqsub23uFs1/gbYw+ xms3+yWJCqCNmGTRRLBcbGkGqcDtAii2+b0bK2pvKtJoJLcavXkeBZ1NnkNFkBPdC+aS a/sA== X-Gm-Message-State: ALoCoQkCkmgP+o4LM/MaY94azsYNwT+zheOgg84nXUD5POT2mT1Xl8MEE3eFLN0BWrGP/sYTfxsr X-Received: by 10.66.132.37 with SMTP id or5mr29289111pab.5.1445192758681; Sun, 18 Oct 2015 11:25:58 -0700 (PDT) Received: from t430.cg.shawcable.net (S0106002369de4dac.cg.shawcable.net. [184.64.168.246]) by smtp.gmail.com with ESMTPSA id hq1sm20402076pbb.43.2015.10.18.11.25.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 18 Oct 2015 11:25:58 -0700 (PDT) From: Mathieu Poirier To: gregkh@linuxfoundation.org, a.p.zijlstra@chello.nl, alexander.shishkin@linux.intel.com, acme@kernel.org, mingo@redhat.com, corbet@lwn.net, nicolas.pitre@linaro.org Subject: [PATCH V2 15/30] coresight: making coresight_build_paths() public Date: Sun, 18 Oct 2015 12:24:32 -0600 Message-Id: <1445192687-24112-16-git-send-email-mathieu.poirier@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1445192687-24112-1-git-send-email-mathieu.poirier@linaro.org> References: <1445192687-24112-1-git-send-email-mathieu.poirier@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20151018_112619_687760_14CF2C2D X-CRM114-Status: GOOD ( 10.84 ) X-Spam-Score: -2.6 (--) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: al.grant@arm.com, mathieu.poirier@linaro.org, pawel.moll@arm.com, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, adrian.hunter@intel.com, tor@ti.com, mike.leach@arm.com, zhang.chunyan@linaro.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP That way a path can be built outside of the core framework, something useful when a PMU is initialised from the perf subsystem. Signed-off-by: Mathieu Poirier --- drivers/hwtracing/coresight/coresight-priv.h | 3 +++ drivers/hwtracing/coresight/coresight.c | 5 ++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/hwtracing/coresight/coresight-priv.h b/drivers/hwtracing/coresight/coresight-priv.h index 62fcd98cc7cf..8a52fdcb4bd6 100644 --- a/drivers/hwtracing/coresight/coresight-priv.h +++ b/drivers/hwtracing/coresight/coresight-priv.h @@ -52,6 +52,9 @@ static inline void CS_UNLOCK(void __iomem *addr) } while (0); } +int coresight_build_paths(struct coresight_device *csdev, + struct list_head *path, bool enable); + #ifdef CONFIG_CORESIGHT_SOURCE_ETM3X extern int etm_readl_cp14(u32 off, unsigned int *val); extern int etm_writel_cp14(u32 off, u32 val); diff --git a/drivers/hwtracing/coresight/coresight.c b/drivers/hwtracing/coresight/coresight.c index d318a338a517..083080d435af 100644 --- a/drivers/hwtracing/coresight/coresight.c +++ b/drivers/hwtracing/coresight/coresight.c @@ -301,9 +301,8 @@ static int coresight_disable_path(struct list_head *path) return 0; } -static int coresight_build_paths(struct coresight_device *csdev, - struct list_head *path, - bool enable) +int coresight_build_paths(struct coresight_device *csdev, + struct list_head *path, bool enable) { int i, ret = -EINVAL; struct coresight_connection *conn;