Commit a06cb1ae authored by Linus Torvalds's avatar Linus Torvalds

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.
parents 56d92aa5 5da444aa
...@@ -94,7 +94,7 @@ extern int prom_getprev(void); ...@@ -94,7 +94,7 @@ extern int prom_getprev(void);
extern void prom_console_write_buf(const char *buf, int len); extern void prom_console_write_buf(const char *buf, int len);
/* Prom's internal routines, don't use in kernel/boot code. */ /* Prom's internal routines, don't use in kernel/boot code. */
extern void prom_printf(const char *fmt, ...); extern __printf(1, 2) void prom_printf(const char *fmt, ...);
extern void prom_write(const char *buf, unsigned int len); extern void prom_write(const char *buf, unsigned int len);
/* Multiprocessor operations... */ /* Multiprocessor operations... */
......
...@@ -98,7 +98,7 @@ extern unsigned char prom_get_idprom(char *idp_buffer, int idpbuf_size); ...@@ -98,7 +98,7 @@ extern unsigned char prom_get_idprom(char *idp_buffer, int idpbuf_size);
extern void prom_console_write_buf(const char *buf, int len); extern void prom_console_write_buf(const char *buf, int len);
/* Prom's internal routines, don't use in kernel/boot code. */ /* Prom's internal routines, don't use in kernel/boot code. */
extern void prom_printf(const char *fmt, ...); extern __printf(1, 2) void prom_printf(const char *fmt, ...);
extern void prom_write(const char *buf, unsigned int len); extern void prom_write(const char *buf, unsigned int len);
/* Multiprocessor operations... */ /* Multiprocessor operations... */
......
...@@ -194,7 +194,7 @@ void __init sun4v_hvapi_init(void) ...@@ -194,7 +194,7 @@ void __init sun4v_hvapi_init(void)
bad: bad:
prom_printf("HVAPI: Cannot register API group " prom_printf("HVAPI: Cannot register API group "
"%lx with major(%u) minor(%u)\n", "%lx with major(%lu) minor(%lu)\n",
group, major, minor); group, major, minor);
prom_halt(); prom_halt();
} }
...@@ -37,7 +37,7 @@ void * __init prom_early_alloc(unsigned long size) ...@@ -37,7 +37,7 @@ void * __init prom_early_alloc(unsigned long size)
void *ret; void *ret;
if (!paddr) { if (!paddr) {
prom_printf("prom_early_alloc(%lu) failed\n"); prom_printf("prom_early_alloc(%lu) failed\n", size);
prom_halt(); prom_halt();
} }
......
...@@ -850,7 +850,7 @@ void __init cheetah_ecache_flush_init(void) ...@@ -850,7 +850,7 @@ void __init cheetah_ecache_flush_init(void)
ecache_flush_physbase = find_ecache_flush_span(ecache_flush_size); ecache_flush_physbase = find_ecache_flush_span(ecache_flush_size);
if (ecache_flush_physbase == ~0UL) { if (ecache_flush_physbase == ~0UL) {
prom_printf("cheetah_ecache_flush_init: Cannot find %d byte " prom_printf("cheetah_ecache_flush_init: Cannot find %ld byte "
"contiguous physical memory.\n", "contiguous physical memory.\n",
ecache_flush_size); ecache_flush_size);
prom_halt(); prom_halt();
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
#define FPRS_FEF 0x04 #define FPRS_FEF 0x04
#ifdef MEMCPY_DEBUG #ifdef MEMCPY_DEBUG
#define VISEntryHalf rd %fprs, %o5; wr %g0, FPRS_FEF, %fprs; \ #define VISEntryHalf rd %fprs, %o5; wr %g0, FPRS_FEF, %fprs; \
clr %g1; clr %g2; clr %g3; subcc %g0, %g0, %g0; clr %g1; clr %g2; clr %g3; clr %g5; subcc %g0, %g0, %g0;
#define VISExitHalf and %o5, FPRS_FEF, %o5; wr %o5, 0x0, %fprs #define VISExitHalf and %o5, FPRS_FEF, %o5; wr %o5, 0x0, %fprs
#else #else
#define VISEntryHalf rd %fprs, %o5; wr %g0, FPRS_FEF, %fprs #define VISEntryHalf rd %fprs, %o5; wr %g0, FPRS_FEF, %fprs
...@@ -182,13 +182,13 @@ FUNC_NAME: /* %o0=dst, %o1=src, %o2=len */ ...@@ -182,13 +182,13 @@ FUNC_NAME: /* %o0=dst, %o1=src, %o2=len */
cmp %g2, 0 cmp %g2, 0
tne %xcc, 5 tne %xcc, 5
PREAMBLE PREAMBLE
mov %o0, GLOBAL_SPARE mov %o0, %o3
cmp %o2, 0 cmp %o2, 0
be,pn %XCC, 85f be,pn %XCC, 85f
or %o0, %o1, %o3 or %o0, %o1, GLOBAL_SPARE
cmp %o2, 16 cmp %o2, 16
blu,a,pn %XCC, 80f blu,a,pn %XCC, 80f
or %o3, %o2, %o3 or GLOBAL_SPARE, %o2, GLOBAL_SPARE
/* 2 blocks (128 bytes) is the minimum we can do the block /* 2 blocks (128 bytes) is the minimum we can do the block
* copy with. We need to ensure that we'll iterate at least * 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,7 +202,7 @@ FUNC_NAME: /* %o0=dst, %o1=src, %o2=len */
*/ */
cmp %o2, (4 * 64) cmp %o2, (4 * 64)
blu,pt %XCC, 75f blu,pt %XCC, 75f
andcc %o3, 0x7, %g0 andcc GLOBAL_SPARE, 0x7, %g0
/* %o0: dst /* %o0: dst
* %o1: src * %o1: src
...@@ -404,13 +404,13 @@ FUNC_NAME: /* %o0=dst, %o1=src, %o2=len */ ...@@ -404,13 +404,13 @@ FUNC_NAME: /* %o0=dst, %o1=src, %o2=len */
* over. If anything is left, we copy it one byte at a time. * over. If anything is left, we copy it one byte at a time.
*/ */
brz,pt %o2, 85f brz,pt %o2, 85f
sub %o0, %o1, %o3 sub %o0, %o1, GLOBAL_SPARE
ba,a,pt %XCC, 90f ba,a,pt %XCC, 90f
.align 64 .align 64
75: /* 16 < len <= 64 */ 75: /* 16 < len <= 64 */
bne,pn %XCC, 75f bne,pn %XCC, 75f
sub %o0, %o1, %o3 sub %o0, %o1, GLOBAL_SPARE
72: 72:
andn %o2, 0xf, %o4 andn %o2, 0xf, %o4
...@@ -420,9 +420,9 @@ FUNC_NAME: /* %o0=dst, %o1=src, %o2=len */ ...@@ -420,9 +420,9 @@ FUNC_NAME: /* %o0=dst, %o1=src, %o2=len */
add %o1, 0x08, %o1 add %o1, 0x08, %o1
EX_LD(LOAD(ldx, %o1, %g1)) EX_LD(LOAD(ldx, %o1, %g1))
sub %o1, 0x08, %o1 sub %o1, 0x08, %o1
EX_ST(STORE(stx, %o5, %o1 + %o3)) EX_ST(STORE(stx, %o5, %o1 + GLOBAL_SPARE))
add %o1, 0x8, %o1 add %o1, 0x8, %o1
EX_ST(STORE(stx, %g1, %o1 + %o3)) EX_ST(STORE(stx, %g1, %o1 + GLOBAL_SPARE))
bgu,pt %XCC, 1b bgu,pt %XCC, 1b
add %o1, 0x8, %o1 add %o1, 0x8, %o1
73: andcc %o2, 0x8, %g0 73: andcc %o2, 0x8, %g0
...@@ -430,14 +430,14 @@ FUNC_NAME: /* %o0=dst, %o1=src, %o2=len */ ...@@ -430,14 +430,14 @@ FUNC_NAME: /* %o0=dst, %o1=src, %o2=len */
nop nop
sub %o2, 0x8, %o2 sub %o2, 0x8, %o2
EX_LD(LOAD(ldx, %o1, %o5)) EX_LD(LOAD(ldx, %o1, %o5))
EX_ST(STORE(stx, %o5, %o1 + %o3)) EX_ST(STORE(stx, %o5, %o1 + GLOBAL_SPARE))
add %o1, 0x8, %o1 add %o1, 0x8, %o1
1: andcc %o2, 0x4, %g0 1: andcc %o2, 0x4, %g0
be,pt %XCC, 1f be,pt %XCC, 1f
nop nop
sub %o2, 0x4, %o2 sub %o2, 0x4, %o2
EX_LD(LOAD(lduw, %o1, %o5)) EX_LD(LOAD(lduw, %o1, %o5))
EX_ST(STORE(stw, %o5, %o1 + %o3)) EX_ST(STORE(stw, %o5, %o1 + GLOBAL_SPARE))
add %o1, 0x4, %o1 add %o1, 0x4, %o1
1: cmp %o2, 0 1: cmp %o2, 0
be,pt %XCC, 85f be,pt %XCC, 85f
...@@ -454,11 +454,11 @@ FUNC_NAME: /* %o0=dst, %o1=src, %o2=len */ ...@@ -454,11 +454,11 @@ FUNC_NAME: /* %o0=dst, %o1=src, %o2=len */
1: subcc %g1, 1, %g1 1: subcc %g1, 1, %g1
EX_LD(LOAD(ldub, %o1, %o5)) EX_LD(LOAD(ldub, %o1, %o5))
EX_ST(STORE(stb, %o5, %o1 + %o3)) EX_ST(STORE(stb, %o5, %o1 + GLOBAL_SPARE))
bgu,pt %icc, 1b bgu,pt %icc, 1b
add %o1, 1, %o1 add %o1, 1, %o1
2: add %o1, %o3, %o0 2: add %o1, GLOBAL_SPARE, %o0
andcc %o1, 0x7, %g1 andcc %o1, 0x7, %g1
bne,pt %icc, 8f bne,pt %icc, 8f
sll %g1, 3, %g1 sll %g1, 3, %g1
...@@ -468,16 +468,16 @@ FUNC_NAME: /* %o0=dst, %o1=src, %o2=len */ ...@@ -468,16 +468,16 @@ FUNC_NAME: /* %o0=dst, %o1=src, %o2=len */
nop nop
ba,a,pt %xcc, 73b ba,a,pt %xcc, 73b
8: mov 64, %o3 8: mov 64, GLOBAL_SPARE
andn %o1, 0x7, %o1 andn %o1, 0x7, %o1
EX_LD(LOAD(ldx, %o1, %g2)) EX_LD(LOAD(ldx, %o1, %g2))
sub %o3, %g1, %o3 sub GLOBAL_SPARE, %g1, GLOBAL_SPARE
andn %o2, 0x7, %o4 andn %o2, 0x7, %o4
sllx %g2, %g1, %g2 sllx %g2, %g1, %g2
1: add %o1, 0x8, %o1 1: add %o1, 0x8, %o1
EX_LD(LOAD(ldx, %o1, %g3)) EX_LD(LOAD(ldx, %o1, %g3))
subcc %o4, 0x8, %o4 subcc %o4, 0x8, %o4
srlx %g3, %o3, %o5 srlx %g3, GLOBAL_SPARE, %o5
or %o5, %g2, %o5 or %o5, %g2, %o5
EX_ST(STORE(stx, %o5, %o0)) EX_ST(STORE(stx, %o5, %o0))
add %o0, 0x8, %o0 add %o0, 0x8, %o0
...@@ -489,32 +489,32 @@ FUNC_NAME: /* %o0=dst, %o1=src, %o2=len */ ...@@ -489,32 +489,32 @@ FUNC_NAME: /* %o0=dst, %o1=src, %o2=len */
be,pn %icc, 85f be,pn %icc, 85f
add %o1, %g1, %o1 add %o1, %g1, %o1
ba,pt %xcc, 90f ba,pt %xcc, 90f
sub %o0, %o1, %o3 sub %o0, %o1, GLOBAL_SPARE
.align 64 .align 64
80: /* 0 < len <= 16 */ 80: /* 0 < len <= 16 */
andcc %o3, 0x3, %g0 andcc GLOBAL_SPARE, 0x3, %g0
bne,pn %XCC, 90f bne,pn %XCC, 90f
sub %o0, %o1, %o3 sub %o0, %o1, GLOBAL_SPARE
1: 1:
subcc %o2, 4, %o2 subcc %o2, 4, %o2
EX_LD(LOAD(lduw, %o1, %g1)) EX_LD(LOAD(lduw, %o1, %g1))
EX_ST(STORE(stw, %g1, %o1 + %o3)) EX_ST(STORE(stw, %g1, %o1 + GLOBAL_SPARE))
bgu,pt %XCC, 1b bgu,pt %XCC, 1b
add %o1, 4, %o1 add %o1, 4, %o1
85: retl 85: retl
mov EX_RETVAL(GLOBAL_SPARE), %o0 mov EX_RETVAL(%o3), %o0
.align 32 .align 32
90: 90:
subcc %o2, 1, %o2 subcc %o2, 1, %o2
EX_LD(LOAD(ldub, %o1, %g1)) EX_LD(LOAD(ldub, %o1, %g1))
EX_ST(STORE(stb, %g1, %o1 + %o3)) EX_ST(STORE(stb, %g1, %o1 + GLOBAL_SPARE))
bgu,pt %XCC, 90b bgu,pt %XCC, 90b
add %o1, 1, %o1 add %o1, 1, %o1
retl retl
mov EX_RETVAL(GLOBAL_SPARE), %o0 mov EX_RETVAL(%o3), %o0
.size FUNC_NAME, .-FUNC_NAME .size FUNC_NAME, .-FUNC_NAME
...@@ -119,7 +119,8 @@ static void __init read_obp_memory(const char *property, ...@@ -119,7 +119,8 @@ static void __init read_obp_memory(const char *property,
ret = prom_getproperty(node, property, (char *) regs, prop_size); ret = prom_getproperty(node, property, (char *) regs, prop_size);
if (ret == -1) { if (ret == -1) {
prom_printf("Couldn't get %s property from /memory.\n"); prom_printf("Couldn't get %s property from /memory.\n",
property);
prom_halt(); prom_halt();
} }
...@@ -497,7 +498,7 @@ static void __init read_obp_translations(void) ...@@ -497,7 +498,7 @@ static void __init read_obp_translations(void)
prom_halt(); prom_halt();
} }
if (unlikely(n > sizeof(prom_trans))) { if (unlikely(n > sizeof(prom_trans))) {
prom_printf("prom_mappings: Size %Zd is too big.\n", n); prom_printf("prom_mappings: Size %d is too big.\n", n);
prom_halt(); prom_halt();
} }
...@@ -559,7 +560,7 @@ static void __init hypervisor_tlb_lock(unsigned long vaddr, ...@@ -559,7 +560,7 @@ static void __init hypervisor_tlb_lock(unsigned long vaddr,
unsigned long ret = sun4v_mmu_map_perm_addr(vaddr, 0, pte, mmu); unsigned long ret = sun4v_mmu_map_perm_addr(vaddr, 0, pte, mmu);
if (ret != 0) { if (ret != 0) {
prom_printf("hypervisor_tlb_lock[%lx:%lx:%lx:%lx]: " prom_printf("hypervisor_tlb_lock[%lx:%x:%lx:%lx]: "
"errors with %lx\n", vaddr, 0, pte, mmu, ret); "errors with %lx\n", vaddr, 0, pte, mmu, ret);
prom_halt(); prom_halt();
} }
......
...@@ -90,8 +90,8 @@ static void __init sbus_iommu_init(struct platform_device *op) ...@@ -90,8 +90,8 @@ static void __init sbus_iommu_init(struct platform_device *op)
it to us. */ it to us. */
tmp = __get_free_pages(GFP_KERNEL, IOMMU_ORDER); tmp = __get_free_pages(GFP_KERNEL, IOMMU_ORDER);
if (!tmp) { if (!tmp) {
prom_printf("Unable to allocate iommu table [0x%08x]\n", prom_printf("Unable to allocate iommu table [0x%lx]\n",
IOMMU_NPTES*sizeof(iopte_t)); IOMMU_NPTES * sizeof(iopte_t));
prom_halt(); prom_halt();
} }
iommu->page_table = (iopte_t *)tmp; iommu->page_table = (iopte_t *)tmp;
......
...@@ -796,6 +796,7 @@ config CRYPTO_DES ...@@ -796,6 +796,7 @@ config CRYPTO_DES
config CRYPTO_DES_SPARC64 config CRYPTO_DES_SPARC64
tristate "DES and Triple DES EDE cipher algorithms (SPARC64)" tristate "DES and Triple DES EDE cipher algorithms (SPARC64)"
depends on SPARC64
select CRYPTO_ALGAPI select CRYPTO_ALGAPI
select CRYPTO_DES select CRYPTO_DES
help help
......
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