diff options
author | Jens Axboe <jens.axboe@oracle.com> | 2009-12-03 07:49:39 -0500 |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2009-12-03 07:49:39 -0500 |
commit | 220d0b1dbf78c6417a658c96e571415552d3abac (patch) | |
tree | 70cd3862540c38ea490e7a27c3c7acc35b680234 /arch/sparc | |
parent | 474b18ccc264c472abeec50f48469b6477202699 (diff) | |
parent | 22763c5cf3690a681551162c15d34d935308c8d7 (diff) |
Merge branch 'master' into for-2.6.33
Diffstat (limited to 'arch/sparc')
-rw-r--r-- | arch/sparc/boot/btfixupprep.c | 8 | ||||
-rw-r--r-- | arch/sparc/boot/piggyback_32.c | 10 | ||||
-rw-r--r-- | arch/sparc/boot/piggyback_64.c | 2 | ||||
-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 | ||||
-rw-r--r-- | arch/sparc/mm/init_64.h | 2 |
7 files changed, 18 insertions, 14 deletions
diff --git a/arch/sparc/boot/btfixupprep.c b/arch/sparc/boot/btfixupprep.c index 52a4208fe4f0..bbf91b9c3d39 100644 --- a/arch/sparc/boot/btfixupprep.c +++ b/arch/sparc/boot/btfixupprep.c | |||
@@ -61,14 +61,14 @@ unsigned long lastfoffset = -1; | |||
61 | unsigned long lastfrelno; | 61 | unsigned long lastfrelno; |
62 | btfixup *lastf; | 62 | btfixup *lastf; |
63 | 63 | ||
64 | void fatal(void) __attribute__((noreturn)); | 64 | static void fatal(void) __attribute__((noreturn)); |
65 | void fatal(void) | 65 | static void fatal(void) |
66 | { | 66 | { |
67 | fprintf(stderr, "Malformed output from objdump\n%s\n", buffer); | 67 | fprintf(stderr, "Malformed output from objdump\n%s\n", buffer); |
68 | exit(1); | 68 | exit(1); |
69 | } | 69 | } |
70 | 70 | ||
71 | btfixup *find(int type, char *name) | 71 | static btfixup *find(int type, char *name) |
72 | { | 72 | { |
73 | int i; | 73 | int i; |
74 | for (i = 0; i < last; i++) { | 74 | for (i = 0; i < last; i++) { |
@@ -88,7 +88,7 @@ btfixup *find(int type, char *name) | |||
88 | return array + last - 1; | 88 | return array + last - 1; |
89 | } | 89 | } |
90 | 90 | ||
91 | void set_mode (char *buffer) | 91 | static void set_mode (char *buffer) |
92 | { | 92 | { |
93 | for (mode = 0;; mode++) | 93 | for (mode = 0;; mode++) |
94 | if (buffer[mode] < '0' || buffer[mode] > '9') | 94 | if (buffer[mode] < '0' || buffer[mode] > '9') |
diff --git a/arch/sparc/boot/piggyback_32.c b/arch/sparc/boot/piggyback_32.c index e8dc9adfcd61..ac944aec7301 100644 --- a/arch/sparc/boot/piggyback_32.c +++ b/arch/sparc/boot/piggyback_32.c | |||
@@ -35,17 +35,17 @@ | |||
35 | * as PROM looks for a.out image only. | 35 | * as PROM looks for a.out image only. |
36 | */ | 36 | */ |
37 | 37 | ||
38 | unsigned short ld2(char *p) | 38 | static unsigned short ld2(char *p) |
39 | { | 39 | { |
40 | return (p[0] << 8) | p[1]; | 40 | return (p[0] << 8) | p[1]; |
41 | } | 41 | } |
42 | 42 | ||
43 | unsigned int ld4(char *p) | 43 | static unsigned int ld4(char *p) |
44 | { | 44 | { |
45 | return (p[0] << 24) | (p[1] << 16) | (p[2] << 8) | p[3]; | 45 | return (p[0] << 24) | (p[1] << 16) | (p[2] << 8) | p[3]; |
46 | } | 46 | } |
47 | 47 | ||
48 | void st4(char *p, unsigned int x) | 48 | static void st4(char *p, unsigned int x) |
49 | { | 49 | { |
50 | p[0] = x >> 24; | 50 | p[0] = x >> 24; |
51 | p[1] = x >> 16; | 51 | p[1] = x >> 16; |
@@ -53,7 +53,7 @@ void st4(char *p, unsigned int x) | |||
53 | p[3] = x; | 53 | p[3] = x; |
54 | } | 54 | } |
55 | 55 | ||
56 | void usage(void) | 56 | static void usage(void) |
57 | { | 57 | { |
58 | /* fs_img.gz is an image of initial ramdisk. */ | 58 | /* fs_img.gz is an image of initial ramdisk. */ |
59 | fprintf(stderr, "Usage: piggyback vmlinux.aout System.map fs_img.gz\n"); | 59 | fprintf(stderr, "Usage: piggyback vmlinux.aout System.map fs_img.gz\n"); |
@@ -61,7 +61,7 @@ void usage(void) | |||
61 | exit(1); | 61 | exit(1); |
62 | } | 62 | } |
63 | 63 | ||
64 | void die(char *str) | 64 | static void die(char *str) |
65 | { | 65 | { |
66 | perror (str); | 66 | perror (str); |
67 | exit(1); | 67 | exit(1); |
diff --git a/arch/sparc/boot/piggyback_64.c b/arch/sparc/boot/piggyback_64.c index c63fd1b6bdd4..a26a686cb5aa 100644 --- a/arch/sparc/boot/piggyback_64.c +++ b/arch/sparc/boot/piggyback_64.c | |||
@@ -32,7 +32,7 @@ | |||
32 | /* Note: run this on an a.out kernel (use elftoaout for it), as PROM looks for a.out image onlly | 32 | /* Note: run this on an a.out kernel (use elftoaout for it), as PROM looks for a.out image onlly |
33 | usage: piggyback vmlinux System.map tail, where tail is gzipped fs of the initial ramdisk */ | 33 | usage: piggyback vmlinux System.map tail, where tail is gzipped fs of the initial ramdisk */ |
34 | 34 | ||
35 | void die(char *str) | 35 | static void die(char *str) |
36 | { | 36 | { |
37 | perror (str); | 37 | perror (str); |
38 | exit(1); | 38 | exit(1); |
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; |
diff --git a/arch/sparc/mm/init_64.h b/arch/sparc/mm/init_64.h index c2f772dbd556..77d1b313e344 100644 --- a/arch/sparc/mm/init_64.h +++ b/arch/sparc/mm/init_64.h | |||
@@ -45,7 +45,7 @@ extern void free_initmem(void); | |||
45 | #define VMEMMAP_ALIGN(x) (((x)+VMEMMAP_CHUNK-1UL)&VMEMMAP_CHUNK_MASK) | 45 | #define VMEMMAP_ALIGN(x) (((x)+VMEMMAP_CHUNK-1UL)&VMEMMAP_CHUNK_MASK) |
46 | 46 | ||
47 | #define VMEMMAP_SIZE ((((1UL << MAX_PHYSADDR_BITS) >> PAGE_SHIFT) * \ | 47 | #define VMEMMAP_SIZE ((((1UL << MAX_PHYSADDR_BITS) >> PAGE_SHIFT) * \ |
48 | sizeof(struct page *)) >> VMEMMAP_CHUNK_SHIFT) | 48 | sizeof(struct page)) >> VMEMMAP_CHUNK_SHIFT) |
49 | extern unsigned long vmemmap_table[VMEMMAP_SIZE]; | 49 | extern unsigned long vmemmap_table[VMEMMAP_SIZE]; |
50 | #endif | 50 | #endif |
51 | 51 | ||