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: 83192 Delivered-To: patch@linaro.org Received: by 10.140.97.165 with SMTP id m34csp1369053qge; Mon, 21 Nov 2016 00:10:18 -0800 (PST) X-Received: by 10.129.87.132 with SMTP id l126mr11743780ywb.259.1479715818107; Mon, 21 Nov 2016 00:10:18 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z29si4414032ybi.215.2016.11.21.00.10.17; Mon, 21 Nov 2016 00:10:18 -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; dkim=pass header.i=@linaro.org; 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; dmarc=pass (p=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753415AbcKUIKC (ORCPT + 26 others); Mon, 21 Nov 2016 03:10:02 -0500 Received: from mail-pg0-f52.google.com ([74.125.83.52]:32828 "EHLO mail-pg0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753191AbcKUIJ7 (ORCPT ); Mon, 21 Nov 2016 03:09:59 -0500 Received: by mail-pg0-f52.google.com with SMTP id 3so128222505pgd.0 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=QrMuiuwRPIBugR3lMa+SOkuthjqwby1SCl54F4DeKjolGtn4LJt4eoFNInVE4EaaxG Dz3VQu3oA5KgS2zRCnmrLaPVmRWXZgXxHAgvxqfZRTv1KvvRwEBKbEDFwr1f/9FhxFu2 9UQ8vkGiF07qzIAsvBTZ2C5sq6JnXIjPckKi2IplXLK2m6DD9KyC0u6qiHrmcoUqwMxr iOjAbHCDQRlTjk5/657rmIN71wGcCX+5+sxWpRCFJvxZ8+E35qi/JEYaK3BTYT5wYe9s 8oFcGoEetR+dXC1RmwjcrP981KeYFoaqUes/imECT5rJ1Dzq1efoGGOYxsTGWnml1cP8 DVoA== X-Gm-Message-State: AKaTC03nNMWUoNL3GdmKCj/+5JR5kKfR96U9sV+tUuVEZXLnISeTlheJNxcRFSQy5MzyEHJK 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 Cc: mike.leach@arm.com, tor@ti.com, philippe.langlais@st.com, nicolas.guion@st.com, felipe.balbi@linux.intel.com, zhang.lyra@gmail.com, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org 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> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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: Alexander Shishkin --- drivers/hwtracing/intel_th/sth.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) -- 2.7.4 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 =