Commit 8a7d86bd authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Arnd Bergmann

[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: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarArnd Bergmann <arnd.bergmann@de.ibm.com>
parent db1384b4
...@@ -50,7 +50,6 @@ spufs_mem_open(struct inode *inode, struct file *file) ...@@ -50,7 +50,6 @@ spufs_mem_open(struct inode *inode, struct file *file)
if (!i->i_openers++) if (!i->i_openers++)
ctx->local_store = inode->i_mapping; ctx->local_store = inode->i_mapping;
spin_unlock(&ctx->mapping_lock); spin_unlock(&ctx->mapping_lock);
smp_wmb();
return 0; return 0;
} }
...@@ -64,7 +63,6 @@ spufs_mem_release(struct inode *inode, struct file *file) ...@@ -64,7 +63,6 @@ spufs_mem_release(struct inode *inode, struct file *file)
if (!--i->i_openers) if (!--i->i_openers)
ctx->local_store = NULL; ctx->local_store = NULL;
spin_unlock(&ctx->mapping_lock); spin_unlock(&ctx->mapping_lock);
smp_wmb();
return 0; return 0;
} }
...@@ -262,7 +260,6 @@ static int spufs_cntl_open(struct inode *inode, struct file *file) ...@@ -262,7 +260,6 @@ static int spufs_cntl_open(struct inode *inode, struct file *file)
if (!i->i_openers++) if (!i->i_openers++)
ctx->cntl = inode->i_mapping; ctx->cntl = inode->i_mapping;
spin_unlock(&ctx->mapping_lock); spin_unlock(&ctx->mapping_lock);
smp_wmb();
return simple_attr_open(inode, file, spufs_cntl_get, return simple_attr_open(inode, file, spufs_cntl_get,
spufs_cntl_set, "0x%08lx"); spufs_cntl_set, "0x%08lx");
} }
...@@ -279,7 +276,6 @@ spufs_cntl_release(struct inode *inode, struct file *file) ...@@ -279,7 +276,6 @@ spufs_cntl_release(struct inode *inode, struct file *file)
if (!--i->i_openers) if (!--i->i_openers)
ctx->cntl = NULL; ctx->cntl = NULL;
spin_unlock(&ctx->mapping_lock); spin_unlock(&ctx->mapping_lock);
smp_wmb();
return 0; return 0;
} }
...@@ -767,7 +763,6 @@ static int spufs_signal1_open(struct inode *inode, struct file *file) ...@@ -767,7 +763,6 @@ static int spufs_signal1_open(struct inode *inode, struct file *file)
if (!i->i_openers++) if (!i->i_openers++)
ctx->signal1 = inode->i_mapping; ctx->signal1 = inode->i_mapping;
spin_unlock(&ctx->mapping_lock); spin_unlock(&ctx->mapping_lock);
smp_wmb();
return nonseekable_open(inode, file); return nonseekable_open(inode, file);
} }
...@@ -781,7 +776,6 @@ spufs_signal1_release(struct inode *inode, struct file *file) ...@@ -781,7 +776,6 @@ spufs_signal1_release(struct inode *inode, struct file *file)
if (!--i->i_openers) if (!--i->i_openers)
ctx->signal1 = NULL; ctx->signal1 = NULL;
spin_unlock(&ctx->mapping_lock); spin_unlock(&ctx->mapping_lock);
smp_wmb();
return 0; return 0;
} }
...@@ -893,7 +887,6 @@ static int spufs_signal2_open(struct inode *inode, struct file *file) ...@@ -893,7 +887,6 @@ static int spufs_signal2_open(struct inode *inode, struct file *file)
if (!i->i_openers++) if (!i->i_openers++)
ctx->signal2 = inode->i_mapping; ctx->signal2 = inode->i_mapping;
spin_unlock(&ctx->mapping_lock); spin_unlock(&ctx->mapping_lock);
smp_wmb();
return nonseekable_open(inode, file); return nonseekable_open(inode, file);
} }
...@@ -907,7 +900,6 @@ spufs_signal2_release(struct inode *inode, struct file *file) ...@@ -907,7 +900,6 @@ spufs_signal2_release(struct inode *inode, struct file *file)
if (!--i->i_openers) if (!--i->i_openers)
ctx->signal2 = NULL; ctx->signal2 = NULL;
spin_unlock(&ctx->mapping_lock); spin_unlock(&ctx->mapping_lock);
smp_wmb();
return 0; return 0;
} }
...@@ -1112,7 +1104,6 @@ static int spufs_mss_open(struct inode *inode, struct file *file) ...@@ -1112,7 +1104,6 @@ static int spufs_mss_open(struct inode *inode, struct file *file)
if (!i->i_openers++) if (!i->i_openers++)
ctx->mss = inode->i_mapping; ctx->mss = inode->i_mapping;
spin_unlock(&ctx->mapping_lock); spin_unlock(&ctx->mapping_lock);
smp_wmb();
return nonseekable_open(inode, file); return nonseekable_open(inode, file);
} }
...@@ -1126,7 +1117,6 @@ spufs_mss_release(struct inode *inode, struct file *file) ...@@ -1126,7 +1117,6 @@ spufs_mss_release(struct inode *inode, struct file *file)
if (!--i->i_openers) if (!--i->i_openers)
ctx->mss = NULL; ctx->mss = NULL;
spin_unlock(&ctx->mapping_lock); spin_unlock(&ctx->mapping_lock);
smp_wmb();
return 0; return 0;
} }
...@@ -1172,7 +1162,6 @@ static int spufs_psmap_open(struct inode *inode, struct file *file) ...@@ -1172,7 +1162,6 @@ static int spufs_psmap_open(struct inode *inode, struct file *file)
if (!i->i_openers++) if (!i->i_openers++)
ctx->psmap = inode->i_mapping; ctx->psmap = inode->i_mapping;
spin_unlock(&ctx->mapping_lock); spin_unlock(&ctx->mapping_lock);
smp_wmb();
return nonseekable_open(inode, file); return nonseekable_open(inode, file);
} }
...@@ -1186,7 +1175,6 @@ spufs_psmap_release(struct inode *inode, struct file *file) ...@@ -1186,7 +1175,6 @@ spufs_psmap_release(struct inode *inode, struct file *file)
if (!--i->i_openers) if (!--i->i_openers)
ctx->psmap = NULL; ctx->psmap = NULL;
spin_unlock(&ctx->mapping_lock); spin_unlock(&ctx->mapping_lock);
smp_wmb();
return 0; return 0;
} }
...@@ -1244,7 +1232,6 @@ static int spufs_mfc_open(struct inode *inode, struct file *file) ...@@ -1244,7 +1232,6 @@ static int spufs_mfc_open(struct inode *inode, struct file *file)
if (!i->i_openers++) if (!i->i_openers++)
ctx->mfc = inode->i_mapping; ctx->mfc = inode->i_mapping;
spin_unlock(&ctx->mapping_lock); spin_unlock(&ctx->mapping_lock);
smp_wmb();
return nonseekable_open(inode, file); return nonseekable_open(inode, file);
} }
...@@ -1258,7 +1245,6 @@ spufs_mfc_release(struct inode *inode, struct file *file) ...@@ -1258,7 +1245,6 @@ spufs_mfc_release(struct inode *inode, struct file *file)
if (!--i->i_openers) if (!--i->i_openers)
ctx->mfc = NULL; ctx->mfc = NULL;
spin_unlock(&ctx->mapping_lock); spin_unlock(&ctx->mapping_lock);
smp_wmb();
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment