diff options
-rw-r--r-- | arch/ppc/kernel/ppc_ksyms.c | 1 | ||||
-rw-r--r-- | arch/ppc/lib/string.S | 14 |
2 files changed, 15 insertions, 0 deletions
diff --git a/arch/ppc/kernel/ppc_ksyms.c b/arch/ppc/kernel/ppc_ksyms.c index 2ba659f401be..d9036ef0b658 100644 --- a/arch/ppc/kernel/ppc_ksyms.c +++ b/arch/ppc/kernel/ppc_ksyms.c | |||
@@ -88,6 +88,7 @@ EXPORT_SYMBOL(strncpy); | |||
88 | EXPORT_SYMBOL(strcat); | 88 | EXPORT_SYMBOL(strcat); |
89 | EXPORT_SYMBOL(strlen); | 89 | EXPORT_SYMBOL(strlen); |
90 | EXPORT_SYMBOL(strcmp); | 90 | EXPORT_SYMBOL(strcmp); |
91 | EXPORT_SYMBOL(strncmp); | ||
91 | 92 | ||
92 | EXPORT_SYMBOL(csum_partial); | 93 | EXPORT_SYMBOL(csum_partial); |
93 | EXPORT_SYMBOL(csum_partial_copy_generic); | 94 | EXPORT_SYMBOL(csum_partial_copy_generic); |
diff --git a/arch/ppc/lib/string.S b/arch/ppc/lib/string.S index 84ed33ab4c2d..927253bfc826 100644 --- a/arch/ppc/lib/string.S +++ b/arch/ppc/lib/string.S | |||
@@ -121,6 +121,20 @@ _GLOBAL(strcmp) | |||
121 | beq 1b | 121 | beq 1b |
122 | blr | 122 | blr |
123 | 123 | ||
124 | _GLOBAL(strncmp) | ||
125 | PPC_LCMPI r5,0 | ||
126 | beqlr | ||
127 | mtctr r5 | ||
128 | addi r5,r3,-1 | ||
129 | addi r4,r4,-1 | ||
130 | 1: lbzu r3,1(r5) | ||
131 | cmpwi 1,r3,0 | ||
132 | lbzu r0,1(r4) | ||
133 | subf. r3,r0,r3 | ||
134 | beqlr 1 | ||
135 | bdnzt eq,1b | ||
136 | blr | ||
137 | |||
124 | _GLOBAL(strlen) | 138 | _GLOBAL(strlen) |
125 | addi r4,r3,-1 | 139 | addi r4,r3,-1 |
126 | 1: lbzu r0,1(r4) | 140 | 1: lbzu r0,1(r4) |