Commit aa907639 authored by Linus Torvalds's avatar Linus Torvalds

Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6:
  sparc: Move of_set_property_mutex acquisition outside of devtree_lock grab.
  sparc64: replace parentheses in pmul()
  sparc64: Add a comment about why we only use certain memory barriers these days.
parents a58695bb 1c9d80dd
...@@ -63,6 +63,10 @@ do { __asm__ __volatile__("ba,pt %%xcc, 1f\n\t" \ ...@@ -63,6 +63,10 @@ do { __asm__ __volatile__("ba,pt %%xcc, 1f\n\t" \
: : : "memory"); \ : : : "memory"); \
} while (0) } while (0)
/* The kernel always executes in TSO memory model these days,
* and furthermore most sparc64 chips implement more stringent
* memory ordering than required by the specifications.
*/
#define mb() membar_safe("#StoreLoad") #define mb() membar_safe("#StoreLoad")
#define rmb() __asm__ __volatile__("":::"memory") #define rmb() __asm__ __volatile__("":::"memory")
#define wmb() __asm__ __volatile__("":::"memory") #define wmb() __asm__ __volatile__("":::"memory")
......
...@@ -79,6 +79,7 @@ int of_set_property(struct device_node *dp, const char *name, void *val, int len ...@@ -79,6 +79,7 @@ int of_set_property(struct device_node *dp, const char *name, void *val, int len
err = -ENODEV; err = -ENODEV;
mutex_lock(&of_set_property_mutex);
write_lock(&devtree_lock); write_lock(&devtree_lock);
prevp = &dp->properties; prevp = &dp->properties;
while (*prevp) { while (*prevp) {
...@@ -88,9 +89,7 @@ int of_set_property(struct device_node *dp, const char *name, void *val, int len ...@@ -88,9 +89,7 @@ int of_set_property(struct device_node *dp, const char *name, void *val, int len
void *old_val = prop->value; void *old_val = prop->value;
int ret; int ret;
mutex_lock(&of_set_property_mutex);
ret = prom_setprop(dp->node, name, val, len); ret = prom_setprop(dp->node, name, val, len);
mutex_unlock(&of_set_property_mutex);
err = -EINVAL; err = -EINVAL;
if (ret >= 0) { if (ret >= 0) {
...@@ -109,6 +108,7 @@ int of_set_property(struct device_node *dp, const char *name, void *val, int len ...@@ -109,6 +108,7 @@ int of_set_property(struct device_node *dp, const char *name, void *val, int len
prevp = &(*prevp)->next; prevp = &(*prevp)->next;
} }
write_unlock(&devtree_lock); write_unlock(&devtree_lock);
mutex_unlock(&of_set_property_mutex);
/* XXX Upate procfs if necessary... */ /* XXX Upate procfs if necessary... */
......
...@@ -617,7 +617,7 @@ static void pmul(struct pt_regs *regs, unsigned int insn, unsigned int opf) ...@@ -617,7 +617,7 @@ static void pmul(struct pt_regs *regs, unsigned int insn, unsigned int opf)
rs2 = fps_regval(f, RS2(insn)); rs2 = fps_regval(f, RS2(insn));
rd_val = 0; rd_val = 0;
src2 = (rs2 >> (opf == FMUL8x16AU_OPF) ? 16 : 0); src2 = rs2 >> (opf == FMUL8x16AU_OPF ? 16 : 0);
for (byte = 0; byte < 4; byte++) { for (byte = 0; byte < 4; byte++) {
u16 src1 = (rs1 >> (byte * 8)) & 0x00ff; u16 src1 = (rs1 >> (byte * 8)) & 0x00ff;
u32 prod = src1 * src2; u32 prod = src1 * src2;
......
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