aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mn10300
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mn10300')
-rw-r--r--arch/mn10300/kernel/mn10300_ksyms.c5
-rw-r--r--arch/mn10300/kernel/process.c1
-rw-r--r--arch/mn10300/lib/Makefile2
-rw-r--r--arch/mn10300/lib/__ucmpdi2.S43
4 files changed, 50 insertions, 1 deletions
diff --git a/arch/mn10300/kernel/mn10300_ksyms.c b/arch/mn10300/kernel/mn10300_ksyms.c
index 6d19628634e3..f9eb9753a404 100644
--- a/arch/mn10300/kernel/mn10300_ksyms.c
+++ b/arch/mn10300/kernel/mn10300_ksyms.c
@@ -10,8 +10,11 @@
10 */ 10 */
11#include <linux/module.h> 11#include <linux/module.h>
12#include <asm/uaccess.h> 12#include <asm/uaccess.h>
13#include <asm/pgtable.h>
13 14
14 15
16EXPORT_SYMBOL(empty_zero_page);
17
15EXPORT_SYMBOL(change_bit); 18EXPORT_SYMBOL(change_bit);
16EXPORT_SYMBOL(test_and_change_bit); 19EXPORT_SYMBOL(test_and_change_bit);
17 20
@@ -31,7 +34,9 @@ extern u64 __ashrdi3(u64, unsigned);
31extern u64 __ashldi3(u64, unsigned); 34extern u64 __ashldi3(u64, unsigned);
32extern u64 __lshrdi3(u64, unsigned); 35extern u64 __lshrdi3(u64, unsigned);
33extern s64 __negdi2(s64); 36extern s64 __negdi2(s64);
37extern int __ucmpdi2(u64, u64);
34EXPORT_SYMBOL(__ashrdi3); 38EXPORT_SYMBOL(__ashrdi3);
35EXPORT_SYMBOL(__ashldi3); 39EXPORT_SYMBOL(__ashldi3);
36EXPORT_SYMBOL(__lshrdi3); 40EXPORT_SYMBOL(__lshrdi3);
37EXPORT_SYMBOL(__negdi2); 41EXPORT_SYMBOL(__negdi2);
42EXPORT_SYMBOL(__ucmpdi2);
diff --git a/arch/mn10300/kernel/process.c b/arch/mn10300/kernel/process.c
index 9c623c88387b..b28c9a60445b 100644
--- a/arch/mn10300/kernel/process.c
+++ b/arch/mn10300/kernel/process.c
@@ -153,6 +153,7 @@ int kernel_thread(int (*fn)(void *), void *arg, unsigned long flags)
153 return do_fork(flags | CLONE_VM | CLONE_UNTRACED, 0, &regs, 0, 153 return do_fork(flags | CLONE_VM | CLONE_UNTRACED, 0, &regs, 0,
154 NULL, NULL); 154 NULL, NULL);
155} 155}
156EXPORT_SYMBOL(kernel_thread);
156 157
157/* 158/*
158 * free current thread data structures etc.. 159 * free current thread data structures etc..
diff --git a/arch/mn10300/lib/Makefile b/arch/mn10300/lib/Makefile
index fdfa9ec5b5bb..0cd2346f4c13 100644
--- a/arch/mn10300/lib/Makefile
+++ b/arch/mn10300/lib/Makefile
@@ -4,4 +4,4 @@
4 4
5lib-y = delay.o usercopy.o checksum.o bitops.o memcpy.o memmove.o memset.o 5lib-y = delay.o usercopy.o checksum.o bitops.o memcpy.o memmove.o memset.o
6lib-y += do_csum.o 6lib-y += do_csum.o
7lib-y += __ashldi3.o __ashrdi3.o __lshrdi3.o negdi2.o 7lib-y += __ashldi3.o __ashrdi3.o __lshrdi3.o negdi2.o __ucmpdi2.o
diff --git a/arch/mn10300/lib/__ucmpdi2.S b/arch/mn10300/lib/__ucmpdi2.S
new file mode 100644
index 000000000000..60dcbdfe386c
--- /dev/null
+++ b/arch/mn10300/lib/__ucmpdi2.S
@@ -0,0 +1,43 @@
1/* __ucmpdi2.S: 64-bit unsigned compare
2 *
3 * Copyright (C) 2008 Red Hat, Inc. All Rights Reserved.
4 * Written by David Howells (dhowells@redhat.com)
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version
9 * 2 of the License, or (at your option) any later version.
10 */
11
12
13 .text
14 .p2align 4
15
16###############################################################################
17#
18# int __ucmpdi2(unsigned long long a [D0:D1],
19# unsigned long long b [(SP,12),(SP,16)])
20#
21# - returns 0, 1, or 2 as a <, =, > b respectively.
22#
23###############################################################################
24 .globl __ucmpdi2
25 .type __ucmpdi2,@function
26__ucmpdi2:
27 mov (12,sp),a0 # b.lsw
28 mov (16,sp),a1 # b.msw
29
30 sub a0,d0
31 subc a1,d1 # may clear Z, never sets it
32 bne __ucmpdi2_differ # a.msw != b.msw
33 mov +1,d0
34 rets
35
36__ucmpdi2_differ:
37 # C flag is set if LE, clear if GE
38 subc d0,d0 # -1 if LE, 0 if GE
39 add +1,d0 # 0 if LE, 1 if GE
40 add d0,d0 # 0 if LE, 2 if GE
41 rets
42
43 .size __ucmpdi2, .-__ucmpdi2