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) #ifndef _TEST_RADIX_TREE_H
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  3) #define _TEST_RADIX_TREE_H
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  4) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  5) #include "../../../../include/linux/radix-tree.h"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  6) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  7) extern int kmalloc_verbose;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  8) extern int test_verbose;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  9) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) static inline void trace_call_rcu(struct rcu_head *head,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) 		void (*func)(struct rcu_head *head))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) 	if (kmalloc_verbose)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) 		printf("Delaying free of %p to slab\n", (char *)head -
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) 				offsetof(struct radix_tree_node, rcu_head));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) 	call_rcu(head, func);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) #define printv(verbosity_level, fmt, ...) \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) 	if(test_verbose >= verbosity_level) \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) 		printf(fmt, ##__VA_ARGS__)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) #undef call_rcu
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) #define call_rcu(x, y) trace_call_rcu(x, y)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) #endif /* _TEST_RADIX_TREE_H */