From patchwork Mon Nov 21 07:57:21 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chunyan Zhang X-Patchwork-Id: 9438995 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 500DF600BA for ; Mon, 21 Nov 2016 08:12:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3E01A288A2 for ; Mon, 21 Nov 2016 08:12:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3035F288EA; Mon, 21 Nov 2016 08:12:10 +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=ham 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 B3964288B2 for ; Mon, 21 Nov 2016 08:12:09 +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 1c8jga-0005PL-QC; Mon, 21 Nov 2016 08:10:44 +0000 Received: from mail-pg0-x230.google.com ([2607:f8b0:400e:c05::230]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1c8jgC-0003uJ-2W for linux-arm-kernel@lists.infradead.org; Mon, 21 Nov 2016 08:10:21 +0000 Received: by mail-pg0-x230.google.com with SMTP id x23so125378016pgx.1 for ; Mon, 21 Nov 2016 00:09:59 -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=RSsfOgBJ7JuIg0qfIGGzYv5RXdiUnq3ES2Zxbwf2a1o=; b=kMpqsVRGVjnP9ySPX/JiFMF/thP5XTuF6DpRnCqR21Ovrg0gsFkBRH4b/O2eCE+gdF mfh6lUFVKgE9nZykCsWUsV8Dqibn6BG4g7v1xUbQxAW/e9VHrCPPJTANzzLrKAUsTJDg C+4IMkfHY6m7HU2vWbz45yCAbCch7jLBSM5LM= 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=RSsfOgBJ7JuIg0qfIGGzYv5RXdiUnq3ES2Zxbwf2a1o=; b=TpV2v6iYwOAbQAnRmxSPaTDqcG4+JCYWb+s/aEpvGm8wQIsAl+Zr3bEfWxFjCdL+Ji no24L1lNO2AgvXlZzqOxv5IIHvoVlcBt2loQ9dW07lfieSbHbJLv8Zk27McPlnd3Jzee d7uMImuW3rAXHe0w2ml0KXb8xq0COOlRw1btAdKEC5eWzMyHMcsNW1nmXySE0xGbk4bK dR5km9m4hxr7wKlrrXTLqKxzyBGyfAcbwr6ZJS2fwI0uwgdMQZG2h3inCaDIbpbghTcn UY5kdTmiENeHUgMwGAKsvidcYkyGyFV1KoCt+hM8XzXjB9ssN9Xul+7ktoFbiT7QwBJr l0lg== X-Gm-Message-State: AKaTC02si/pkKLgPFB0SMMPuabwuUtY3N74UyoYQU52u6QMdc7UkPemRUVgdP2oKDLmtdOEi X-Received: by 10.99.185.88 with SMTP id v24mr28991435pgo.179.1479715798901; Mon, 21 Nov 2016 00:09:58 -0800 (PST) Received: from localhost.localdomain ([175.111.195.49]) by smtp.gmail.com with ESMTPSA id s2sm35183093pfi.10.2016.11.21.00.09.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 21 Nov 2016 00:09:58 -0800 (PST) From: Chunyan Zhang To: rostedt@goodmis.org, mathieu.poirier@linaro.org, alexander.shishkin@linux.intel.com, mingo@redhat.com Subject: [PATCH V9 4/6] intel_th: Mark sth_stm_packet() with notrace Date: Mon, 21 Nov 2016 15:57:21 +0800 Message-Id: <1479715043-6534-5-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_001020_369784_D71D0632 X-CRM114-Status: GOOD ( 10.08 ) 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/intel_th/sth.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) 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 =