aboutsummaryrefslogtreecommitdiffstats
path: root/arch/cris/arch-v32
diff options
context:
space:
mode:
Diffstat (limited to 'arch/cris/arch-v32')
-rw-r--r--arch/cris/arch-v32/drivers/cryptocop.c4
-rw-r--r--arch/cris/arch-v32/kernel/irq.c2
-rw-r--r--arch/cris/arch-v32/lib/Makefile2
-rw-r--r--arch/cris/arch-v32/lib/strcmp.S21
4 files changed, 25 insertions, 4 deletions
diff --git a/arch/cris/arch-v32/drivers/cryptocop.c b/arch/cris/arch-v32/drivers/cryptocop.c
index 67c61ea86813..fd529a0ec758 100644
--- a/arch/cris/arch-v32/drivers/cryptocop.c
+++ b/arch/cris/arch-v32/drivers/cryptocop.c
@@ -1395,7 +1395,7 @@ static int create_md5_pad(int alloc_flag, unsigned long long hashed_length, char
1395 if (padlen < MD5_MIN_PAD_LENGTH) padlen += MD5_BLOCK_LENGTH; 1395 if (padlen < MD5_MIN_PAD_LENGTH) padlen += MD5_BLOCK_LENGTH;
1396 1396
1397 p = kmalloc(padlen, alloc_flag); 1397 p = kmalloc(padlen, alloc_flag);
1398 if (!pad) return -ENOMEM; 1398 if (!p) return -ENOMEM;
1399 1399
1400 *p = 0x80; 1400 *p = 0x80;
1401 memset(p+1, 0, padlen - 1); 1401 memset(p+1, 0, padlen - 1);
@@ -1427,7 +1427,7 @@ static int create_sha1_pad(int alloc_flag, unsigned long long hashed_length, cha
1427 if (padlen < SHA1_MIN_PAD_LENGTH) padlen += SHA1_BLOCK_LENGTH; 1427 if (padlen < SHA1_MIN_PAD_LENGTH) padlen += SHA1_BLOCK_LENGTH;
1428 1428
1429 p = kmalloc(padlen, alloc_flag); 1429 p = kmalloc(padlen, alloc_flag);
1430 if (!pad) return -ENOMEM; 1430 if (!p) return -ENOMEM;
1431 1431
1432 *p = 0x80; 1432 *p = 0x80;
1433 memset(p+1, 0, padlen - 1); 1433 memset(p+1, 0, padlen - 1);
diff --git a/arch/cris/arch-v32/kernel/irq.c b/arch/cris/arch-v32/kernel/irq.c
index d70b445f4a8f..57668db25031 100644
--- a/arch/cris/arch-v32/kernel/irq.c
+++ b/arch/cris/arch-v32/kernel/irq.c
@@ -430,8 +430,8 @@ crisv32_do_multiple(struct pt_regs* regs)
430 masked[i] &= ~TIMER_MASK; 430 masked[i] &= ~TIMER_MASK;
431 do_IRQ(TIMER0_INTR_VECT, regs); 431 do_IRQ(TIMER0_INTR_VECT, regs);
432 } 432 }
433 }
434#endif 433#endif
434 }
435 435
436#ifdef IGNORE_MASK 436#ifdef IGNORE_MASK
437 /* Remove IRQs that can't be handled as multiple. */ 437 /* Remove IRQs that can't be handled as multiple. */
diff --git a/arch/cris/arch-v32/lib/Makefile b/arch/cris/arch-v32/lib/Makefile
index eb4aad1f1158..dd296b9db034 100644
--- a/arch/cris/arch-v32/lib/Makefile
+++ b/arch/cris/arch-v32/lib/Makefile
@@ -3,5 +3,5 @@
3# 3#
4 4
5lib-y = checksum.o checksumcopy.o string.o usercopy.o memset.o \ 5lib-y = checksum.o checksumcopy.o string.o usercopy.o memset.o \
6 csumcpfruser.o spinlock.o delay.o 6 csumcpfruser.o spinlock.o delay.o strcmp.o
7 7
diff --git a/arch/cris/arch-v32/lib/strcmp.S b/arch/cris/arch-v32/lib/strcmp.S
new file mode 100644
index 000000000000..8f7a1ee62591
--- /dev/null
+++ b/arch/cris/arch-v32/lib/strcmp.S
@@ -0,0 +1,21 @@
1; strcmp.S -- CRISv32 version.
2; Copyright (C) 2008 AXIS Communications AB
3; Written by Edgar E. Iglesias
4;
5; This source code is licensed under the GNU General Public License,
6; Version 2. See the file COPYING for more details.
7
8 .global strcmp
9 .type strcmp,@function
10strcmp:
111:
12 move.b [$r10+], $r12
13 seq $r13
14 sub.b [$r11+], $r12
15 or.b $r12, $r13
16 beq 1b
17 nop
18
19 ret
20 movs.b $r12, $r10
21 .size strcmp, . - strcmp