Orange Pi5 kernel

Deprecated Linux kernel 5.10.110 for OrangePi 5/5B/5+ boards

3 Commits   0 Branches   0 Tags
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  1) // SPDX-License-Identifier: GPL-2.0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  2) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  3)  * Tracepoint definitions for s390
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  4)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  5)  * Copyright IBM Corp. 2015
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  6)  * Author(s): Martin Schwidefsky <schwidefsky@de.ibm.com>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  7)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  8) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  9) #include <linux/percpu.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) #define CREATE_TRACE_POINTS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) #include <asm/trace/diag.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) EXPORT_TRACEPOINT_SYMBOL(s390_diagnose);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) static DEFINE_PER_CPU(unsigned int, diagnose_trace_depth);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) void notrace trace_s390_diagnose_norecursion(int diag_nr)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) 	unsigned long flags;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) 	unsigned int *depth;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) 	/* Avoid lockdep recursion. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) 	if (IS_ENABLED(CONFIG_LOCKDEP))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) 		return;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) 	local_irq_save(flags);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) 	depth = this_cpu_ptr(&diagnose_trace_depth);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27) 	if (*depth == 0) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) 		(*depth)++;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29) 		trace_s390_diagnose(diag_nr);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30) 		(*depth)--;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31) 	}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32) 	local_irq_restore(flags);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33) }