aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-10-03 10:33:17 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-10-03 10:33:17 -0400
commita06cb1ae3cb64367c0fdc313c43ebb0558e51827 (patch)
tree71a0143ae1196d088db354a8620c2efb23f0a062 /arch/sparc
parent56d92aa5cf7c96c70f81d0350c94faf46a9fb76d (diff)
parent5da444aae54f64575a60f1d596ed7706e3089fb0 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc
Pull sparc fixes from David Miller: "Some quick fixes after today's merge-window pull" 1) Add missing dependency on Sparc DES driver, oops. From Dave Jones. 2) Tell GCC that prom_printf() is printf-like and fix the few resultiing warnings. From Akinobu Mita. 3) Niagara-2 memcpy doesn't provide it's return value correctly in some circumstances. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc: sparc: fix format string argument for prom_printf() crypto: Build SPARC DES algorithms on SPARC only. sparc64: Fix return value of Niagara-2 memcpy.
Diffstat (limited to 'arch/sparc')
-rw-r--r--arch/sparc/include/asm/oplib_32.h2
-rw-r--r--arch/sparc/include/asm/oplib_64.h2
-rw-r--r--arch/sparc/kernel/hvapi.c2
-rw-r--r--arch/sparc/kernel/prom_64.c2
-rw-r--r--arch/sparc/kernel/traps_64.c2
-rw-r--r--arch/sparc/lib/NG2memcpy.S46
-rw-r--r--arch/sparc/mm/init_64.c7
-rw-r--r--arch/sparc/mm/iommu.c4
8 files changed, 34 insertions, 33 deletions
diff --git a/arch/sparc/include/asm/oplib_32.h b/arch/sparc/include/asm/oplib_32.h
index 27517879a6c2..c72f3045820c 100644
--- a/arch/sparc/include/asm/oplib_32.h
+++ b/arch/sparc/include/asm/oplib_32.h
@@ -94,7 +94,7 @@ extern int prom_getprev(void);
94extern void prom_console_write_buf(const char *buf, int len); 94extern void prom_console_write_buf(const char *buf, int len);
95 95
96/* Prom's internal routines, don't use in kernel/boot code. */ 96/* Prom's internal routines, don't use in kernel/boot code. */
97extern void prom_printf(const char *fmt, ...); 97extern __printf(1, 2) void prom_printf(const char *fmt, ...);
98extern void prom_write(const char *buf, unsigned int len); 98extern void prom_write(const char *buf, unsigned int len);
99 99
100/* Multiprocessor operations... */ 100/* Multiprocessor operations... */
diff --git a/arch/sparc/include/asm/oplib_64.h b/arch/sparc/include/asm/oplib_64.h
index 97a90475c314..a12dbe3b7762 100644
--- a/arch/sparc/include/asm/oplib_64.h
+++ b/arch/sparc/include/asm/oplib_64.h
@@ -98,7 +98,7 @@ extern unsigned char prom_get_idprom(char *idp_buffer, int idpbuf_size);
98extern void prom_console_write_buf(const char *buf, int len); 98extern void prom_console_write_buf(const char *buf, int len);
99 99
100/* Prom's internal routines, don't use in kernel/boot code. */ 100/* Prom's internal routines, don't use in kernel/boot code. */
101extern void prom_printf(const char *fmt, ...); 101extern __printf(1, 2) void prom_printf(const char *fmt, ...);
102extern void prom_write(const char *buf, unsigned int len); 102extern void prom_write(const char *buf, unsigned int len);
103 103
104/* Multiprocessor operations... */ 104/* Multiprocessor operations... */
diff --git a/arch/sparc/kernel/hvapi.c b/arch/sparc/kernel/hvapi.c
index 1032df43ec95..c0a2de0fd624 100644
--- a/arch/sparc/kernel/hvapi.c
+++ b/arch/sparc/kernel/hvapi.c
@@ -194,7 +194,7 @@ void __init sun4v_hvapi_init(void)
194 194
195bad: 195bad:
196 prom_printf("HVAPI: Cannot register API group " 196 prom_printf("HVAPI: Cannot register API group "
197 "%lx with major(%u) minor(%u)\n", 197 "%lx with major(%lu) minor(%lu)\n",
198 group, major, minor); 198 group, major, minor);
199 prom_halt(); 199 prom_halt();
200} 200}
diff --git a/arch/sparc/kernel/prom_64.c b/arch/sparc/kernel/prom_64.c
index 340c5b976d28..d397d7fc5c28 100644
--- a/arch/sparc/kernel/prom_64.c
+++ b/arch/sparc/kernel/prom_64.c
@@ -37,7 +37,7 @@ void * __init prom_early_alloc(unsigned long size)
37 void *ret; 37 void *ret;
38 38
39 if (!paddr) { 39 if (!paddr) {
40 prom_printf("prom_early_alloc(%lu) failed\n"); 40 prom_printf("prom_early_alloc(%lu) failed\n", size);
41 prom_halt(); 41 prom_halt();
42 } 42 }
43 43
diff --git a/arch/sparc/kernel/traps_64.c b/arch/sparc/kernel/traps_64.c
index 3b05e6697710..fa1f1d375ffc 100644
--- a/arch/sparc/kernel/traps_64.c
+++ b/arch/sparc/kernel/traps_64.c
@@ -850,7 +850,7 @@ void __init cheetah_ecache_flush_init(void)
850 ecache_flush_physbase = find_ecache_flush_span(ecache_flush_size); 850 ecache_flush_physbase = find_ecache_flush_span(ecache_flush_size);
851 851
852 if (ecache_flush_physbase == ~0UL) { 852 if (ecache_flush_physbase == ~0UL) {
853 prom_printf("cheetah_ecache_flush_init: Cannot find %d byte " 853 prom_printf("cheetah_ecache_flush_init: Cannot find %ld byte "
854 "contiguous physical memory.\n", 854 "contiguous physical memory.\n",
855 ecache_flush_size); 855 ecache_flush_size);
856 prom_halt(); 856 prom_halt();
diff --git a/arch/sparc/lib/NG2memcpy.S b/arch/sparc/lib/NG2memcpy.S
index 03eadf66b0d3..2c20ad63ddbf 100644
--- a/arch/sparc/lib/NG2memcpy.S
+++ b/arch/sparc/lib/NG2memcpy.S
@@ -14,7 +14,7 @@
14#define FPRS_FEF 0x04 14#define FPRS_FEF 0x04
15#ifdef MEMCPY_DEBUG 15#ifdef MEMCPY_DEBUG
16#define VISEntryHalf rd %fprs, %o5; wr %g0, FPRS_FEF, %fprs; \ 16#define VISEntryHalf rd %fprs, %o5; wr %g0, FPRS_FEF, %fprs; \
17 clr %g1; clr %g2; clr %g3; subcc %g0, %g0, %g0; 17 clr %g1; clr %g2; clr %g3; clr %g5; subcc %g0, %g0, %g0;
18#define VISExitHalf and %o5, FPRS_FEF, %o5; wr %o5, 0x0, %fprs 18#define VISExitHalf and %o5, FPRS_FEF, %o5; wr %o5, 0x0, %fprs
19#else 19#else
20#define VISEntryHalf rd %fprs, %o5; wr %g0, FPRS_FEF, %fprs 20#define VISEntryHalf rd %fprs, %o5; wr %g0, FPRS_FEF, %fprs
@@ -182,13 +182,13 @@ FUNC_NAME: /* %o0=dst, %o1=src, %o2=len */
182 cmp %g2, 0 182 cmp %g2, 0
183 tne %xcc, 5 183 tne %xcc, 5
184 PREAMBLE 184 PREAMBLE
185 mov %o0, GLOBAL_SPARE 185 mov %o0, %o3
186 cmp %o2, 0 186 cmp %o2, 0
187 be,pn %XCC, 85f 187 be,pn %XCC, 85f
188 or %o0, %o1, %o3 188 or %o0, %o1, GLOBAL_SPARE
189 cmp %o2, 16 189 cmp %o2, 16
190 blu,a,pn %XCC, 80f 190 blu,a,pn %XCC, 80f
191 or %o3, %o2, %o3 191 or GLOBAL_SPARE, %o2, GLOBAL_SPARE
192 192
193 /* 2 blocks (128 bytes) is the minimum we can do the block 193 /* 2 blocks (128 bytes) is the minimum we can do the block
194 * copy with. We need to ensure that we'll iterate at least 194 * copy with. We need to ensure that we'll iterate at least
@@ -202,7 +202,7 @@ FUNC_NAME: /* %o0=dst, %o1=src, %o2=len */
202 */ 202 */
203 cmp %o2, (4 * 64) 203 cmp %o2, (4 * 64)
204 blu,pt %XCC, 75f 204 blu,pt %XCC, 75f
205 andcc %o3, 0x7, %g0 205 andcc GLOBAL_SPARE, 0x7, %g0
206 206
207 /* %o0: dst 207 /* %o0: dst
208 * %o1: src 208 * %o1: src
@@ -404,13 +404,13 @@ FUNC_NAME: /* %o0=dst, %o1=src, %o2=len */
404 * over. If anything is left, we copy it one byte at a time. 404 * over. If anything is left, we copy it one byte at a time.
405 */ 405 */
406 brz,pt %o2, 85f 406 brz,pt %o2, 85f
407 sub %o0, %o1, %o3 407 sub %o0, %o1, GLOBAL_SPARE
408 ba,a,pt %XCC, 90f 408 ba,a,pt %XCC, 90f
409 409
410 .align 64 410 .align 64
41175: /* 16 < len <= 64 */ 41175: /* 16 < len <= 64 */
412 bne,pn %XCC, 75f 412 bne,pn %XCC, 75f
413 sub %o0, %o1, %o3 413 sub %o0, %o1, GLOBAL_SPARE
414 414
41572: 41572:
416 andn %o2, 0xf, %o4 416 andn %o2, 0xf, %o4
@@ -420,9 +420,9 @@ FUNC_NAME: /* %o0=dst, %o1=src, %o2=len */
420 add %o1, 0x08, %o1 420 add %o1, 0x08, %o1
421 EX_LD(LOAD(ldx, %o1, %g1)) 421 EX_LD(LOAD(ldx, %o1, %g1))
422 sub %o1, 0x08, %o1 422 sub %o1, 0x08, %o1
423 EX_ST(STORE(stx, %o5, %o1 + %o3)) 423 EX_ST(STORE(stx, %o5, %o1 + GLOBAL_SPARE))
424 add %o1, 0x8, %o1 424 add %o1, 0x8, %o1
425 EX_ST(STORE(stx, %g1, %o1 + %o3)) 425 EX_ST(STORE(stx, %g1, %o1 + GLOBAL_SPARE))
426 bgu,pt %XCC, 1b 426 bgu,pt %XCC, 1b
427 add %o1, 0x8, %o1 427 add %o1, 0x8, %o1
42873: andcc %o2, 0x8, %g0 42873: andcc %o2, 0x8, %g0
@@ -430,14 +430,14 @@ FUNC_NAME: /* %o0=dst, %o1=src, %o2=len */
430 nop 430 nop
431 sub %o2, 0x8, %o2 431 sub %o2, 0x8, %o2
432 EX_LD(LOAD(ldx, %o1, %o5)) 432 EX_LD(LOAD(ldx, %o1, %o5))
433 EX_ST(STORE(stx, %o5, %o1 + %o3)) 433 EX_ST(STORE(stx, %o5, %o1 + GLOBAL_SPARE))
434 add %o1, 0x8, %o1 434 add %o1, 0x8, %o1
4351: andcc %o2, 0x4, %g0 4351: andcc %o2, 0x4, %g0
436 be,pt %XCC, 1f 436 be,pt %XCC, 1f
437 nop 437 nop
438 sub %o2, 0x4, %o2 438 sub %o2, 0x4, %o2
439 EX_LD(LOAD(lduw, %o1, %o5)) 439 EX_LD(LOAD(lduw, %o1, %o5))
440 EX_ST(STORE(stw, %o5, %o1 + %o3)) 440 EX_ST(STORE(stw, %o5, %o1 + GLOBAL_SPARE))
441 add %o1, 0x4, %o1 441 add %o1, 0x4, %o1
4421: cmp %o2, 0 4421: cmp %o2, 0
443 be,pt %XCC, 85f 443 be,pt %XCC, 85f
@@ -454,11 +454,11 @@ FUNC_NAME: /* %o0=dst, %o1=src, %o2=len */
454 454
4551: subcc %g1, 1, %g1 4551: subcc %g1, 1, %g1
456 EX_LD(LOAD(ldub, %o1, %o5)) 456 EX_LD(LOAD(ldub, %o1, %o5))
457 EX_ST(STORE(stb, %o5, %o1 + %o3)) 457 EX_ST(STORE(stb, %o5, %o1 + GLOBAL_SPARE))
458 bgu,pt %icc, 1b 458 bgu,pt %icc, 1b
459 add %o1, 1, %o1 459 add %o1, 1, %o1
460 460
4612: add %o1, %o3, %o0 4612: add %o1, GLOBAL_SPARE, %o0
462 andcc %o1, 0x7, %g1 462 andcc %o1, 0x7, %g1
463 bne,pt %icc, 8f 463 bne,pt %icc, 8f
464 sll %g1, 3, %g1 464 sll %g1, 3, %g1
@@ -468,16 +468,16 @@ FUNC_NAME: /* %o0=dst, %o1=src, %o2=len */
468 nop 468 nop
469 ba,a,pt %xcc, 73b 469 ba,a,pt %xcc, 73b
470 470
4718: mov 64, %o3 4718: mov 64, GLOBAL_SPARE
472 andn %o1, 0x7, %o1 472 andn %o1, 0x7, %o1
473 EX_LD(LOAD(ldx, %o1, %g2)) 473 EX_LD(LOAD(ldx, %o1, %g2))
474 sub %o3, %g1, %o3 474 sub GLOBAL_SPARE, %g1, GLOBAL_SPARE
475 andn %o2, 0x7, %o4 475 andn %o2, 0x7, %o4
476 sllx %g2, %g1, %g2 476 sllx %g2, %g1, %g2
4771: add %o1, 0x8, %o1 4771: add %o1, 0x8, %o1
478 EX_LD(LOAD(ldx, %o1, %g3)) 478 EX_LD(LOAD(ldx, %o1, %g3))
479 subcc %o4, 0x8, %o4 479 subcc %o4, 0x8, %o4
480 srlx %g3, %o3, %o5 480 srlx %g3, GLOBAL_SPARE, %o5
481 or %o5, %g2, %o5 481 or %o5, %g2, %o5
482 EX_ST(STORE(stx, %o5, %o0)) 482 EX_ST(STORE(stx, %o5, %o0))
483 add %o0, 0x8, %o0 483 add %o0, 0x8, %o0
@@ -489,32 +489,32 @@ FUNC_NAME: /* %o0=dst, %o1=src, %o2=len */
489 be,pn %icc, 85f 489 be,pn %icc, 85f
490 add %o1, %g1, %o1 490 add %o1, %g1, %o1
491 ba,pt %xcc, 90f 491 ba,pt %xcc, 90f
492 sub %o0, %o1, %o3 492 sub %o0, %o1, GLOBAL_SPARE
493 493
494 .align 64 494 .align 64
49580: /* 0 < len <= 16 */ 49580: /* 0 < len <= 16 */
496 andcc %o3, 0x3, %g0 496 andcc GLOBAL_SPARE, 0x3, %g0
497 bne,pn %XCC, 90f 497 bne,pn %XCC, 90f
498 sub %o0, %o1, %o3 498 sub %o0, %o1, GLOBAL_SPARE
499 499
5001: 5001:
501 subcc %o2, 4, %o2 501 subcc %o2, 4, %o2
502 EX_LD(LOAD(lduw, %o1, %g1)) 502 EX_LD(LOAD(lduw, %o1, %g1))
503 EX_ST(STORE(stw, %g1, %o1 + %o3)) 503 EX_ST(STORE(stw, %g1, %o1 + GLOBAL_SPARE))
504 bgu,pt %XCC, 1b 504 bgu,pt %XCC, 1b
505 add %o1, 4, %o1 505 add %o1, 4, %o1
506 506
50785: retl 50785: retl
508 mov EX_RETVAL(GLOBAL_SPARE), %o0 508 mov EX_RETVAL(%o3), %o0
509 509
510 .align 32 510 .align 32
51190: 51190:
512 subcc %o2, 1, %o2 512 subcc %o2, 1, %o2
513 EX_LD(LOAD(ldub, %o1, %g1)) 513 EX_LD(LOAD(ldub, %o1, %g1))
514 EX_ST(STORE(stb, %g1, %o1 + %o3)) 514 EX_ST(STORE(stb, %g1, %o1 + GLOBAL_SPARE))
515 bgu,pt %XCC, 90b 515 bgu,pt %XCC, 90b
516 add %o1, 1, %o1 516 add %o1, 1, %o1
517 retl 517 retl
518 mov EX_RETVAL(GLOBAL_SPARE), %o0 518 mov EX_RETVAL(%o3), %o0
519 519
520 .size FUNC_NAME, .-FUNC_NAME 520 .size FUNC_NAME, .-FUNC_NAME
diff --git a/arch/sparc/mm/init_64.c b/arch/sparc/mm/init_64.c
index 696bb095e0fc..7a9b788c6ced 100644
--- a/arch/sparc/mm/init_64.c
+++ b/arch/sparc/mm/init_64.c
@@ -119,7 +119,8 @@ static void __init read_obp_memory(const char *property,
119 119
120 ret = prom_getproperty(node, property, (char *) regs, prop_size); 120 ret = prom_getproperty(node, property, (char *) regs, prop_size);
121 if (ret == -1) { 121 if (ret == -1) {
122 prom_printf("Couldn't get %s property from /memory.\n"); 122 prom_printf("Couldn't get %s property from /memory.\n",
123 property);
123 prom_halt(); 124 prom_halt();
124 } 125 }
125 126
@@ -497,7 +498,7 @@ static void __init read_obp_translations(void)
497 prom_halt(); 498 prom_halt();
498 } 499 }
499 if (unlikely(n > sizeof(prom_trans))) { 500 if (unlikely(n > sizeof(prom_trans))) {
500 prom_printf("prom_mappings: Size %Zd is too big.\n", n); 501 prom_printf("prom_mappings: Size %d is too big.\n", n);
501 prom_halt(); 502 prom_halt();
502 } 503 }
503 504
@@ -559,7 +560,7 @@ static void __init hypervisor_tlb_lock(unsigned long vaddr,
559 unsigned long ret = sun4v_mmu_map_perm_addr(vaddr, 0, pte, mmu); 560 unsigned long ret = sun4v_mmu_map_perm_addr(vaddr, 0, pte, mmu);
560 561
561 if (ret != 0) { 562 if (ret != 0) {
562 prom_printf("hypervisor_tlb_lock[%lx:%lx:%lx:%lx]: " 563 prom_printf("hypervisor_tlb_lock[%lx:%x:%lx:%lx]: "
563 "errors with %lx\n", vaddr, 0, pte, mmu, ret); 564 "errors with %lx\n", vaddr, 0, pte, mmu, ret);
564 prom_halt(); 565 prom_halt();
565 } 566 }
diff --git a/arch/sparc/mm/iommu.c b/arch/sparc/mm/iommu.c
index a8a58cad9d2b..0f4f7191fbba 100644
--- a/arch/sparc/mm/iommu.c
+++ b/arch/sparc/mm/iommu.c
@@ -90,8 +90,8 @@ static void __init sbus_iommu_init(struct platform_device *op)
90 it to us. */ 90 it to us. */
91 tmp = __get_free_pages(GFP_KERNEL, IOMMU_ORDER); 91 tmp = __get_free_pages(GFP_KERNEL, IOMMU_ORDER);
92 if (!tmp) { 92 if (!tmp) {
93 prom_printf("Unable to allocate iommu table [0x%08x]\n", 93 prom_printf("Unable to allocate iommu table [0x%lx]\n",
94 IOMMU_NPTES*sizeof(iopte_t)); 94 IOMMU_NPTES * sizeof(iopte_t));
95 prom_halt(); 95 prom_halt();
96 } 96 }
97 iommu->page_table = (iopte_t *)tmp; 97 iommu->page_table = (iopte_t *)tmp;