diff options
author | Grant Likely <grant.likely@secretlab.ca> | 2009-11-23 16:49:36 -0500 |
---|---|---|
committer | Grant Likely <grant.likely@secretlab.ca> | 2009-11-23 16:49:36 -0500 |
commit | 2cfcadde83b308240690ff1c18f117d8bc7a08b0 (patch) | |
tree | aa0795966d070d1f7a5221232d9ba47744bddb5f /arch/sparc | |
parent | e91edcf5a2940bb7f1f316c871dfe9e2aaf9d6d9 (diff) | |
parent | 648f4e3e50c4793d9dbf9a09afa193631f76fa26 (diff) |
Merge commit 'v2.6.32-rc8'
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/ldc.c | 4 | ||||
-rw-r--r-- | arch/sparc/kernel/perf_event.c | 2 | ||||
-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.c | 2 |
9 files changed, 21 insertions, 17 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/ldc.c b/arch/sparc/kernel/ldc.c index adf5f273868a..cb3c72c45aab 100644 --- a/arch/sparc/kernel/ldc.c +++ b/arch/sparc/kernel/ldc.c | |||
@@ -1242,13 +1242,13 @@ int ldc_bind(struct ldc_channel *lp, const char *name) | |||
1242 | snprintf(lp->tx_irq_name, LDC_IRQ_NAME_MAX, "%s TX", name); | 1242 | snprintf(lp->tx_irq_name, LDC_IRQ_NAME_MAX, "%s TX", name); |
1243 | 1243 | ||
1244 | err = request_irq(lp->cfg.rx_irq, ldc_rx, | 1244 | err = request_irq(lp->cfg.rx_irq, ldc_rx, |
1245 | IRQF_SAMPLE_RANDOM | IRQF_SHARED, | 1245 | IRQF_SAMPLE_RANDOM | IRQF_DISABLED | IRQF_SHARED, |
1246 | lp->rx_irq_name, lp); | 1246 | lp->rx_irq_name, lp); |
1247 | if (err) | 1247 | if (err) |
1248 | return err; | 1248 | return err; |
1249 | 1249 | ||
1250 | err = request_irq(lp->cfg.tx_irq, ldc_tx, | 1250 | err = request_irq(lp->cfg.tx_irq, ldc_tx, |
1251 | IRQF_SAMPLE_RANDOM | IRQF_SHARED, | 1251 | IRQF_SAMPLE_RANDOM | IRQF_DISABLED | IRQF_SHARED, |
1252 | lp->tx_irq_name, lp); | 1252 | lp->tx_irq_name, lp); |
1253 | if (err) { | 1253 | if (err) { |
1254 | free_irq(lp->cfg.rx_irq, lp); | 1254 | free_irq(lp->cfg.rx_irq, lp); |
diff --git a/arch/sparc/kernel/perf_event.c b/arch/sparc/kernel/perf_event.c index 04db92743896..fa5936e1c3b9 100644 --- a/arch/sparc/kernel/perf_event.c +++ b/arch/sparc/kernel/perf_event.c | |||
@@ -437,7 +437,7 @@ static const struct sparc_pmu niagara2_pmu = { | |||
437 | .lower_shift = 6, | 437 | .lower_shift = 6, |
438 | .event_mask = 0xfff, | 438 | .event_mask = 0xfff, |
439 | .hv_bit = 0x8, | 439 | .hv_bit = 0x8, |
440 | .irq_bit = 0x03, | 440 | .irq_bit = 0x30, |
441 | .upper_nop = 0x220, | 441 | .upper_nop = 0x220, |
442 | .lower_nop = 0x220, | 442 | .lower_nop = 0x220, |
443 | }; | 443 | }; |
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.c b/arch/sparc/mm/init_64.c index a70a5e1904d9..1886d37d411b 100644 --- a/arch/sparc/mm/init_64.c +++ b/arch/sparc/mm/init_64.c | |||
@@ -265,7 +265,7 @@ static void flush_dcache(unsigned long pfn) | |||
265 | struct page *page; | 265 | struct page *page; |
266 | 266 | ||
267 | page = pfn_to_page(pfn); | 267 | page = pfn_to_page(pfn); |
268 | if (page && page_mapping(page)) { | 268 | if (page) { |
269 | unsigned long pg_flags; | 269 | unsigned long pg_flags; |
270 | 270 | ||
271 | pg_flags = page->flags; | 271 | pg_flags = page->flags; |