aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2007-04-23 15:08:21 -0400
committerArnd Bergmann <arnd@klappe.arndb.de>2007-04-23 15:18:57 -0400
commit8a7d86bdb22678b17928eef0c8fa356d8b21cc76 (patch)
treec74a68213bf70338ec6b2844abbd62c36c32f8c2 /arch/powerpc/platforms
parentdb1384b40d12eda6910513ff429ad90453ca49e1 (diff)
[POWERPC] spufs: avoid spurious memory barriers
We now have proper locking around assignets of the mapping pointers, and the spin_unlock implies enough of a barrier to get rid of the explicit one. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
Diffstat (limited to 'arch/powerpc/platforms')
-rw-r--r--arch/powerpc/platforms/cell/spufs/file.c14
1 files changed, 0 insertions, 14 deletions
diff --git a/arch/powerpc/platforms/cell/spufs/file.c b/arch/powerpc/platforms/cell/spufs/file.c
index 525d6b00cba2..d010b2464a98 100644
--- a/arch/powerpc/platforms/cell/spufs/file.c
+++ b/arch/powerpc/platforms/cell/spufs/file.c
@@ -50,7 +50,6 @@ spufs_mem_open(struct inode *inode, struct file *file)
50 if (!i->i_openers++) 50 if (!i->i_openers++)
51 ctx->local_store = inode->i_mapping; 51 ctx->local_store = inode->i_mapping;
52 spin_unlock(&ctx->mapping_lock); 52 spin_unlock(&ctx->mapping_lock);
53 smp_wmb();
54 return 0; 53 return 0;
55} 54}
56 55
@@ -64,7 +63,6 @@ spufs_mem_release(struct inode *inode, struct file *file)
64 if (!--i->i_openers) 63 if (!--i->i_openers)
65 ctx->local_store = NULL; 64 ctx->local_store = NULL;
66 spin_unlock(&ctx->mapping_lock); 65 spin_unlock(&ctx->mapping_lock);
67 smp_wmb();
68 return 0; 66 return 0;
69} 67}
70 68
@@ -262,7 +260,6 @@ static int spufs_cntl_open(struct inode *inode, struct file *file)
262 if (!i->i_openers++) 260 if (!i->i_openers++)
263 ctx->cntl = inode->i_mapping; 261 ctx->cntl = inode->i_mapping;
264 spin_unlock(&ctx->mapping_lock); 262 spin_unlock(&ctx->mapping_lock);
265 smp_wmb();
266 return simple_attr_open(inode, file, spufs_cntl_get, 263 return simple_attr_open(inode, file, spufs_cntl_get,
267 spufs_cntl_set, "0x%08lx"); 264 spufs_cntl_set, "0x%08lx");
268} 265}
@@ -279,7 +276,6 @@ spufs_cntl_release(struct inode *inode, struct file *file)
279 if (!--i->i_openers) 276 if (!--i->i_openers)
280 ctx->cntl = NULL; 277 ctx->cntl = NULL;
281 spin_unlock(&ctx->mapping_lock); 278 spin_unlock(&ctx->mapping_lock);
282 smp_wmb();
283 return 0; 279 return 0;
284} 280}
285 281
@@ -767,7 +763,6 @@ static int spufs_signal1_open(struct inode *inode, struct file *file)
767 if (!i->i_openers++) 763 if (!i->i_openers++)
768 ctx->signal1 = inode->i_mapping; 764 ctx->signal1 = inode->i_mapping;
769 spin_unlock(&ctx->mapping_lock); 765 spin_unlock(&ctx->mapping_lock);
770 smp_wmb();
771 return nonseekable_open(inode, file); 766 return nonseekable_open(inode, file);
772} 767}
773 768
@@ -781,7 +776,6 @@ spufs_signal1_release(struct inode *inode, struct file *file)
781 if (!--i->i_openers) 776 if (!--i->i_openers)
782 ctx->signal1 = NULL; 777 ctx->signal1 = NULL;
783 spin_unlock(&ctx->mapping_lock); 778 spin_unlock(&ctx->mapping_lock);
784 smp_wmb();
785 return 0; 779 return 0;
786} 780}
787 781
@@ -893,7 +887,6 @@ static int spufs_signal2_open(struct inode *inode, struct file *file)
893 if (!i->i_openers++) 887 if (!i->i_openers++)
894 ctx->signal2 = inode->i_mapping; 888 ctx->signal2 = inode->i_mapping;
895 spin_unlock(&ctx->mapping_lock); 889 spin_unlock(&ctx->mapping_lock);
896 smp_wmb();
897 return nonseekable_open(inode, file); 890 return nonseekable_open(inode, file);
898} 891}
899 892
@@ -907,7 +900,6 @@ spufs_signal2_release(struct inode *inode, struct file *file)
907 if (!--i->i_openers) 900 if (!--i->i_openers)
908 ctx->signal2 = NULL; 901 ctx->signal2 = NULL;
909 spin_unlock(&ctx->mapping_lock); 902 spin_unlock(&ctx->mapping_lock);
910 smp_wmb();
911 return 0; 903 return 0;
912} 904}
913 905
@@ -1112,7 +1104,6 @@ static int spufs_mss_open(struct inode *inode, struct file *file)
1112 if (!i->i_openers++) 1104 if (!i->i_openers++)
1113 ctx->mss = inode->i_mapping; 1105 ctx->mss = inode->i_mapping;
1114 spin_unlock(&ctx->mapping_lock); 1106 spin_unlock(&ctx->mapping_lock);
1115 smp_wmb();
1116 return nonseekable_open(inode, file); 1107 return nonseekable_open(inode, file);
1117} 1108}
1118 1109
@@ -1126,7 +1117,6 @@ spufs_mss_release(struct inode *inode, struct file *file)
1126 if (!--i->i_openers) 1117 if (!--i->i_openers)
1127 ctx->mss = NULL; 1118 ctx->mss = NULL;
1128 spin_unlock(&ctx->mapping_lock); 1119 spin_unlock(&ctx->mapping_lock);
1129 smp_wmb();
1130 return 0; 1120 return 0;
1131} 1121}
1132 1122
@@ -1172,7 +1162,6 @@ static int spufs_psmap_open(struct inode *inode, struct file *file)
1172 if (!i->i_openers++) 1162 if (!i->i_openers++)
1173 ctx->psmap = inode->i_mapping; 1163 ctx->psmap = inode->i_mapping;
1174 spin_unlock(&ctx->mapping_lock); 1164 spin_unlock(&ctx->mapping_lock);
1175 smp_wmb();
1176 return nonseekable_open(inode, file); 1165 return nonseekable_open(inode, file);
1177} 1166}
1178 1167
@@ -1186,7 +1175,6 @@ spufs_psmap_release(struct inode *inode, struct file *file)
1186 if (!--i->i_openers) 1175 if (!--i->i_openers)
1187 ctx->psmap = NULL; 1176 ctx->psmap = NULL;
1188 spin_unlock(&ctx->mapping_lock); 1177 spin_unlock(&ctx->mapping_lock);
1189 smp_wmb();
1190 return 0; 1178 return 0;
1191} 1179}
1192 1180
@@ -1244,7 +1232,6 @@ static int spufs_mfc_open(struct inode *inode, struct file *file)
1244 if (!i->i_openers++) 1232 if (!i->i_openers++)
1245 ctx->mfc = inode->i_mapping; 1233 ctx->mfc = inode->i_mapping;
1246 spin_unlock(&ctx->mapping_lock); 1234 spin_unlock(&ctx->mapping_lock);
1247 smp_wmb();
1248 return nonseekable_open(inode, file); 1235 return nonseekable_open(inode, file);
1249} 1236}
1250 1237
@@ -1258,7 +1245,6 @@ spufs_mfc_release(struct inode *inode, struct file *file)
1258 if (!--i->i_openers) 1245 if (!--i->i_openers)
1259 ctx->mfc = NULL; 1246 ctx->mfc = NULL;
1260 spin_unlock(&ctx->mapping_lock); 1247 spin_unlock(&ctx->mapping_lock);
1261 smp_wmb();
1262 return 0; 1248 return 0;
1263} 1249}
1264 1250