From patchwork Wed Nov 23 15:35:28 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steven Rostedt X-Patchwork-Id: 83699 Delivered-To: patch@linaro.org Received: by 10.140.97.165 with SMTP id m34csp2699632qge; Wed, 23 Nov 2016 07:36:43 -0800 (PST) X-Received: by 10.99.55.30 with SMTP id e30mr6155076pga.75.1479915403320; Wed, 23 Nov 2016 07:36:43 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y186si34341274pfy.31.2016.11.23.07.36.41; Wed, 23 Nov 2016 07:36:43 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965495AbcKWPg3 (ORCPT + 25 others); Wed, 23 Nov 2016 10:36:29 -0500 Received: from mail.kernel.org ([198.145.29.136]:60304 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965375AbcKWPff (ORCPT ); Wed, 23 Nov 2016 10:35:35 -0500 Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 5F140203E6; Wed, 23 Nov 2016 15:35:32 +0000 (UTC) Received: from gandalf.local.home (cpe-67-246-153-56.stny.res.rr.com [67.246.153.56]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id D6DE620411; Wed, 23 Nov 2016 15:35:30 +0000 (UTC) Received: from rostedt by gandalf.local.home with local (Exim 4.87) (envelope-from ) id 1c9Za5-0001IJ-Vi; Wed, 23 Nov 2016 10:35:30 -0500 Message-Id: <20161123153529.906085678@goodmis.org> User-Agent: quilt/0.63-1 Date: Wed, 23 Nov 2016 10:35:28 -0500 From: Steven Rostedt To: linux-kernel@vger.kernel.org Cc: Ingo Molnar , Andrew Morton , Chunyan Zhang , Alexander Shishkin Subject: [for-next][PATCH 16/17] stm: Mark the functions of writing STM with notrace References: <20161123153512.923515549@goodmis.org> MIME-Version: 1.0 Content-Disposition: inline; filename=0016-stm-Mark-the-functions-of-writing-STM-with-notrace.patch X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, 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 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Chunyan Zhang 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. Link: http://lkml.kernel.org/r/1479715043-6534-7-git-send-email-zhang.chunyan@linaro.org Signed-off-by: Chunyan Zhang Acked-by: Alexander Shishkin Signed-off-by: Steven Rostedt --- drivers/hwtracing/stm/core.c | 7 ++++--- include/linux/stm.h | 4 ++-- 2 files changed, 6 insertions(+), 5 deletions(-) -- 2.10.2 diff --git a/drivers/hwtracing/stm/core.c b/drivers/hwtracing/stm/core.c index 51f81d64ca37..37d3bcbd2534 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 8369d8a8cabd..210ff2292361 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_ */