aboutsummarylogtreecommitdiffstats
path: root/mpss-modules-rcu-lockup.patch
blob: 61a9975fd8d96363163320b599b1b06a8281bf3e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
From ab23490f38613aa80cfa811b384f29094b5f3672 Mon Sep 17 00:00:00 2001
From: Marcel Huber <marcelhuberfoo@gmail.com>
Date: Thu, 4 Aug 2016 13:33:05 +0200
Subject: remove rcu_lockup
 https://github.com/bradyjoh/mpss-modules/commit/70560c893e8acc8d834f04dd2eee0d9e1780c840

---
 host/vhost/vhost.h | 14 +-------------
 1 file changed, 1 insertion(+), 13 deletions(-)

diff --git host/vhost/vhost.h host/vhost/vhost.h
index ad61802..0d9abf9 100644
--- mpss-modules/host/vhost/vhost.h
+++ mpss-modules/host/vhost/vhost.h
@@ -205,18 +205,6 @@ int vhost_zerocopy_signal_used(struct vhost_virtqueue *vq);
 				eventfd_signal((vq)->error_ctx, 1);\
 	} while (0)

-#ifndef __rcu_dereference_index_check
-#define __rcu_dereference_index_check(p, c) \
-	({ \
-	 typeof(p) _________p1 = ACCESS_ONCE(p); \
-	 rcu_lockdep_assert(c, \
-		 "suspicious rcu_dereference_index_check()" \
-		 " usage"); \
-	 smp_read_barrier_depends(); \
-	 (_________p1); \
-	 })
-#endif
-
 enum {
 	VHOST_FEATURES = (1ULL << VIRTIO_F_NOTIFY_ON_EMPTY) |
 			 (1ULL << VIRTIO_RING_F_INDIRECT_DESC) |
@@ -238,7 +226,7 @@ static inline int vhost_has_feature(struct vhost_dev *dev, int bit)
 #if (LINUX_VERSION_CODE < KERNEL_VERSION(4,2,0))
 	unsigned acked_features = rcu_dereference_index_check(dev->acked_features, rcu_read_lock_held());
 #else
-	unsigned acked_features = __rcu_dereference_index_check(dev->acked_features, rcu_read_lock_held());
+	unsigned acked_features = smp_load_acquire(&(dev->acked_features));
 #endif
 #endif
 	return acked_features & (1 << bit);
--
2.9.2