aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/misc/sgi-xp/xpc_sn2.c9
-rw-r--r--drivers/misc/sgi-xp/xpc_uv.c2
2 files changed, 6 insertions, 5 deletions
diff --git a/drivers/misc/sgi-xp/xpc_sn2.c b/drivers/misc/sgi-xp/xpc_sn2.c
index 82fb9958f22f..7aafb8a91945 100644
--- a/drivers/misc/sgi-xp/xpc_sn2.c
+++ b/drivers/misc/sgi-xp/xpc_sn2.c
@@ -1836,6 +1836,7 @@ xpc_process_msg_chctl_flags_sn2(struct xpc_partition *part, int ch_number)
1836 */ 1836 */
1837 xpc_clear_remote_msgqueue_flags_sn2(ch); 1837 xpc_clear_remote_msgqueue_flags_sn2(ch);
1838 1838
1839 smp_wmb(); /* ensure flags have been cleared before bte_copy */
1839 ch_sn2->w_remote_GP.put = ch_sn2->remote_GP.put; 1840 ch_sn2->w_remote_GP.put = ch_sn2->remote_GP.put;
1840 1841
1841 dev_dbg(xpc_chan, "w_remote_GP.put changed to %ld, partid=%d, " 1842 dev_dbg(xpc_chan, "w_remote_GP.put changed to %ld, partid=%d, "
@@ -1934,7 +1935,7 @@ xpc_get_deliverable_payload_sn2(struct xpc_channel *ch)
1934 break; 1935 break;
1935 1936
1936 get = ch_sn2->w_local_GP.get; 1937 get = ch_sn2->w_local_GP.get;
1937 rmb(); /* guarantee that .get loads before .put */ 1938 smp_rmb(); /* guarantee that .get loads before .put */
1938 if (get == ch_sn2->w_remote_GP.put) 1939 if (get == ch_sn2->w_remote_GP.put)
1939 break; 1940 break;
1940 1941
@@ -2053,7 +2054,7 @@ xpc_allocate_msg_sn2(struct xpc_channel *ch, u32 flags,
2053 while (1) { 2054 while (1) {
2054 2055
2055 put = ch_sn2->w_local_GP.put; 2056 put = ch_sn2->w_local_GP.put;
2056 rmb(); /* guarantee that .put loads before .get */ 2057 smp_rmb(); /* guarantee that .put loads before .get */
2057 if (put - ch_sn2->w_remote_GP.get < ch->local_nentries) { 2058 if (put - ch_sn2->w_remote_GP.get < ch->local_nentries) {
2058 2059
2059 /* There are available message entries. We need to try 2060 /* There are available message entries. We need to try
@@ -2186,7 +2187,7 @@ xpc_send_payload_sn2(struct xpc_channel *ch, u32 flags, void *payload,
2186 * The preceding store of msg->flags must occur before the following 2187 * The preceding store of msg->flags must occur before the following
2187 * load of local_GP->put. 2188 * load of local_GP->put.
2188 */ 2189 */
2189 mb(); 2190 smp_mb();
2190 2191
2191 /* see if the message is next in line to be sent, if so send it */ 2192 /* see if the message is next in line to be sent, if so send it */
2192 2193
@@ -2287,7 +2288,7 @@ xpc_received_payload_sn2(struct xpc_channel *ch, void *payload)
2287 * The preceding store of msg->flags must occur before the following 2288 * The preceding store of msg->flags must occur before the following
2288 * load of local_GP->get. 2289 * load of local_GP->get.
2289 */ 2290 */
2290 mb(); 2291 smp_mb();
2291 2292
2292 /* 2293 /*
2293 * See if this message is next in line to be acknowledged as having 2294 * See if this message is next in line to be acknowledged as having
diff --git a/drivers/misc/sgi-xp/xpc_uv.c b/drivers/misc/sgi-xp/xpc_uv.c
index 91a55b1b1037..f17f7d40ea2c 100644
--- a/drivers/misc/sgi-xp/xpc_uv.c
+++ b/drivers/misc/sgi-xp/xpc_uv.c
@@ -1423,7 +1423,7 @@ xpc_send_payload_uv(struct xpc_channel *ch, u32 flags, void *payload,
1423 atomic_inc(&ch->n_to_notify); 1423 atomic_inc(&ch->n_to_notify);
1424 1424
1425 msg_slot->key = key; 1425 msg_slot->key = key;
1426 wmb(); /* a non-NULL func must hit memory after the key */ 1426 smp_wmb(); /* a non-NULL func must hit memory after the key */
1427 msg_slot->func = func; 1427 msg_slot->func = func;
1428 1428
1429 if (ch->flags & XPC_C_DISCONNECTING) { 1429 if (ch->flags & XPC_C_DISCONNECTING) {