aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc64
diff options
context:
space:
mode:
authorDavid S. Miller <davem@sunset.davemloft.net>2006-09-25 17:00:45 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2006-09-25 19:39:55 -0400
commita4c0291aa942dceddabe23bf2b74addb958d0964 (patch)
tree09aa49ecb42475203b7c64a9f0cbc9e2700367c6 /arch/sparc64
parenta6d967a485c67ec8a1276261f39d81ace6a3e308 (diff)
[SPARC64]: Fix section-mismatch errors in solaris emul module.
init_socksys() was marked __init but invoked from a non-__init function. Use the correct module_{init,exit}() faciltiies while we're here and eliminate some seriously bogus ifdefs. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc64')
-rw-r--r--arch/sparc64/solaris/misc.c20
-rw-r--r--arch/sparc64/solaris/socksys.c6
2 files changed, 6 insertions, 20 deletions
diff --git a/arch/sparc64/solaris/misc.c b/arch/sparc64/solaris/misc.c
index 8135ec322c9c..642541769a17 100644
--- a/arch/sparc64/solaris/misc.c
+++ b/arch/sparc64/solaris/misc.c
@@ -736,20 +736,15 @@ struct exec_domain solaris_exec_domain = {
736 736
737extern int init_socksys(void); 737extern int init_socksys(void);
738 738
739#ifdef MODULE
740
741MODULE_AUTHOR("Jakub Jelinek (jj@ultra.linux.cz), Patrik Rak (prak3264@ss1000.ms.mff.cuni.cz)"); 739MODULE_AUTHOR("Jakub Jelinek (jj@ultra.linux.cz), Patrik Rak (prak3264@ss1000.ms.mff.cuni.cz)");
742MODULE_DESCRIPTION("Solaris binary emulation module"); 740MODULE_DESCRIPTION("Solaris binary emulation module");
743MODULE_LICENSE("GPL"); 741MODULE_LICENSE("GPL");
744 742
745#ifdef __sparc_v9__
746extern u32 tl0_solaris[8]; 743extern u32 tl0_solaris[8];
747#define update_ttable(x) \ 744#define update_ttable(x) \
748 tl0_solaris[3] = (((long)(x) - (long)tl0_solaris - 3) >> 2) | 0x40000000; \ 745 tl0_solaris[3] = (((long)(x) - (long)tl0_solaris - 3) >> 2) | 0x40000000; \
749 wmb(); \ 746 wmb(); \
750 __asm__ __volatile__ ("flush %0" : : "r" (&tl0_solaris[3])) 747 __asm__ __volatile__ ("flush %0" : : "r" (&tl0_solaris[3]))
751#else
752#endif
753 748
754extern u32 solaris_sparc_syscall[]; 749extern u32 solaris_sparc_syscall[];
755extern u32 solaris_syscall[]; 750extern u32 solaris_syscall[];
@@ -757,7 +752,7 @@ extern void cleanup_socksys(void);
757 752
758extern u32 entry64_personality_patch; 753extern u32 entry64_personality_patch;
759 754
760int init_module(void) 755static int __init solaris_init(void)
761{ 756{
762 int ret; 757 int ret;
763 758
@@ -777,19 +772,12 @@ int init_module(void)
777 return 0; 772 return 0;
778} 773}
779 774
780void cleanup_module(void) 775static void __exit solaris_exit(void)
781{ 776{
782 update_ttable(solaris_syscall); 777 update_ttable(solaris_syscall);
783 cleanup_socksys(); 778 cleanup_socksys();
784 unregister_exec_domain(&solaris_exec_domain); 779 unregister_exec_domain(&solaris_exec_domain);
785} 780}
786 781
787#else 782module_init(solaris_init);
788int init_solaris_emul(void) 783module_exit(solaris_exit);
789{
790 register_exec_domain(&solaris_exec_domain);
791 init_socksys();
792 return 0;
793}
794#endif
795
diff --git a/arch/sparc64/solaris/socksys.c b/arch/sparc64/solaris/socksys.c
index bc3df95bc057..7c90e41fd3be 100644
--- a/arch/sparc64/solaris/socksys.c
+++ b/arch/sparc64/solaris/socksys.c
@@ -168,8 +168,7 @@ static struct file_operations socksys_fops = {
168 .release = socksys_release, 168 .release = socksys_release,
169}; 169};
170 170
171int __init 171int __init init_socksys(void)
172init_socksys(void)
173{ 172{
174 int ret; 173 int ret;
175 struct file * file; 174 struct file * file;
@@ -199,8 +198,7 @@ init_socksys(void)
199 return 0; 198 return 0;
200} 199}
201 200
202void 201void __exit cleanup_socksys(void)
203cleanup_socksys(void)
204{ 202{
205 if (unregister_chrdev(30, "socksys")) 203 if (unregister_chrdev(30, "socksys"))
206 printk ("Couldn't unregister socksys character device\n"); 204 printk ("Couldn't unregister socksys character device\n");