kill most of sparc_ksyms*
I gave Julian the receipe but he has focus on the prom_ stuff, so I decided to give it a spin.
I ended up with three largish patches. I could have made them smaller but this is trivial stuff so I could not see any real benefit doing so.
Agreed that review would be easier but I hope this is OK.
I left the prom* stuff in the files to avoid to much conflict with Julian's ongoing work.
When Julian has done the prom* stuff we should merge the two sparc_ksyms_*.c files to a single ksyms.c file.
Note the I decided to create a new file in arch/sparc/lib to hold the exported symbols in that directory. This is not common practice today but IMO better to have the EXPORT in same dir as the definition of the symbol.
Sam
Sam Ravnborg (3):
sparc: move EXPORT_SYMBOL from kernel/ to lib/
sparc: move EXPORT_SYMBOL to the symbols definition
sparc64: move EXPORT_SYMBOL to the symbols definition
arch/sparc/kernel/auxio_32.c | 3 +- arch/sparc/kernel/auxio_64.c | 2 + arch/sparc/kernel/cpu.c | 2 + arch/sparc/kernel/ioport.c | 15 +++ arch/sparc/kernel/irq_32.c | 1 + arch/sparc/kernel/pci.c | 1 + arch/sparc/kernel/pcic.c | 6 + arch/sparc/kernel/process_32.c | 2 + arch/sparc/kernel/process_64.c | 2 + arch/sparc/kernel/sbus.c | 1 + arch/sparc/kernel/setup_32.c | 3 + arch/sparc/kernel/setup_64.c | 3 + arch/sparc/kernel/sparc_ksyms_32.c | 193 +--------------------------------- arch/sparc/kernel/sparc_ksyms_64.c | 203 +----------------------------------- arch/sparc/kernel/sys_sparc_64.c | 1 + arch/sparc/kernel/time_32.c | 2 + arch/sparc/kernel/time_64.c | 2 + arch/sparc/kernel/traps_32.c | 1 + arch/sparc/kernel/traps_64.c | 2 + arch/sparc/lib/Makefile | 1 + arch/sparc/lib/PeeCeeI.c | 7 +- arch/sparc/lib/ksyms.c | 180 ++++++++++++++++++++++++++++++++ arch/sparc/lib/user_fixup.c | 3 + arch/sparc/mm/generic_32.c | 1 + arch/sparc/mm/generic_64.c | 1 + arch/sparc/mm/highmem.c | 2 + arch/sparc/mm/init_32.c | 6 + arch/sparc/mm/init_64.c | 4 + 28 files changed, 261 insertions(+), 389 deletions(-)
Quoted 13 lines · Sam Ravnborg
I gave Julian the receipe but he has focus on the
prom_stuff, so I decided to give it a spin.I ended up with three largish patches. I could have made them smaller but this is trivial stuff so I could not see any real benefit doing so.
Agreed that review would be easier but I hope this is OK.I left the prom* stuff in the files to avoid to much conflict with Julian's ongoing work.
When Julian has done the prom* stuff we should merge the two sparc_ksyms_*.c files to a singleksyms.cfile.
Quoted 4 lines
Note the I decided to create a new file in
arch/sparc/libto hold the exported symbols in that directory. This is not common practice today but IMO better to have the EXPORT in same dir as the definition of the symbol.
Disregard this serie. I bug sneaked in on sparc64. I will resubmit later this week.
Sam
David Miller
maintainerFrom: Sam Ravnborg <[email protected]>
Date: Mon, 5 Jan 2009 21:36:46 +0100
Quoted 2 lines
Disregard this serie. I bug sneaked in on sparc64. I will resubmit later this week.
If you tell me what the problem is, I might fix it up myself :-)
Quoted 8 lines · David Miller
From: Sam Ravnborg <[email protected]>
Date: Mon, 5 Jan 2009 21:36:46 +0100Quoted 2 lines
Disregard this serie. I bug sneaked in on sparc64. I will resubmit later this week.
If you tell me what the problem is, I might fix it up myself :-)
So far I found a missing include:
arch/sparc/kernel/sys_sparc_64.c +1 -0
@@ -5,6 +5,7 @@* platform. */ +#include <linux/module.h> #include <linux/errno.h> #include <linux/types.h> #include <linux/sched.h>
But it troubles me that I cannot explain why this happened. I did a rebase of the set and I may have just lost this change as I recall I made it once before.
Or maybe I just lost is because I had commented out -Werror due to the branch_tracer issues.
Trying to build a vmlinux image from an allmodconfig at the moment. But it is getting late..
Sam
Quoted 26 lines · Sam Ravnborg
Quoted 8 lines · David Miller
From: Sam Ravnborg <[email protected]>
Date: Mon, 5 Jan 2009 21:36:46 +0100Quoted 2 lines
Disregard this serie. I bug sneaked in on sparc64. I will resubmit later this week.
If you tell me what the problem is, I might fix it up myself :-)
So far I found a missing include:
arch/sparc/kernel/sys_sparc_64.c +1
-0@@ -5,6 +5,7 @@* platform. */ +#include <linux/module.h> #include <linux/errno.h> #include <linux/types.h> #include <linux/sched.h>
Quoted 8 lines
But it troubles me that I cannot explain why this happened. I did a rebase of the set and I may have just lost this change as I recall I made it once before.
Or maybe I just lost is because I had commented out -Werror due to thebranch_tracerissues.Trying to build a vmlinux image from an allmodconfig at the moment. But it is getting late..
And there was more fallout...
I one had asm/xor.h included but this is a no-no as it define variables. So I had to duplicate some extern definitions to build ksyms on sparc64.
arch/sparc/lib/ksyms.c +19 -0
@@ -11,6 +11,7 @@#include <asm/checksum.h> #include <asm/uaccess.h> +#include <asm/ftrace.h> /* string functions */ EXPORT_SYMBOL (strlen);
@@ -120,6 +121,24 @@ EXPORT_SYMBOL(_Udiv);* sparc64 */ #ifdef CONFIG_SPARC64 + +/* copied from asm/xor.h. We cannot include that file as is define variables */ +extern void xor_vis_2 (unsigned long ,unsigned long *,unsigned long *); +extern void xor_vis_3 (unsigned long ,unsigned long *,unsigned long *, +unsigned long *); +extern void xor_vis_4 (unsigned long ,unsigned long *,unsigned long *, +unsigned long *,unsigned long *); +extern void xor_vis_5 (unsigned long ,unsigned long *,unsigned long *, +unsigned long *,unsigned long *,unsigned long *); + +extern void xor_niagara_2 (unsigned long ,unsigned long *,unsigned long *); +extern void xor_niagara_3 (unsigned long ,unsigned long *,unsigned long *, +unsigned long *); +extern void xor_niagara_4 (unsigned long ,unsigned long *,unsigned long *, +unsigned long *,unsigned long *); +extern void xor_niagara_5 (unsigned long ,unsigned long *,unsigned long *, +unsigned long *,unsigned long *,unsigned long *); +/* Networking helper routines. */ EXPORT_SYMBOL (csum_partial_copy_nocheck);EXPORT_SYMBOL (__csum_partial_copy_from_user);
I have not yet succeeded building a sparc64 vmlinux based on a allmodconfig. But I am getting closer...
sparc also causes me some troubles due to the branch_tracer stuff... And it has an ugly bug due to stripping of vmlinux too...
Sam
And with the following I finally managed to build a vmlinux:
arch/sparc/lib/PeeCeeI.c +2 -0
@@ -4,6 +4,8 @@* Copyright (C) 1997 David S. Miller ([email protected]) */ +#include <linux/module.h> +#include <asm/io.h> #include <asm/byteorder.h>
arch/sparc/lib/user_fixup.c +1 -0
@@ -4,6 +4,7 @@*/ #include <linux/compiler.h> +#include <linux/module.h> #include <linux/kernel.h> #include <linux/string.h> #include <linux/errno.h>
Ashaming amount of issues - sorry!
Sam
Quoted 2 lines · Sam Ravnborg
I gave Julian the receipe but he has focus on the
prom_stuff, so I decided to give it a spin.
It's been in the back of my mind, but I've focused on unifying oplib.h first, then unifying arch/sparc/prom/* then following what you suggested to *eliminate* sparc_ksyms_*.c
As for going softly softly around the prom_* stuff, don't worry about it, I've barely started working on that. I'm still cleaning up the existing code to make it possible to unify it.
If you don't (want to) make a patch to finish this work, I'll handle it when I get home tonight.
Thanks,
Signature · 3 lines
Julian Calaby Email: [email protected]