Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

stm: Mark the functions of writing STM with notrace

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 <zhang.chunyan@linaro.org>
Acked-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>

authored by

Chunyan Zhang and committed by
Steven Rostedt
9dfed80d 9b5e3ff6

+6 -5
+4 -3
drivers/hwtracing/stm/core.c
··· 425 425 return ret; 426 426 } 427 427 428 - static ssize_t stm_write(struct stm_data *data, unsigned int master, 428 + static ssize_t notrace stm_write(struct stm_data *data, unsigned int master, 429 429 unsigned int channel, const char *buf, size_t count) 430 430 { 431 431 unsigned int flags = STP_PACKET_TIMESTAMPED; ··· 1121 1121 } 1122 1122 EXPORT_SYMBOL_GPL(stm_source_unregister_device); 1123 1123 1124 - int stm_source_write(struct stm_source_data *data, unsigned int chan, 1125 - const char *buf, size_t count) 1124 + int notrace stm_source_write(struct stm_source_data *data, 1125 + unsigned int chan, 1126 + const char *buf, size_t count) 1126 1127 { 1127 1128 struct stm_source_device *src = data->src; 1128 1129 struct stm_device *stm;
+2 -2
include/linux/stm.h
··· 133 133 struct stm_source_data *data); 134 134 void stm_source_unregister_device(struct stm_source_data *data); 135 135 136 - int stm_source_write(struct stm_source_data *data, unsigned int chan, 137 - const char *buf, size_t count); 136 + int notrace stm_source_write(struct stm_source_data *data, unsigned int chan, 137 + const char *buf, size_t count); 138 138 139 139 #endif /* _STM_H_ */