aboutsummaryrefslogtreecommitdiffstats
path: root/arch/m68k
diff options
context:
space:
mode:
authorGreg Ungerer <gerg@uclinux.org>2011-03-29 01:06:37 -0400
committerGreg Ungerer <gerg@uclinux.org>2011-05-23 20:03:51 -0400
commita697dc934f52355494b746d7b5568227e0910ae8 (patch)
tree2eb1fec965b192f15d480c249a7250eac3562b3d /arch/m68k
parent2c7f3feb63276f08dd289a2cb29694af17ad70dd (diff)
m68k: merge non-mmu and mmu versions of m68k_ksyms.c
After cleaning up m68k_ksyms_no.c it is now strait forward to merge the non-mmu and mmu versions of m68k_ksyms.c. The need for the extra gcc functions is not strictly based on having an MMU or not. It is based on the family the processor belongs too, so use an appropriate conditional check. Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Diffstat (limited to 'arch/m68k')
-rw-r--r--arch/m68k/kernel/m68k_ksyms.c36
-rw-r--r--arch/m68k/kernel/m68k_ksyms_mm.c16
-rw-r--r--arch/m68k/kernel/m68k_ksyms_no.c44
3 files changed, 32 insertions, 64 deletions
diff --git a/arch/m68k/kernel/m68k_ksyms.c b/arch/m68k/kernel/m68k_ksyms.c
index 4752c28ce0ac..33f82769547c 100644
--- a/arch/m68k/kernel/m68k_ksyms.c
+++ b/arch/m68k/kernel/m68k_ksyms.c
@@ -1,5 +1,33 @@
1#ifdef CONFIG_MMU 1#include <linux/module.h>
2#include "m68k_ksyms_mm.c" 2
3#else 3asmlinkage long long __ashldi3 (long long, int);
4#include "m68k_ksyms_no.c" 4asmlinkage long long __ashrdi3 (long long, int);
5asmlinkage long long __lshrdi3 (long long, int);
6asmlinkage long long __muldi3 (long long, long long);
7
8/* The following are special because they're not called
9 explicitly (the C compiler generates them). Fortunately,
10 their interface isn't gonna change any time soon now, so
11 it's OK to leave it out of version control. */
12EXPORT_SYMBOL(__ashldi3);
13EXPORT_SYMBOL(__ashrdi3);
14EXPORT_SYMBOL(__lshrdi3);
15EXPORT_SYMBOL(__muldi3);
16
17#if !defined(__mc68020__) && !defined(__mc68030__) && \
18 !defined(__mc68040__) && !defined(__mc68060__) && !defined(__mcpu32__)
19/*
20 * Simpler 68k and ColdFire parts also need a few other gcc functions.
21 */
22extern long long __divsi3(long long, long long);
23extern long long __modsi3(long long, long long);
24extern long long __mulsi3(long long, long long);
25extern long long __udivsi3(long long, long long);
26extern long long __umodsi3(long long, long long);
27
28EXPORT_SYMBOL(__divsi3);
29EXPORT_SYMBOL(__modsi3);
30EXPORT_SYMBOL(__mulsi3);
31EXPORT_SYMBOL(__udivsi3);
32EXPORT_SYMBOL(__umodsi3);
5#endif 33#endif
diff --git a/arch/m68k/kernel/m68k_ksyms_mm.c b/arch/m68k/kernel/m68k_ksyms_mm.c
deleted file mode 100644
index d900e77e5363..000000000000
--- a/arch/m68k/kernel/m68k_ksyms_mm.c
+++ /dev/null
@@ -1,16 +0,0 @@
1#include <linux/module.h>
2
3asmlinkage long long __ashldi3 (long long, int);
4asmlinkage long long __ashrdi3 (long long, int);
5asmlinkage long long __lshrdi3 (long long, int);
6asmlinkage long long __muldi3 (long long, long long);
7
8/* The following are special because they're not called
9 explicitly (the C compiler generates them). Fortunately,
10 their interface isn't gonna change any time soon now, so
11 it's OK to leave it out of version control. */
12EXPORT_SYMBOL(__ashldi3);
13EXPORT_SYMBOL(__ashrdi3);
14EXPORT_SYMBOL(__lshrdi3);
15EXPORT_SYMBOL(__muldi3);
16
diff --git a/arch/m68k/kernel/m68k_ksyms_no.c b/arch/m68k/kernel/m68k_ksyms_no.c
deleted file mode 100644
index db6f87aa0a7f..000000000000
--- a/arch/m68k/kernel/m68k_ksyms_no.c
+++ /dev/null
@@ -1,44 +0,0 @@
1#include <linux/module.h>
2#include <linux/linkage.h>
3#include <linux/sched.h>
4#include <linux/string.h>
5#include <linux/mm.h>
6#include <linux/user.h>
7#include <linux/elfcore.h>
8#include <linux/in6.h>
9#include <linux/interrupt.h>
10
11#include <asm/setup.h>
12#include <asm/machdep.h>
13#include <asm/pgalloc.h>
14#include <asm/irq.h>
15#include <asm/io.h>
16#include <asm/checksum.h>
17#include <asm/current.h>
18
19/*
20 * libgcc functions - functions that are used internally by the
21 * compiler... (prototypes are not correct though, but that
22 * doesn't really matter since they're not versioned).
23 */
24extern void __ashldi3(void);
25extern void __ashrdi3(void);
26extern void __divsi3(void);
27extern void __lshrdi3(void);
28extern void __modsi3(void);
29extern void __muldi3(void);
30extern void __mulsi3(void);
31extern void __udivsi3(void);
32extern void __umodsi3(void);
33
34 /* gcc lib functions */
35EXPORT_SYMBOL(__ashldi3);
36EXPORT_SYMBOL(__ashrdi3);
37EXPORT_SYMBOL(__divsi3);
38EXPORT_SYMBOL(__lshrdi3);
39EXPORT_SYMBOL(__modsi3);
40EXPORT_SYMBOL(__muldi3);
41EXPORT_SYMBOL(__mulsi3);
42EXPORT_SYMBOL(__udivsi3);
43EXPORT_SYMBOL(__umodsi3);
44