summaryrefslogtreecommitdiffstats
path: root/debian/patches-rt/rtmutex_dont_include_rcu.patch
diff options
context:
space:
mode:
Diffstat (limited to 'debian/patches-rt/rtmutex_dont_include_rcu.patch')
-rw-r--r--debian/patches-rt/rtmutex_dont_include_rcu.patch40
1 files changed, 32 insertions, 8 deletions
diff --git a/debian/patches-rt/rtmutex_dont_include_rcu.patch b/debian/patches-rt/rtmutex_dont_include_rcu.patch
index df8d9a937..ba20eb892 100644
--- a/debian/patches-rt/rtmutex_dont_include_rcu.patch
+++ b/debian/patches-rt/rtmutex_dont_include_rcu.patch
@@ -1,6 +1,6 @@
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Subject: rbtree: don't include the rcu header
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.0/older/patches-5.0.10-rt7.tar.xz
+Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2-rt1.tar.xz
The RCU header pulls in spinlock.h and fails due not yet defined types:
@@ -20,13 +20,13 @@ a new header file which can be included by both users.
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
---
include/linux/rbtree.h | 2 -
- include/linux/rcu_assign_pointer.h | 54 +++++++++++++++++++++++++++++++++++++
- include/linux/rcupdate.h | 49 ---------------------------------
- 3 files changed, 56 insertions(+), 49 deletions(-)
+ include/linux/rcu_assign_pointer.h | 63 +++++++++++++++++++++++++++++++++++++
+ include/linux/rcupdate.h | 57 ---------------------------------
+ 3 files changed, 65 insertions(+), 57 deletions(-)
--- a/include/linux/rbtree.h
+++ b/include/linux/rbtree.h
-@@ -31,7 +31,7 @@
+@@ -19,7 +19,7 @@
#include <linux/kernel.h>
#include <linux/stddef.h>
@@ -37,12 +37,20 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
unsigned long __rb_parent_color;
--- /dev/null
+++ b/include/linux/rcu_assign_pointer.h
-@@ -0,0 +1,54 @@
+@@ -0,0 +1,63 @@
++/* SPDX-License-Identifier: GPL-2.0+ */
+#ifndef __LINUX_RCU_ASSIGN_POINTER_H__
+#define __LINUX_RCU_ASSIGN_POINTER_H__
+#include <linux/compiler.h>
+#include <asm/barrier.h>
+
++#ifdef __CHECKER__
++#define rcu_check_sparse(p, space) \
++ ((void)(((typeof(*p) space *)p) == p))
++#else /* #ifdef __CHECKER__ */
++#define rcu_check_sparse(p, space)
++#endif /* #else #ifdef __CHECKER__ */
++
+/**
+ * RCU_INITIALIZER() - statically initialize an RCU-protected global variable
+ * @v: The value to statically initialize with.
@@ -83,6 +91,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
+#define rcu_assign_pointer(p, v) \
+({ \
+ uintptr_t _r_a_p__v = (uintptr_t)(v); \
++ rcu_check_sparse(p, __rcu); \
+ \
+ if (__builtin_constant_p(v) && (_r_a_p__v) == (uintptr_t)NULL) \
+ WRITE_ONCE((p), (typeof(p))(_r_a_p__v)); \
@@ -94,7 +103,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
+#endif
--- a/include/linux/rcupdate.h
+++ b/include/linux/rcupdate.h
-@@ -42,6 +42,7 @@
+@@ -29,6 +29,7 @@
#include <linux/lockdep.h>
#include <asm/processor.h>
#include <linux/cpumask.h>
@@ -102,7 +111,21 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
#define ULONG_CMP_GE(a, b) (ULONG_MAX / 2 >= (a) - (b))
#define ULONG_CMP_LT(a, b) (ULONG_MAX / 2 < (a) - (b))
-@@ -350,54 +351,6 @@ static inline void rcu_preempt_sleep_che
+@@ -301,13 +302,6 @@ static inline void rcu_preempt_sleep_che
+ * (e.g., __srcu), should this make sense in the future.
+ */
+
+-#ifdef __CHECKER__
+-#define rcu_check_sparse(p, space) \
+- ((void)(((typeof(*p) space *)p) == p))
+-#else /* #ifdef __CHECKER__ */
+-#define rcu_check_sparse(p, space)
+-#endif /* #else #ifdef __CHECKER__ */
+-
+ #define __rcu_access_pointer(p, space) \
+ ({ \
+ typeof(*p) *_________p1 = (typeof(*p) *__force)READ_ONCE(p); \
+@@ -336,55 +330,6 @@ static inline void rcu_preempt_sleep_che
})
/**
@@ -145,6 +168,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
-#define rcu_assign_pointer(p, v) \
-({ \
- uintptr_t _r_a_p__v = (uintptr_t)(v); \
+- rcu_check_sparse(p, __rcu); \
- \
- if (__builtin_constant_p(v) && (_r_a_p__v) == (uintptr_t)NULL) \
- WRITE_ONCE((p), (typeof(p))(_r_a_p__v)); \