From patchwork Wed Jun 22 02:46:53 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chunyan Zhang X-Patchwork-Id: 70604 Delivered-To: patch@linaro.org Received: by 10.140.28.4 with SMTP id 4csp2324155qgy; Tue, 21 Jun 2016 19:49:57 -0700 (PDT) X-Received: by 10.66.127.47 with SMTP id nd15mr32175685pab.74.1466563797914; Tue, 21 Jun 2016 19:49:57 -0700 (PDT) Return-Path: Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id q7si43894887pfb.208.2016.06.21.19.49.57 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 21 Jun 2016 19:49:57 -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 1bFYDw-00038H-1B; Wed, 22 Jun 2016 02:49:04 +0000 Received: from mail-pf0-x232.google.com ([2607:f8b0:400e:c00::232]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bFYDO-0002a6-EZ for linux-arm-kernel@lists.infradead.org; Wed, 22 Jun 2016 02:48:32 +0000 Received: by mail-pf0-x232.google.com with SMTP id h14so12619815pfe.1 for ; Tue, 21 Jun 2016 19:48:09 -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=yc6jW9zdtGoHydR+dN9JKASzMs8uYsbelGh+ZQt8o3U=; b=jFRjgBAeR0wF+KBAGR/cjUSaNuOM2AIZewUU5ezRkX6WFwfxCqpgvHt5leCuXSbU1K 0WH4yyRUZ9uaOoDVmPCqAUCtsvKiQASv8fscczp7LZdiR9pGwbBCvvwU99w3jr5AKbzi PIzLUlL+xGHOcK/4g6faz2lQG8xhg7bFBDJsc= 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=yc6jW9zdtGoHydR+dN9JKASzMs8uYsbelGh+ZQt8o3U=; b=FOmtEr4G5vhdqjm34z5MFiI9jG4cE/zdy9RUHtdK308X6v513sw4yY4RDkX2rdijzU O8d2RASDcG/0UdHV9F7FcZFBHgoV9dF383F+HRV14SmCovziOlSdghP+FgO2OZ2pVLeS trDJZ8JcfxNWJsUYqmEMrFXvq7LPGTvIlwHiZ+hDskDUS00pWjMz3KBFJqYDLzcQH9Bx 6CmyvMyz9lldPyK6/r9ygwEik+orQajJ10sfO+NS09xg1U4h6F10zPBfvvpkJkHcnF44 oi/P5+G6tIxVE1iXw9yinka2TUlLSUnTlHTRw5/s+zCJb2hqXNdKH3RqeY17pDL4zNcG oqoQ== X-Gm-Message-State: ALyK8tKpmunRIISIH2aCkGZG2k2MeZTvi6+VXHt+pJ1XUz8crQku1XhbcnUzx2P/cVwoXJjT X-Received: by 10.98.97.193 with SMTP id v184mr16671727pfb.138.1466563688645; Tue, 21 Jun 2016 19:48:08 -0700 (PDT) Received: from zcy-ubuntu.spreadtrum.com ([175.111.195.49]) by smtp.gmail.com with ESMTPSA id y70sm98867836pff.25.2016.06.21.19.48.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 21 Jun 2016 19:48:07 -0700 (PDT) From: Chunyan Zhang To: rostedt@goodmis.org, mathieu.poirier@linaro.org, alexander.shishkin@linux.intel.com, mingo@redhat.com Subject: [PATCH V2 4/4] stm: Mark the functions of writing buffer with notrace Date: Wed, 22 Jun 2016 10:46:53 +0800 Message-Id: <1466563613-31578-5-git-send-email-zhang.chunyan@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1466563613-31578-1-git-send-email-zhang.chunyan@linaro.org> References: <1466563613-31578-1-git-send-email-zhang.chunyan@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160621_194830_587034_12AC3207 X-CRM114-Status: GOOD ( 13.43 ) 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:400e:c00:0:0:0:232 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: zhang.lyra@gmail.com, linux-kernel@vger.kernel.org, tor@ti.com, philippe.langlais@st.com, mike.leach@arm.com, nicolas.guion@st.com, linux-arm-kernel@lists.infradead.org, maxime.coquelin@st.com MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org If CONFIG_STM_FTRACE is selected, Function trace data would be writen to STM buffer, all functions that related to writing data packets to STM buffer should be marked 'notrace' to avoid being traced by Ftrace, otherwise the program would stall into an endless loop. Signed-off-by: Chunyan Zhang Acked-by: Steven Rostedt --- drivers/hwtracing/coresight/coresight-stm.c | 2 +- drivers/hwtracing/intel_th/sth.c | 11 +++++++---- drivers/hwtracing/stm/core.c | 7 ++++--- drivers/hwtracing/stm/dummy_stm.c | 2 +- include/linux/stm.h | 4 ++-- 5 files changed, 15 insertions(+), 11 deletions(-) -- 1.9.1 _______________________________________________ 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-stm.c b/drivers/hwtracing/coresight/coresight-stm.c index 73be58a..345c81e 100644 --- a/drivers/hwtracing/coresight/coresight-stm.c +++ b/drivers/hwtracing/coresight/coresight-stm.c @@ -386,7 +386,7 @@ static long stm_generic_set_options(struct stm_data *stm_data, return 0; } -static ssize_t stm_generic_packet(struct stm_data *stm_data, +static ssize_t notrace stm_generic_packet(struct stm_data *stm_data, unsigned int master, unsigned int channel, unsigned int packet, diff --git a/drivers/hwtracing/intel_th/sth.c b/drivers/hwtracing/intel_th/sth.c index e1aee61..b034446 100644 --- a/drivers/hwtracing/intel_th/sth.c +++ b/drivers/hwtracing/intel_th/sth.c @@ -67,10 +67,13 @@ static void sth_iowrite(void __iomem *dest, const unsigned char *payload, } } -static ssize_t sth_stm_packet(struct stm_data *stm_data, unsigned int master, - unsigned int channel, unsigned int packet, - unsigned int flags, unsigned int size, - const unsigned char *payload) +static ssize_t notrace sth_stm_packet(struct stm_data *stm_data, + unsigned int master, + unsigned int channel, + unsigned int packet, + unsigned int flags, + unsigned int size, + const unsigned char *payload) { struct sth_device *sth = container_of(stm_data, struct sth_device, stm); struct intel_th_channel __iomem *out = diff --git a/drivers/hwtracing/stm/core.c b/drivers/hwtracing/stm/core.c index ff31108..3139b01 100644 --- a/drivers/hwtracing/stm/core.c +++ b/drivers/hwtracing/stm/core.c @@ -424,7 +424,7 @@ static int stm_file_assign(struct stm_file *stmf, char *id, unsigned int width) return ret; } -static ssize_t stm_write(struct stm_data *data, unsigned int master, +static ssize_t notrace stm_write(struct stm_data *data, unsigned int master, unsigned int channel, const char *buf, size_t count) { unsigned int flags = STP_PACKET_TIMESTAMPED; @@ -1069,8 +1069,9 @@ void stm_source_unregister_device(struct stm_source_data *data) } EXPORT_SYMBOL_GPL(stm_source_unregister_device); -int stm_source_write(struct stm_source_data *data, unsigned int chan, - const char *buf, size_t count) +int notrace stm_source_write(struct stm_source_data *data, + unsigned int chan, + const char *buf, size_t count) { struct stm_source_device *src = data->src; struct stm_device *stm; diff --git a/drivers/hwtracing/stm/dummy_stm.c b/drivers/hwtracing/stm/dummy_stm.c index a86612d..c5f94ca 100644 --- a/drivers/hwtracing/stm/dummy_stm.c +++ b/drivers/hwtracing/stm/dummy_stm.c @@ -21,7 +21,7 @@ #include #include -static ssize_t +static ssize_t notrace dummy_stm_packet(struct stm_data *stm_data, unsigned int master, unsigned int channel, unsigned int packet, unsigned int flags, unsigned int size, const unsigned char *payload) diff --git a/include/linux/stm.h b/include/linux/stm.h index 2b6639a..80c60da 100644 --- a/include/linux/stm.h +++ b/include/linux/stm.h @@ -140,7 +140,7 @@ int stm_source_register_device(struct device *parent, struct stm_source_data *data); void stm_source_unregister_device(struct stm_source_data *data); -int stm_source_write(struct stm_source_data *data, unsigned int chan, - const char *buf, size_t count); +int notrace stm_source_write(struct stm_source_data *data, unsigned int chan, + const char *buf, size_t count); #endif /* _STM_H_ */