]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[POWERPC] Add strncmp to arch/ppc
authorJosh Boyer <jwboyer@linux.vnet.ibm.com>
Tue, 22 Apr 2008 00:50:27 +0000 (10:50 +1000)
committerPaul Mackerras <paulus@samba.org>
Thu, 24 Apr 2008 10:57:34 +0000 (20:57 +1000)
Commit 0119536cd314ef95553604208c25bc35581f7f0a added an assembly
version of strncmp to PowerPC.  However, it changed a common header
file between arch/ppc and arch/powerpc without adding strncmp to
arch/ppc.  This fixes that omission so that arch/ppc links again.

Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
arch/ppc/kernel/ppc_ksyms.c
arch/ppc/lib/string.S

index 2ba659f401bea31dcd9095eff9f97a4519592486..d9036ef0b6581215211397cd806f10eae4acfe38 100644 (file)
@@ -88,6 +88,7 @@ EXPORT_SYMBOL(strncpy);
 EXPORT_SYMBOL(strcat);
 EXPORT_SYMBOL(strlen);
 EXPORT_SYMBOL(strcmp);
+EXPORT_SYMBOL(strncmp);
 
 EXPORT_SYMBOL(csum_partial);
 EXPORT_SYMBOL(csum_partial_copy_generic);
index 84ed33ab4c2de8038a0891eb06ddda06e2484a31..927253bfc8262fab2ea233437bf7b918b5dabd67 100644 (file)
@@ -121,6 +121,20 @@ _GLOBAL(strcmp)
        beq     1b
        blr
 
+_GLOBAL(strncmp)
+       PPC_LCMPI r5,0
+       beqlr
+       mtctr   r5
+       addi    r5,r3,-1
+       addi    r4,r4,-1
+1:     lbzu    r3,1(r5)
+       cmpwi   1,r3,0
+       lbzu    r0,1(r4)
+       subf.   r3,r0,r3
+       beqlr   1
+       bdnzt   eq,1b
+       blr
+
 _GLOBAL(strlen)
        addi    r4,r3,-1
 1:     lbzu    r0,1(r4)