io_uring: ensure finish_wait() is always called in __io_uring_task_cancel()
[linux/fpc-iii.git] / arch / s390 / kernel / trace.c
blob11a669f3cc93c17d5f69f281296e04c2a39cc2bb
1 // SPDX-License-Identifier: GPL-2.0
2 /*
3 * Tracepoint definitions for s390
5 * Copyright IBM Corp. 2015
6 * Author(s): Martin Schwidefsky <schwidefsky@de.ibm.com>
7 */
9 #include <linux/percpu.h>
10 #define CREATE_TRACE_POINTS
11 #include <asm/trace/diag.h>
13 EXPORT_TRACEPOINT_SYMBOL(s390_diagnose);
15 static DEFINE_PER_CPU(unsigned int, diagnose_trace_depth);
17 void notrace trace_s390_diagnose_norecursion(int diag_nr)
19 unsigned long flags;
20 unsigned int *depth;
22 /* Avoid lockdep recursion. */
23 if (IS_ENABLED(CONFIG_LOCKDEP))
24 return;
25 local_irq_save(flags);
26 depth = this_cpu_ptr(&diagnose_trace_depth);
27 if (*depth == 0) {
28 (*depth)++;
29 trace_s390_diagnose(diag_nr);
30 (*depth)--;
32 local_irq_restore(flags);