From patchwork Mon Nov 21 07:57:23 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chunyan Zhang X-Patchwork-Id: 9438999 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 868B8600BA for ; Mon, 21 Nov 2016 08:12:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7554F288A2 for ; Mon, 21 Nov 2016 08:12:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 68542288EA; Mon, 21 Nov 2016 08:12:59 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED, T_DKIM_INVALID autolearn=unavailable version=3.3.1 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.wl.linuxfoundation.org (Postfix) with ESMTPS id 2BA2F288A2 for ; Mon, 21 Nov 2016 08:12:59 +0000 (UTC) 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 1c8jhQ-0005tT-Bj; Mon, 21 Nov 2016 08:11:36 +0000 Received: from mail-pg0-x22e.google.com ([2607:f8b0:400e:c05::22e]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1c8jgO-0004MY-FY for linux-arm-kernel@lists.infradead.org; Mon, 21 Nov 2016 08:10:34 +0000 Received: by mail-pg0-x22e.google.com with SMTP id 3so128224331pgd.0 for ; Mon, 21 Nov 2016 00:10:12 -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=TuP8FkTSQW9WzNHZ0PW3kk3+FJ+VQP/33AOLzfwrUEw=; b=GqD+WuP/tl1Wmezx/E74j/FPp0AmqYCmXe7BZSuJrQAyty3eWY5Yppu3rQYZ6lD0dQ LG5cJbkOMRtqBhDBdKSWZH9u1VTp3dqKqB+EUzOHCERkxd1Hg9EZN1queAXKTs+EypqE g5BB9K8b0sqs0Wxk5HOfJ7b2iF8FSNLWcdP3o= 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=TuP8FkTSQW9WzNHZ0PW3kk3+FJ+VQP/33AOLzfwrUEw=; b=J8uesfDMZpGPQcZUjP/0ZJtQ7siTtPh/vZMHB+WfdJbEv1lC0gaon8InWU2CiL4PgK jets2gAN02N9I2rnKYOoXi/OprbS9tBpVlVqk6L4cqfb7Xds8uBMzvPtTA1d9JHr/bFm hzYgF7Pp9li4zwUJQxF02OYbvg9EtANVjhVOi1sQ/M0ex/FSvWWu5zpF2I+zabk4ad2f kPA38wwm0D9QES4tCtam5GHGy7iIt+OKDxLb90VRRJpfuxPhDEo8OXvq7acDArgbUClK RM2ciZe9SivwxbUbyDRsbMxwVT6ktxjdNQxQtcTRsC9n2zRCWdxww3zrZERk+wYMNzDn h7lw== X-Gm-Message-State: AKaTC00CwHdZYLOmXQBxWAur2GXf1aEmDX/yC+3vUfzOylfOgf5dChvBlzGBJtCYPUDpCQiW X-Received: by 10.99.127.16 with SMTP id a16mr29410637pgd.27.1479715811309; Mon, 21 Nov 2016 00:10:11 -0800 (PST) Received: from localhost.localdomain ([175.111.195.49]) by smtp.gmail.com with ESMTPSA id s2sm35183093pfi.10.2016.11.21.00.10.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 21 Nov 2016 00:10:10 -0800 (PST) From: Chunyan Zhang To: rostedt@goodmis.org, mathieu.poirier@linaro.org, alexander.shishkin@linux.intel.com, mingo@redhat.com Subject: [PATCH V9 6/6] stm: Mark the functions of writing STM with notrace Date: Mon, 21 Nov 2016 15:57:23 +0800 Message-Id: <1479715043-6534-7-git-send-email-zhang.chunyan@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1479715043-6534-1-git-send-email-zhang.chunyan@linaro.org> References: <1479715043-6534-1-git-send-email-zhang.chunyan@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20161121_001032_731053_523E2B34 X-CRM114-Status: GOOD ( 11.43 ) 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+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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: Alexander Shishkin --- drivers/hwtracing/stm/core.c | 7 ++++--- include/linux/stm.h | 4 ++-- 2 files changed, 6 insertions(+), 5 deletions(-) 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/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_ */