diff options
Diffstat (limited to 'arch/sparc')
-rw-r--r-- | arch/sparc/include/asm/system_64.h | 4 | ||||
-rw-r--r-- | arch/sparc/kernel/prom_common.c | 4 | ||||
-rw-r--r-- | arch/sparc/kernel/visemul.c | 2 |
3 files changed, 7 insertions, 3 deletions
diff --git a/arch/sparc/include/asm/system_64.h b/arch/sparc/include/asm/system_64.h index 25e848f0cad7..d47a98e66972 100644 --- a/arch/sparc/include/asm/system_64.h +++ b/arch/sparc/include/asm/system_64.h | |||
@@ -63,6 +63,10 @@ do { __asm__ __volatile__("ba,pt %%xcc, 1f\n\t" \ | |||
63 | : : : "memory"); \ | 63 | : : : "memory"); \ |
64 | } while (0) | 64 | } while (0) |
65 | 65 | ||
66 | /* The kernel always executes in TSO memory model these days, | ||
67 | * and furthermore most sparc64 chips implement more stringent | ||
68 | * memory ordering than required by the specifications. | ||
69 | */ | ||
66 | #define mb() membar_safe("#StoreLoad") | 70 | #define mb() membar_safe("#StoreLoad") |
67 | #define rmb() __asm__ __volatile__("":::"memory") | 71 | #define rmb() __asm__ __volatile__("":::"memory") |
68 | #define wmb() __asm__ __volatile__("":::"memory") | 72 | #define wmb() __asm__ __volatile__("":::"memory") |
diff --git a/arch/sparc/kernel/prom_common.c b/arch/sparc/kernel/prom_common.c index 138910c67206..d80a65d9e893 100644 --- a/arch/sparc/kernel/prom_common.c +++ b/arch/sparc/kernel/prom_common.c | |||
@@ -79,6 +79,7 @@ int of_set_property(struct device_node *dp, const char *name, void *val, int len | |||
79 | 79 | ||
80 | err = -ENODEV; | 80 | err = -ENODEV; |
81 | 81 | ||
82 | mutex_lock(&of_set_property_mutex); | ||
82 | write_lock(&devtree_lock); | 83 | write_lock(&devtree_lock); |
83 | prevp = &dp->properties; | 84 | prevp = &dp->properties; |
84 | while (*prevp) { | 85 | while (*prevp) { |
@@ -88,9 +89,7 @@ int of_set_property(struct device_node *dp, const char *name, void *val, int len | |||
88 | void *old_val = prop->value; | 89 | void *old_val = prop->value; |
89 | int ret; | 90 | int ret; |
90 | 91 | ||
91 | mutex_lock(&of_set_property_mutex); | ||
92 | ret = prom_setprop(dp->node, name, val, len); | 92 | ret = prom_setprop(dp->node, name, val, len); |
93 | mutex_unlock(&of_set_property_mutex); | ||
94 | 93 | ||
95 | err = -EINVAL; | 94 | err = -EINVAL; |
96 | if (ret >= 0) { | 95 | if (ret >= 0) { |
@@ -109,6 +108,7 @@ int of_set_property(struct device_node *dp, const char *name, void *val, int len | |||
109 | prevp = &(*prevp)->next; | 108 | prevp = &(*prevp)->next; |
110 | } | 109 | } |
111 | write_unlock(&devtree_lock); | 110 | write_unlock(&devtree_lock); |
111 | mutex_unlock(&of_set_property_mutex); | ||
112 | 112 | ||
113 | /* XXX Upate procfs if necessary... */ | 113 | /* XXX Upate procfs if necessary... */ |
114 | 114 | ||
diff --git a/arch/sparc/kernel/visemul.c b/arch/sparc/kernel/visemul.c index b956fd71c131..d231cbd5c526 100644 --- a/arch/sparc/kernel/visemul.c +++ b/arch/sparc/kernel/visemul.c | |||
@@ -617,7 +617,7 @@ static void pmul(struct pt_regs *regs, unsigned int insn, unsigned int opf) | |||
617 | rs2 = fps_regval(f, RS2(insn)); | 617 | rs2 = fps_regval(f, RS2(insn)); |
618 | 618 | ||
619 | rd_val = 0; | 619 | rd_val = 0; |
620 | src2 = (rs2 >> (opf == FMUL8x16AU_OPF) ? 16 : 0); | 620 | src2 = rs2 >> (opf == FMUL8x16AU_OPF ? 16 : 0); |
621 | for (byte = 0; byte < 4; byte++) { | 621 | for (byte = 0; byte < 4; byte++) { |
622 | u16 src1 = (rs1 >> (byte * 8)) & 0x00ff; | 622 | u16 src1 = (rs1 >> (byte * 8)) & 0x00ff; |
623 | u32 prod = src1 * src2; | 623 | u32 prod = src1 * src2; |