diff options
-rw-r--r-- | arch/sparc64/solaris/misc.c | 20 | ||||
-rw-r--r-- | arch/sparc64/solaris/socksys.c | 6 |
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 | ||
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 | |||
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 | ||
171 | int __init | 171 | int __init init_socksys(void) |
172 | init_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 | ||
202 | void | 201 | void __exit cleanup_socksys(void) |
203 | cleanup_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"); |