From patchwork Thu Aug 25 21:19:13 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathieu Poirier X-Patchwork-Id: 74757 Delivered-To: patch@linaro.org Received: by 10.140.29.52 with SMTP id a49csp1053562qga; Thu, 25 Aug 2016 14:38:53 -0700 (PDT) X-Received: by 10.98.84.65 with SMTP id i62mr20266028pfb.72.1472161133728; Thu, 25 Aug 2016 14:38:53 -0700 (PDT) Return-Path: Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id c63si17353199pfg.288.2016.08.25.14.38.53 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 25 Aug 2016 14:38:53 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) client-ip=2001:1868:205::9; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) smtp.mailfrom=linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org; dmarc=fail (p=NONE dis=NONE) header.from=linaro.org Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1bd2LP-0005rK-CQ; Thu, 25 Aug 2016 21:37:51 +0000 Received: from mail-it0-x235.google.com ([2607:f8b0:4001:c0b::235]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bd24c-0006it-Cc for linux-arm-kernel@lists.infradead.org; Thu, 25 Aug 2016 21:20:32 +0000 Received: by mail-it0-x235.google.com with SMTP id e63so297108188ith.1 for ; Thu, 25 Aug 2016 14:20:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Sz2mw5zKkwyVkZrJBDlvkW+WWoBeAo+1m00sGoVrcOg=; b=QmqrJ/YLOxOboMC/654eD259fDboDcgWJk+3CKQnslYfgfC5W2JSsRlhqr6oXHP69v VkyXu2xnByfCMtXoW4n15KTqgqBEWUnnOT+s3Vo8VskZ7HyTuboyGb/61cLD2Np7cJYi AUTS36Ju8DxByWl+WOupUgPUXFJgsfFPc/LVM= 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=Sz2mw5zKkwyVkZrJBDlvkW+WWoBeAo+1m00sGoVrcOg=; b=bjNrBVCPjx/BmzNMt/c7+KiBLJLG9b7n+71L1s8X8/R0KDKuCpWAOnBYWMsrS+7hI1 G0k9d1NgOxekcoWqG7aT5B23lu81j1s4PV96EGFvpNxwCQKDtD9/QI+4QySJdwuDyZJ0 lRSdzeBwLHX6pQ5VOgYs6ay1qjpvQiMedUuiXelCbGQERRuzYFaY5GfSaugzwaBdTr84 5CVKXjkUPyGiM7JCJkhCNjxmuhOLRty5v1R/KCQh0KsHwsFg6dgzBAVZUpim3f8/OaR5 guRFLMHlf+eYifPYaK++FrGJer2KdyCJvBM28UM2ms0m7667K/8re7v++PHoQINJxspL vgPQ== X-Gm-Message-State: AEkoouuObQQxcyHBTMtJIZK2t9Pt690Mlm2uP2KldNYCcn6xpFzDeMgagljpNWed8Uj9NW96 X-Received: by 10.36.129.213 with SMTP id q204mr7994870itd.38.1472160009794; Thu, 25 Aug 2016 14:20:09 -0700 (PDT) Received: from t430.cg.shawcable.net (S0106002369de4dac.cg.shawcable.net. [68.147.8.254]) by smtp.gmail.com with ESMTPSA id o5sm14506120ith.20.2016.08.25.14.20.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 25 Aug 2016 14:20:09 -0700 (PDT) From: Mathieu Poirier To: gregkh@linuxfoundation.org Subject: [PATCH 23/28] coresight: etm4x: split default and filter configuration Date: Thu, 25 Aug 2016 15:19:13 -0600 Message-Id: <1472159958-5981-24-git-send-email-mathieu.poirier@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1472159958-5981-1-git-send-email-mathieu.poirier@linaro.org> References: <1472159958-5981-1-git-send-email-mathieu.poirier@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160825_142030_685116_9EADACA9 X-CRM114-Status: GOOD ( 12.06 ) X-Spam-Score: -2.7 (--) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-2.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [2607:f8b0:4001:c0b:0:0:0:235 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid 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: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org Splitting the steps involved in the configuration of a tracer. The first part is generic and can be reused for both sysFS and Perf methods. The second part pertains to the configuration of filters themselves where the source of the information used to configure the filters will vary depending on the access methods. Signed-off-by: Mathieu Poirier --- drivers/hwtracing/coresight/coresight-etm4x.c | 36 ++++++++++++++++----------- 1 file changed, 22 insertions(+), 14 deletions(-) -- 2.7.4 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel diff --git a/drivers/hwtracing/coresight/coresight-etm4x.c b/drivers/hwtracing/coresight/coresight-etm4x.c index b9e26d4f6b84..f890d1de39e3 100644 --- a/drivers/hwtracing/coresight/coresight-etm4x.c +++ b/drivers/hwtracing/coresight/coresight-etm4x.c @@ -562,21 +562,8 @@ static void etm4_init_arch_data(void *info) CS_LOCK(drvdata->base); } -static void etm4_set_default(struct etmv4_config *config) +static void etm4_set_default_config(struct etmv4_config *config) { - if (WARN_ON_ONCE(!config)) - return; - - /* - * Make default initialisation trace everything - * - * Select the "always true" resource selector on the - * "Enablign Event" line and configure address range comparator - * '0' to trace all the possible address range. From there - * configure the "include/exclude" engine to include address - * range comparator '0'. - */ - /* disable all events tracing */ config->eventctrl0 = 0x0; config->eventctrl1 = 0x0; @@ -592,7 +579,10 @@ static void etm4_set_default(struct etmv4_config *config) /* TRCVICTLR::EVENT = 0x01, select the always on logic */ config->vinst_ctrl |= BIT(0); +} +static void etm4_set_default_filter(struct etmv4_config *config) +{ /* * TRCVICTLR::SSSTATUS == 1, the start-stop logic is * in the started state @@ -638,6 +628,24 @@ static void etm4_set_default(struct etmv4_config *config) config->vissctlr = 0x0; } +static void etm4_set_default(struct etmv4_config *config) +{ + if (WARN_ON_ONCE(!config)) + return; + + /* + * Make default initialisation trace everything + * + * Select the "always true" resource selector on the + * "Enablign Event" line and configure address range comparator + * '0' to trace all the possible address range. From there + * configure the "include/exclude" engine to include address + * range comparator '0'. + */ + etm4_set_default_config(config); + etm4_set_default_filter(config); +} + void etm4_config_trace_mode(struct etmv4_config *config) { u32 addr_acc, mode;