提交 a4c0291a 编写于 作者: D David S. Miller

[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: NDavid S. Miller <davem@davemloft.net>
上级 a6d967a4
...@@ -736,20 +736,15 @@ struct exec_domain solaris_exec_domain = { ...@@ -736,20 +736,15 @@ struct exec_domain solaris_exec_domain = {
extern int init_socksys(void); extern int init_socksys(void);
#ifdef MODULE
MODULE_AUTHOR("Jakub Jelinek (jj@ultra.linux.cz), Patrik Rak (prak3264@ss1000.ms.mff.cuni.cz)"); MODULE_AUTHOR("Jakub Jelinek (jj@ultra.linux.cz), Patrik Rak (prak3264@ss1000.ms.mff.cuni.cz)");
MODULE_DESCRIPTION("Solaris binary emulation module"); MODULE_DESCRIPTION("Solaris binary emulation module");
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
#ifdef __sparc_v9__
extern u32 tl0_solaris[8]; extern u32 tl0_solaris[8];
#define update_ttable(x) \ #define update_ttable(x) \
tl0_solaris[3] = (((long)(x) - (long)tl0_solaris - 3) >> 2) | 0x40000000; \ tl0_solaris[3] = (((long)(x) - (long)tl0_solaris - 3) >> 2) | 0x40000000; \
wmb(); \ wmb(); \
__asm__ __volatile__ ("flush %0" : : "r" (&tl0_solaris[3])) __asm__ __volatile__ ("flush %0" : : "r" (&tl0_solaris[3]))
#else
#endif
extern u32 solaris_sparc_syscall[]; extern u32 solaris_sparc_syscall[];
extern u32 solaris_syscall[]; extern u32 solaris_syscall[];
...@@ -757,7 +752,7 @@ extern void cleanup_socksys(void); ...@@ -757,7 +752,7 @@ extern void cleanup_socksys(void);
extern u32 entry64_personality_patch; extern u32 entry64_personality_patch;
int init_module(void) static int __init solaris_init(void)
{ {
int ret; int ret;
...@@ -777,19 +772,12 @@ int init_module(void) ...@@ -777,19 +772,12 @@ int init_module(void)
return 0; return 0;
} }
void cleanup_module(void) static void __exit solaris_exit(void)
{ {
update_ttable(solaris_syscall); update_ttable(solaris_syscall);
cleanup_socksys(); cleanup_socksys();
unregister_exec_domain(&solaris_exec_domain); unregister_exec_domain(&solaris_exec_domain);
} }
#else module_init(solaris_init);
int init_solaris_emul(void) module_exit(solaris_exit);
{
register_exec_domain(&solaris_exec_domain);
init_socksys();
return 0;
}
#endif
...@@ -168,8 +168,7 @@ static struct file_operations socksys_fops = { ...@@ -168,8 +168,7 @@ static struct file_operations socksys_fops = {
.release = socksys_release, .release = socksys_release,
}; };
int __init int __init init_socksys(void)
init_socksys(void)
{ {
int ret; int ret;
struct file * file; struct file * file;
...@@ -199,8 +198,7 @@ init_socksys(void) ...@@ -199,8 +198,7 @@ init_socksys(void)
return 0; return 0;
} }
void void __exit cleanup_socksys(void)
cleanup_socksys(void)
{ {
if (unregister_chrdev(30, "socksys")) if (unregister_chrdev(30, "socksys"))
printk ("Couldn't unregister socksys character device\n"); printk ("Couldn't unregister socksys character device\n");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册