From patchwork Fri Nov 18 03:07:34 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chunyan Zhang X-Patchwork-Id: 82826 Delivered-To: patch@linaro.org Received: by 10.140.97.165 with SMTP id m34csp1124919qge; Thu, 17 Nov 2016 19:10:57 -0800 (PST) X-Received: by 10.99.102.69 with SMTP id a66mr13919269pgc.49.1479438657522; Thu, 17 Nov 2016 19:10:57 -0800 (PST) Return-Path: Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id a188si5867551pfb.180.2016.11.17.19.10.57 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 17 Nov 2016 19:10:57 -0800 (PST) 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 1c7ZYm-0004kP-IA; Fri, 18 Nov 2016 03:09:52 +0000 Received: from mail-pg0-x233.google.com ([2607:f8b0:400e:c05::233]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1c7ZYP-0004XJ-Ns for linux-arm-kernel@lists.infradead.org; Fri, 18 Nov 2016 03:09:32 +0000 Received: by mail-pg0-x233.google.com with SMTP id 3so98080643pgd.0 for ; Thu, 17 Nov 2016 19:09:09 -0800 (PST) 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=la1fijJKb5cqEqUDBC12qTpZACu5rE0mNcG0PK1XYN8=; b=kIJWqT7CHsTWYEHQnrTLC6P03+wLDKKta660B+Lc2iN+h2wJsEWk3QT4W7RRn4BilF Z9lYJQuTJijZzsmRG93zYMjqaIGa/ePN+4rLpFGFl4rfk4952JmJjoNuQ5PbHKZOc0Ri TKLJ3GHwZQnkf3CCYikKDX35zH/+LtAATP5fc= 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=la1fijJKb5cqEqUDBC12qTpZACu5rE0mNcG0PK1XYN8=; b=iotCD4AK9fR6zYm9x5258w8zg3OcvDiPJMcqF786YuLqlDrofkINK3I4bwYppUv7Um 8u6NWy13Y1+klhsSNxlsl9y1OcU1HwZUQc3h6mKnR6XtrFxz38sIAvOar63lHA1K9tLo Y5M1StGUcW+WjUL5df47wLMNcBi7Fqy5PB/QmN86jRFstIkBrBK7fnJj6L07zahz7dCD OlluNpig+BFeVWm9jCAGCnO40wboQXaBBi8s+FalVlKfCDjgBzFn0n0Acf7ufmTK2g/e Q77tatC5hvkL4KWzFG02oNLDNhw6QmFIsrwpVNwhgzRHko0AjCA7+Snd3BugrifLGidG /xxg== X-Gm-Message-State: ABUngvcN97werjGmiweinxKQ+H8Ko/8n12oaUAYErKM87VScVJ5ZPD+qlFIcVQqBv2KoRUxK X-Received: by 10.98.71.93 with SMTP id u90mr8762332pfa.177.1479438548578; Thu, 17 Nov 2016 19:09:08 -0800 (PST) Received: from localhost.localdomain ([175.111.195.49]) by smtp.gmail.com with ESMTPSA id a24sm11750155pfh.57.2016.11.17.19.09.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 17 Nov 2016 19:09:07 -0800 (PST) From: Chunyan Zhang To: rostedt@goodmis.org, mathieu.poirier@linaro.org, alexander.shishkin@linux.intel.com, mingo@redhat.com Subject: [PATCH V8 3/3] stm: Mark the functions of writing buffer with notrace Date: Fri, 18 Nov 2016 11:07:34 +0800 Message-Id: <1479438454-28650-4-git-send-email-zhang.chunyan@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1479438454-28650-1-git-send-email-zhang.chunyan@linaro.org> References: <1479438454-28650-1-git-send-email-zhang.chunyan@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20161117_190930_121550_A5A3E027 X-CRM114-Status: GOOD ( 13.37 ) X-Spam-Score: -2.0 (--) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-2.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [2607:f8b0:400e:c05:0:0:0:233 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: felipe.balbi@linux.intel.com, 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 MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org If CONFIG_STM_SOURCE_FTRACE is selected, Function trace data can be writen to sink via STM, all functions that related to writing data packets to STM 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(-) -- 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-stm.c b/drivers/hwtracing/coresight/coresight-stm.c index 49e0f1b..b7543bd 100644 --- a/drivers/hwtracing/coresight/coresight-stm.c +++ b/drivers/hwtracing/coresight/coresight-stm.c @@ -406,7 +406,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 51f81d6..37d3bcb 100644 --- a/drivers/hwtracing/stm/core.c +++ b/drivers/hwtracing/stm/core.c @@ -425,7 +425,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; @@ -1121,8 +1121,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 8369d8a..210ff22 100644 --- a/include/linux/stm.h +++ b/include/linux/stm.h @@ -133,7 +133,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_ */