m68k: merge and clean up of arch/m68k/kernel/m68k_ksyms*.c files
Subsystems (2)
cover m68k: merge and clean up of arch/m68k/kernel/m68k_ksyms*.c files
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.
PATCH 1/5 m68knommu: move EXPORT of dump_fpu to function definition
From: Greg Ungerer <[email protected]>
The EXPORT_SYMBOL(dump_fpu) belongs at the definition of the function, not in some other random code file. So move it there.
--- arch/m68k/kernel/m68k_ksyms_no.c | 4 ---- arch/m68k/kernel/process_no.c | 1 + 2 files changed, 1 insertions(+), 4 deletions(-)
arch/m68k/kernel/m68k_ksyms_no.c +0 -4
@@ -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);
arch/m68k/kernel/process_no.c +1 -0
@@ -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.
Signature · 1 line
1.7.0.4
PATCH 2/5 m68knommu: move EXPORT of local checksumming functions to definitions
From: Greg Ungerer <[email protected]>
The EXPORT_SYMBOL() of the local lib checksum functions belongs with the definitions, not in some other random code file. So move then there.
--- arch/m68k/kernel/m68k_ksyms_no.c | 5 ----- arch/m68k/lib/checksum_no.c | 3 +++ 2 files changed, 3 insertions(+), 5 deletions(-)
arch/m68k/kernel/m68k_ksyms_no.c +0 -5
@@ -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
arch/m68k/lib/checksum_no.c +3 -0
@@ -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);
Signature · 1 line
1.7.0.4
PATCH 3/5 m68knommu: move EXPORT of kernel_thread to function definition
From: Greg Ungerer <[email protected]>
The EXPORT_SYMBOL(kernel_thread) belongs at the definition of that function, not in some other random code file. So move it there.
--- arch/m68k/kernel/m68k_ksyms_no.c | 4 ---- arch/m68k/kernel/process_no.c | 1 + 2 files changed, 1 insertions(+), 4 deletions(-)
arch/m68k/kernel/m68k_ksyms_no.c +0 -4
@@ -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
arch/m68k/kernel/process_no.c +1 -0
@@ -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 ) {
Signature · 1 line
1.7.0.4
PATCH 4/5 m68knommu: remove un-needed exporting of COLDFIRE symbols
From: Greg Ungerer <[email protected]>
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.
--- arch/m68k/kernel/m68k_ksyms_no.c | 12 ------------ arch/m68k/platform/coldfire/dma.c | 3 +++ 2 files changed, 3 insertions(+), 12 deletions(-)
arch/m68k/kernel/m68k_ksyms_no.c +0 -12
@@ -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 */
arch/m68k/platform/coldfire/dma.c +3 -0
@@ -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);/***************************************************************************/
Signature · 1 line
1.7.0.4
PATCH 5/5 m68k: merge non-mmu and mmu versions of m68k_ksyms.c
From: Greg Ungerer <[email protected]>
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.
--- 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
arch/m68k/kernel/m68k_ksyms.c +31 -4
@@ -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
arch/m68k/kernel/m68k_ksyms_mm.c deleted +0 -16
@@ -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); -
arch/m68k/kernel/m68k_ksyms_no.c deleted +0 -44
44 lines not on this page · raw message
Signature · 1 line
1.7.0.4
Geert Uytterhoeven
maintainerRe: [PATCH 5/5] m68k: merge non-mmu and mmu versions of m68k_ksyms.c
Quoted 1 line · On Thu, Apr 21, 2011 at 02:48, <[email protected]> wrote:
+#ifndef
CONFIG_MMU
While we're at it, that should also be a test for not '020-'060/CPU32?
Quoted 14 lines
arch/m68k/kernel/m68k_ksyms.c +14
-0+/* +* 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);
Quoted 1 line
#endif
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
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
Re: Re: [PATCH 5/5] m68k: merge non-mmu and mmu versions of m68k_ksyms.c
Quoted 4 lines · Geert Uytterhoeven
Quoted 1 line · On Thu, Apr 21, 2011 at 02:48, <[email protected]> wrote:
+#ifndef
CONFIG_MMUWhile 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.
Quoted 16 lines
Quoted 15 lines
arch/m68k/kernel/m68k_ksyms.c +14
-0+/* +* 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);Quoted 1 line
#endif
Philippe
_______________________________________________
uClinux-dev mailing list [email protected]
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by [email protected] To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev
Re: [uClinux-dev] Re: [PATCH 5/5] m68k: merge non-mmu and mmu versions of m68k_ksyms.c
Quoted 10 lines · Philippe De Muyter
Quoted 4 lines · Geert Uytterhoeven
Quoted 1 line · On Thu, Apr 21, 2011 at 02:48,<[email protected]> wrote:
+#ifndef
CONFIG_MMUWhile 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_MMUfor 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
Quoted 20 lines
Quoted 7 lines
Quoted 7 lines
arch/m68k/kernel/m68k_ksyms.c +7
-0+/* +* 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 );Quoted 8 lines
Quoted 8 lines
arch/m68k/kernel/m68k_ksyms.c +7
-0+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
Signature · 5 lines
------------------------------------------------------------------------ Greg Ungerer -- Principal Engineer EMAIL: [email protected] 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