diff options
author | David S. Miller <davem@sunset.davemloft.net> | 2006-09-25 17:00:45 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-09-25 19:39:55 -0400 |
commit | a4c0291aa942dceddabe23bf2b74addb958d0964 (patch) | |
tree | 09aa49ecb42475203b7c64a9f0cbc9e2700367c6 /arch/sparc64/solaris/misc.c | |
parent | a6d967a485c67ec8a1276261f39d81ace6a3e308 (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/solaris/misc.c')
-rw-r--r-- | arch/sparc64/solaris/misc.c | 20 |
1 files changed, 4 insertions, 16 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 | ||
737 | extern int init_socksys(void); | 737 | extern int init_socksys(void); |
738 | 738 | ||
739 | #ifdef MODULE | ||
740 | |||
741 | MODULE_AUTHOR("Jakub Jelinek (jj@ultra.linux.cz), Patrik Rak (prak3264@ss1000.ms.mff.cuni.cz)"); | 739 | MODULE_AUTHOR("Jakub Jelinek (jj@ultra.linux.cz), Patrik Rak (prak3264@ss1000.ms.mff.cuni.cz)"); |
742 | MODULE_DESCRIPTION("Solaris binary emulation module"); | 740 | MODULE_DESCRIPTION("Solaris binary emulation module"); |
743 | MODULE_LICENSE("GPL"); | 741 | MODULE_LICENSE("GPL"); |
744 | 742 | ||
745 | #ifdef __sparc_v9__ | ||
746 | extern u32 tl0_solaris[8]; | 743 | extern 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 | ||
754 | extern u32 solaris_sparc_syscall[]; | 749 | extern u32 solaris_sparc_syscall[]; |
755 | extern u32 solaris_syscall[]; | 750 | extern u32 solaris_syscall[]; |
@@ -757,7 +752,7 @@ extern void cleanup_socksys(void); | |||
757 | 752 | ||
758 | extern u32 entry64_personality_patch; | 753 | extern u32 entry64_personality_patch; |
759 | 754 | ||
760 | int init_module(void) | 755 | static 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 | ||
780 | void cleanup_module(void) | 775 | static 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 | 782 | module_init(solaris_init); |
788 | int init_solaris_emul(void) | 783 | module_exit(solaris_exit); |
789 | { | ||
790 | register_exec_domain(&solaris_exec_domain); | ||
791 | init_socksys(); | ||
792 | return 0; | ||
793 | } | ||
794 | #endif | ||
795 | |||