* [PATCH 0/5] m68k: merge and clean up of arch/m68k/kernel/m68k_ksyms*.c files
@ 2011-04-21 0:48 gerg
2011-04-21 0:48 ` [PATCH 1/5] m68knommu: move EXPORT of dump_fpu to function definition gerg
0 siblings, 1 reply; 9+ messages in thread
From: gerg @ 2011-04-21 0:48 UTC (permalink / raw)
To: linux-m68k, uclinux-dev
The following patch series prepares for, and does, merging of the mmu
and non-mmu versions of m68k_ksyms.c. Most of it is really a cleanup
of the m68knommu symbol exporting. In the end the merge of the
m68k_ksyms_mm.c and m68k_ksyms_no.c is pretty simple.
Build and run tested on ARAnyM and ColdFire targets.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 1/5] m68knommu: move EXPORT of dump_fpu to function definition
2011-04-21 0:48 [PATCH 0/5] m68k: merge and clean up of arch/m68k/kernel/m68k_ksyms*.c files gerg
@ 2011-04-21 0:48 ` gerg
2011-04-21 0:48 ` [PATCH 2/5] m68knommu: move EXPORT of local checksumming functions to definitions gerg
0 siblings, 1 reply; 9+ messages in thread
From: gerg @ 2011-04-21 0:48 UTC (permalink / raw)
To: linux-m68k, uclinux-dev; +Cc: Greg Ungerer
From: Greg Ungerer <gerg@uclinux.org>
The EXPORT_SYMBOL(dump_fpu) belongs at the definition of the function,
not in some other random code file. So move it there.
Signed-off-by: Greg Ungerer <gerg@uclinux.org>
---
arch/m68k/kernel/m68k_ksyms_no.c | 4 ----
arch/m68k/kernel/process_no.c | 1 +
2 files changed, 1 insertions(+), 4 deletions(-)
diff --git a/arch/m68k/kernel/m68k_ksyms_no.c b/arch/m68k/kernel/m68k_ksyms_no.c
index c26717b..ab747e4 100644
--- a/arch/m68k/kernel/m68k_ksyms_no.c
+++ b/arch/m68k/kernel/m68k_ksyms_no.c
@@ -16,12 +16,8 @@
#include <asm/checksum.h>
#include <asm/current.h>
-extern int dump_fpu(struct pt_regs *, elf_fpregset_t *);
-
/* platform dependent support */
-EXPORT_SYMBOL(dump_fpu);
-
EXPORT_SYMBOL(ip_fast_csum);
EXPORT_SYMBOL(kernel_thread);
diff --git a/arch/m68k/kernel/process_no.c b/arch/m68k/kernel/process_no.c
index e2a63af..eedadc2 100644
--- a/arch/m68k/kernel/process_no.c
+++ b/arch/m68k/kernel/process_no.c
@@ -283,6 +283,7 @@ int dump_fpu(struct pt_regs *regs, struct user_m68kfp_struct *fpu)
#endif
return 1;
}
+EXPORT_SYMBOL(dump_fpu);
/*
* Generic dumping code. Used for panic and debug.
--
1.7.0.4
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 2/5] m68knommu: move EXPORT of local checksumming functions to definitions
2011-04-21 0:48 ` [PATCH 1/5] m68knommu: move EXPORT of dump_fpu to function definition gerg
@ 2011-04-21 0:48 ` gerg
2011-04-21 0:48 ` [PATCH 3/5] m68knommu: move EXPORT of kernel_thread to function definition gerg
0 siblings, 1 reply; 9+ messages in thread
From: gerg @ 2011-04-21 0:48 UTC (permalink / raw)
To: linux-m68k, uclinux-dev; +Cc: Greg Ungerer
From: Greg Ungerer <gerg@uclinux.org>
The EXPORT_SYMBOL() of the local lib checksum functions belongs with
the definitions, not in some other random code file. So move then there.
Signed-off-by: Greg Ungerer <gerg@uclinux.org>
---
arch/m68k/kernel/m68k_ksyms_no.c | 5 -----
arch/m68k/lib/checksum_no.c | 3 +++
2 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/arch/m68k/kernel/m68k_ksyms_no.c b/arch/m68k/kernel/m68k_ksyms_no.c
index ab747e4..daed932 100644
--- a/arch/m68k/kernel/m68k_ksyms_no.c
+++ b/arch/m68k/kernel/m68k_ksyms_no.c
@@ -18,13 +18,8 @@
/* platform dependent support */
-EXPORT_SYMBOL(ip_fast_csum);
-
EXPORT_SYMBOL(kernel_thread);
-/* Networking helper routines. */
-EXPORT_SYMBOL(csum_partial_copy_nocheck);
-
/*
* libgcc functions - functions that are used internally by the
* compiler... (prototypes are not correct though, but that
diff --git a/arch/m68k/lib/checksum_no.c b/arch/m68k/lib/checksum_no.c
index eccf25d..e4c6354 100644
--- a/arch/m68k/lib/checksum_no.c
+++ b/arch/m68k/lib/checksum_no.c
@@ -101,6 +101,7 @@ __sum16 ip_fast_csum(const void *iph, unsigned int ihl)
{
return (__force __sum16)~do_csum(iph,ihl*4);
}
+EXPORT_SYMBOL(ip_fast_csum);
#endif
/*
@@ -140,6 +141,7 @@ csum_partial_copy_from_user(const void __user *src, void *dst,
memcpy(dst, (__force const void *)src, len);
return csum_partial(dst, len, sum);
}
+EXPORT_SYMBOL(csum_partial_copy_from_user);
/*
* copy from ds while checksumming, otherwise like csum_partial
@@ -151,3 +153,4 @@ csum_partial_copy_nocheck(const void *src, void *dst, int len, __wsum sum)
memcpy(dst, src, len);
return csum_partial(dst, len, sum);
}
+EXPORT_SYMBOL(csum_partial_copy_nocheck);
--
1.7.0.4
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 3/5] m68knommu: move EXPORT of kernel_thread to function definition
2011-04-21 0:48 ` [PATCH 2/5] m68knommu: move EXPORT of local checksumming functions to definitions gerg
@ 2011-04-21 0:48 ` gerg
2011-04-21 0:48 ` [PATCH 4/5] m68knommu: remove un-needed exporting of COLDFIRE symbols gerg
0 siblings, 1 reply; 9+ messages in thread
From: gerg @ 2011-04-21 0:48 UTC (permalink / raw)
To: linux-m68k, uclinux-dev; +Cc: Greg Ungerer
From: Greg Ungerer <gerg@uclinux.org>
The EXPORT_SYMBOL(kernel_thread) belongs at the definition of that function,
not in some other random code file. So move it there.
Signed-off-by: Greg Ungerer <gerg@uclinux.org>
---
arch/m68k/kernel/m68k_ksyms_no.c | 4 ----
arch/m68k/kernel/process_no.c | 1 +
2 files changed, 1 insertions(+), 4 deletions(-)
diff --git a/arch/m68k/kernel/m68k_ksyms_no.c b/arch/m68k/kernel/m68k_ksyms_no.c
index daed932..11effaa 100644
--- a/arch/m68k/kernel/m68k_ksyms_no.c
+++ b/arch/m68k/kernel/m68k_ksyms_no.c
@@ -16,10 +16,6 @@
#include <asm/checksum.h>
#include <asm/current.h>
-/* platform dependent support */
-
-EXPORT_SYMBOL(kernel_thread);
-
/*
* libgcc functions - functions that are used internally by the
* compiler... (prototypes are not correct though, but that
diff --git a/arch/m68k/kernel/process_no.c b/arch/m68k/kernel/process_no.c
index eedadc2..9b86ad1 100644
--- a/arch/m68k/kernel/process_no.c
+++ b/arch/m68k/kernel/process_no.c
@@ -151,6 +151,7 @@ int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags)
set_fs(fs);
return retval;
}
+EXPORT_SYMBOL(kernel_thread);
void flush_thread(void)
{
--
1.7.0.4
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 4/5] m68knommu: remove un-needed exporting of COLDFIRE symbols
2011-04-21 0:48 ` [PATCH 3/5] m68knommu: move EXPORT of kernel_thread to function definition gerg
@ 2011-04-21 0:48 ` gerg
2011-04-21 0:48 ` [PATCH 5/5] m68k: merge non-mmu and mmu versions of m68k_ksyms.c gerg
0 siblings, 1 reply; 9+ messages in thread
From: gerg @ 2011-04-21 0:48 UTC (permalink / raw)
To: linux-m68k, uclinux-dev; +Cc: Greg Ungerer
From: Greg Ungerer <gerg@uclinux.org>
There is no reason most of the symbols enclosed in a conditional
on CONFIG_COLDFIRE need to be exported. And they sure don't need to
be doing it in m68k_ksyms_no.c. Move the dma symbols export (which
are currently needed) to the definitions of those, and remove the
rest of the exporting here.
Signed-off-by: Greg Ungerer <gerg@uclinux.org>
---
arch/m68k/kernel/m68k_ksyms_no.c | 12 ------------
arch/m68k/platform/coldfire/dma.c | 3 +++
2 files changed, 3 insertions(+), 12 deletions(-)
diff --git a/arch/m68k/kernel/m68k_ksyms_no.c b/arch/m68k/kernel/m68k_ksyms_no.c
index 11effaa..db6f87a 100644
--- a/arch/m68k/kernel/m68k_ksyms_no.c
+++ b/arch/m68k/kernel/m68k_ksyms_no.c
@@ -42,15 +42,3 @@ EXPORT_SYMBOL(__mulsi3);
EXPORT_SYMBOL(__udivsi3);
EXPORT_SYMBOL(__umodsi3);
-#ifdef CONFIG_COLDFIRE
-extern unsigned int *dma_device_address;
-extern unsigned long dma_base_addr, _ramend;
-EXPORT_SYMBOL(dma_base_addr);
-EXPORT_SYMBOL(dma_device_address);
-EXPORT_SYMBOL(_ramend);
-
-extern asmlinkage void trap(void);
-extern void *_ramvec;
-EXPORT_SYMBOL(trap);
-EXPORT_SYMBOL(_ramvec);
-#endif /* CONFIG_COLDFIRE */
diff --git a/arch/m68k/platform/coldfire/dma.c b/arch/m68k/platform/coldfire/dma.c
index e88b95e..df5ce20 100644
--- a/arch/m68k/platform/coldfire/dma.c
+++ b/arch/m68k/platform/coldfire/dma.c
@@ -9,6 +9,7 @@
/***************************************************************************/
#include <linux/kernel.h>
+#include <linux/module.h>
#include <asm/dma.h>
#include <asm/coldfire.h>
#include <asm/mcfsim.h>
@@ -33,7 +34,9 @@ unsigned int dma_base_addr[MAX_M68K_DMA_CHANNELS] = {
MCFDMA_BASE3,
#endif
};
+EXPORT_SYMBOL(dma_base_addr);
unsigned int dma_device_address[MAX_M68K_DMA_CHANNELS];
+EXPORT_SYMBOL(dma_device_address);
/***************************************************************************/
--
1.7.0.4
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 5/5] m68k: merge non-mmu and mmu versions of m68k_ksyms.c
2011-04-21 0:48 ` [PATCH 4/5] m68knommu: remove un-needed exporting of COLDFIRE symbols gerg
@ 2011-04-21 0:48 ` gerg
2011-04-21 8:16 ` Geert Uytterhoeven
0 siblings, 1 reply; 9+ messages in thread
From: gerg @ 2011-04-21 0:48 UTC (permalink / raw)
To: linux-m68k, uclinux-dev; +Cc: Greg Ungerer
From: Greg Ungerer <gerg@uclinux.org>
After cleaning up m68k_ksyms_no.c it is now strait forward to merge
the non-mmu and mmu versions of m68k_ksyms.c. So do it.
Signed-off-by: Greg Ungerer <gerg@uclinux.org>
---
arch/m68k/kernel/m68k_ksyms.c | 35 ++++++++++++++++++++++++++---
arch/m68k/kernel/m68k_ksyms_mm.c | 16 -------------
arch/m68k/kernel/m68k_ksyms_no.c | 44 --------------------------------------
3 files changed, 31 insertions(+), 64 deletions(-)
delete mode 100644 arch/m68k/kernel/m68k_ksyms_mm.c
delete mode 100644 arch/m68k/kernel/m68k_ksyms_no.c
diff --git a/arch/m68k/kernel/m68k_ksyms.c b/arch/m68k/kernel/m68k_ksyms.c
index 4752c28..3e23913 100644
--- a/arch/m68k/kernel/m68k_ksyms.c
+++ b/arch/m68k/kernel/m68k_ksyms.c
@@ -1,5 +1,32 @@
-#ifdef CONFIG_MMU
-#include "m68k_ksyms_mm.c"
-#else
-#include "m68k_ksyms_no.c"
+#include <linux/module.h>
+
+asmlinkage long long __ashldi3 (long long, int);
+asmlinkage long long __ashrdi3 (long long, int);
+asmlinkage long long __lshrdi3 (long long, int);
+asmlinkage long long __muldi3 (long long, long long);
+
+/* The following are special because they're not called
+ explicitly (the C compiler generates them). Fortunately,
+ their interface isn't gonna change any time soon now, so
+ it's OK to leave it out of version control. */
+EXPORT_SYMBOL(__ashldi3);
+EXPORT_SYMBOL(__ashrdi3);
+EXPORT_SYMBOL(__lshrdi3);
+EXPORT_SYMBOL(__muldi3);
+
+#ifndef CONFIG_MMU
+/*
+ * Simpler 68k and ColdFire parts also need a few other gcc functions.
+ */
+extern long long __divsi3(long long, long long);
+extern long long __modsi3(long long, long long);
+extern long long __mulsi3(long long, long long);
+extern long long __udivsi3(long long, long long);
+extern long long __umodsi3(long long, long long);
+
+EXPORT_SYMBOL(__divsi3);
+EXPORT_SYMBOL(__modsi3);
+EXPORT_SYMBOL(__mulsi3);
+EXPORT_SYMBOL(__udivsi3);
+EXPORT_SYMBOL(__umodsi3);
#endif
diff --git a/arch/m68k/kernel/m68k_ksyms_mm.c b/arch/m68k/kernel/m68k_ksyms_mm.c
deleted file mode 100644
index d900e77..0000000
--- a/arch/m68k/kernel/m68k_ksyms_mm.c
+++ /dev/null
@@ -1,16 +0,0 @@
-#include <linux/module.h>
-
-asmlinkage long long __ashldi3 (long long, int);
-asmlinkage long long __ashrdi3 (long long, int);
-asmlinkage long long __lshrdi3 (long long, int);
-asmlinkage long long __muldi3 (long long, long long);
-
-/* The following are special because they're not called
- explicitly (the C compiler generates them). Fortunately,
- their interface isn't gonna change any time soon now, so
- it's OK to leave it out of version control. */
-EXPORT_SYMBOL(__ashldi3);
-EXPORT_SYMBOL(__ashrdi3);
-EXPORT_SYMBOL(__lshrdi3);
-EXPORT_SYMBOL(__muldi3);
-
diff --git a/arch/m68k/kernel/m68k_ksyms_no.c b/arch/m68k/kernel/m68k_ksyms_no.c
deleted file mode 100644
index db6f87a..0000000
--- a/arch/m68k/kernel/m68k_ksyms_no.c
+++ /dev/null
@@ -1,44 +0,0 @@
-#include <linux/module.h>
-#include <linux/linkage.h>
-#include <linux/sched.h>
-#include <linux/string.h>
-#include <linux/mm.h>
-#include <linux/user.h>
-#include <linux/elfcore.h>
-#include <linux/in6.h>
-#include <linux/interrupt.h>
-
-#include <asm/setup.h>
-#include <asm/machdep.h>
-#include <asm/pgalloc.h>
-#include <asm/irq.h>
-#include <asm/io.h>
-#include <asm/checksum.h>
-#include <asm/current.h>
-
-/*
- * libgcc functions - functions that are used internally by the
- * compiler... (prototypes are not correct though, but that
- * doesn't really matter since they're not versioned).
- */
-extern void __ashldi3(void);
-extern void __ashrdi3(void);
-extern void __divsi3(void);
-extern void __lshrdi3(void);
-extern void __modsi3(void);
-extern void __muldi3(void);
-extern void __mulsi3(void);
-extern void __udivsi3(void);
-extern void __umodsi3(void);
-
- /* gcc lib functions */
-EXPORT_SYMBOL(__ashldi3);
-EXPORT_SYMBOL(__ashrdi3);
-EXPORT_SYMBOL(__divsi3);
-EXPORT_SYMBOL(__lshrdi3);
-EXPORT_SYMBOL(__modsi3);
-EXPORT_SYMBOL(__muldi3);
-EXPORT_SYMBOL(__mulsi3);
-EXPORT_SYMBOL(__udivsi3);
-EXPORT_SYMBOL(__umodsi3);
-
--
1.7.0.4
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH 5/5] m68k: merge non-mmu and mmu versions of m68k_ksyms.c
2011-04-21 0:48 ` [PATCH 5/5] m68k: merge non-mmu and mmu versions of m68k_ksyms.c gerg
@ 2011-04-21 8:16 ` Geert Uytterhoeven
2011-04-21 8:32 ` Philippe De Muyter
0 siblings, 1 reply; 9+ messages in thread
From: Geert Uytterhoeven @ 2011-04-21 8:16 UTC (permalink / raw)
To: gerg; +Cc: linux-m68k, uclinux-dev, Greg Ungerer
On Thu, Apr 21, 2011 at 02:48, <gerg@snapgear.com> wrote:
> +#ifndef CONFIG_MMU
While we're at it, that should also be a test for not '020-'060/CPU32?
> +/*
> + * Simpler 68k and ColdFire parts also need a few other gcc functions.
> + */
> +extern long long __divsi3(long long, long long);
> +extern long long __modsi3(long long, long long);
> +extern long long __mulsi3(long long, long long);
> +extern long long __udivsi3(long long, long long);
> +extern long long __umodsi3(long long, long long);
> +
> +EXPORT_SYMBOL(__divsi3);
> +EXPORT_SYMBOL(__modsi3);
> +EXPORT_SYMBOL(__mulsi3);
> +EXPORT_SYMBOL(__udivsi3);
> +EXPORT_SYMBOL(__umodsi3);
> #endif
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Re: [PATCH 5/5] m68k: merge non-mmu and mmu versions of m68k_ksyms.c
2011-04-21 8:16 ` Geert Uytterhoeven
@ 2011-04-21 8:32 ` Philippe De Muyter
2011-04-21 9:28 ` [uClinux-dev] " Greg Ungerer
0 siblings, 1 reply; 9+ messages in thread
From: Philippe De Muyter @ 2011-04-21 8:32 UTC (permalink / raw)
To: uClinux development list; +Cc: linux-m68k, Greg Ungerer
On Thu, Apr 21, 2011 at 10:16:01AM +0200, Geert Uytterhoeven wrote:
> On Thu, Apr 21, 2011 at 02:48, <gerg@snapgear.com> wrote:
> > +#ifndef CONFIG_MMU
>
> While we're at it, that should also be a test for not '020-'060/CPU32?
You beat me on this :)
You're abolutely right, we may not test on CONFIG_MMU for mmu-capable
coldfires, but which do lack 32x32->64 mulu and friends.
>
> > +/*
> > + * Simpler 68k and ColdFire parts also need a few other gcc functions.
> > + */
> > +extern long long __divsi3(long long, long long);
> > +extern long long __modsi3(long long, long long);
> > +extern long long __mulsi3(long long, long long);
> > +extern long long __udivsi3(long long, long long);
> > +extern long long __umodsi3(long long, long long);
> > +
> > +EXPORT_SYMBOL(__divsi3);
> > +EXPORT_SYMBOL(__modsi3);
> > +EXPORT_SYMBOL(__mulsi3);
> > +EXPORT_SYMBOL(__udivsi3);
> > +EXPORT_SYMBOL(__umodsi3);
> > #endif
Philippe
_______________________________________________
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [uClinux-dev] Re: [PATCH 5/5] m68k: merge non-mmu and mmu versions of m68k_ksyms.c
2011-04-21 8:32 ` Philippe De Muyter
@ 2011-04-21 9:28 ` Greg Ungerer
0 siblings, 0 replies; 9+ messages in thread
From: Greg Ungerer @ 2011-04-21 9:28 UTC (permalink / raw)
To: Philippe De Muyter; +Cc: uClinux development list, linux-m68k, Greg Ungerer
On 21/04/11 18:32, Philippe De Muyter wrote:
> On Thu, Apr 21, 2011 at 10:16:01AM +0200, Geert Uytterhoeven wrote:
>> On Thu, Apr 21, 2011 at 02:48,<gerg@snapgear.com> wrote:
>>> +#ifndef CONFIG_MMU
>>
>> While we're at it, that should also be a test for not '020-'060/CPU32?
>
> You beat me on this :)
>
> You're abolutely right, we may not test on CONFIG_MMU for mmu-capable
> coldfires, but which do lack 32x32->64 mulu and friends.
Yep, this should be the same. And I was trying to be careful
and get these right :-(
I'll fix it.
Thanks
Greg
>>> +/*
>>> + * Simpler 68k and ColdFire parts also need a few other gcc functions.
>>> + */
>>> +extern long long __divsi3(long long, long long);
>>> +extern long long __modsi3(long long, long long);
>>> +extern long long __mulsi3(long long, long long);
>>> +extern long long __udivsi3(long long, long long);
>>> +extern long long __umodsi3(long long, long long);
>>> +
>>> +EXPORT_SYMBOL(__divsi3);
>>> +EXPORT_SYMBOL(__modsi3);
>>> +EXPORT_SYMBOL(__mulsi3);
>>> +EXPORT_SYMBOL(__udivsi3);
>>> +EXPORT_SYMBOL(__umodsi3);
>>> á#endif
>
> Philippe
>
>
>
--
------------------------------------------------------------------------
Greg Ungerer -- Principal Engineer EMAIL: gerg@snapgear.com
SnapGear Group, McAfee PHONE: +61 7 3435 2888
8 Gardner Close FAX: +61 7 3217 5323
Milton, QLD, 4064, Australia WEB: http://www.SnapGear.com
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2011-04-21 9:30 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-21 0:48 [PATCH 0/5] m68k: merge and clean up of arch/m68k/kernel/m68k_ksyms*.c files gerg
2011-04-21 0:48 ` [PATCH 1/5] m68knommu: move EXPORT of dump_fpu to function definition gerg
2011-04-21 0:48 ` [PATCH 2/5] m68knommu: move EXPORT of local checksumming functions to definitions gerg
2011-04-21 0:48 ` [PATCH 3/5] m68knommu: move EXPORT of kernel_thread to function definition gerg
2011-04-21 0:48 ` [PATCH 4/5] m68knommu: remove un-needed exporting of COLDFIRE symbols gerg
2011-04-21 0:48 ` [PATCH 5/5] m68k: merge non-mmu and mmu versions of m68k_ksyms.c gerg
2011-04-21 8:16 ` Geert Uytterhoeven
2011-04-21 8:32 ` Philippe De Muyter
2011-04-21 9:28 ` [uClinux-dev] " Greg Ungerer
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.