[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>
This commit is contained in:
parent
a6d967a485
commit
a4c0291aa9
@ -736,20 +736,15 @@ struct exec_domain solaris_exec_domain = {
|
||||
|
||||
extern int init_socksys(void);
|
||||
|
||||
#ifdef MODULE
|
||||
|
||||
MODULE_AUTHOR("Jakub Jelinek (jj@ultra.linux.cz), Patrik Rak (prak3264@ss1000.ms.mff.cuni.cz)");
|
||||
MODULE_DESCRIPTION("Solaris binary emulation module");
|
||||
MODULE_LICENSE("GPL");
|
||||
|
||||
#ifdef __sparc_v9__
|
||||
extern u32 tl0_solaris[8];
|
||||
#define update_ttable(x) \
|
||||
tl0_solaris[3] = (((long)(x) - (long)tl0_solaris - 3) >> 2) | 0x40000000; \
|
||||
wmb(); \
|
||||
__asm__ __volatile__ ("flush %0" : : "r" (&tl0_solaris[3]))
|
||||
#else
|
||||
#endif
|
||||
|
||||
extern u32 solaris_sparc_syscall[];
|
||||
extern u32 solaris_syscall[];
|
||||
@ -757,7 +752,7 @@ extern void cleanup_socksys(void);
|
||||
|
||||
extern u32 entry64_personality_patch;
|
||||
|
||||
int init_module(void)
|
||||
static int __init solaris_init(void)
|
||||
{
|
||||
int ret;
|
||||
|
||||
@ -777,19 +772,12 @@ int init_module(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
void cleanup_module(void)
|
||||
static void __exit solaris_exit(void)
|
||||
{
|
||||
update_ttable(solaris_syscall);
|
||||
cleanup_socksys();
|
||||
unregister_exec_domain(&solaris_exec_domain);
|
||||
}
|
||||
|
||||
#else
|
||||
int init_solaris_emul(void)
|
||||
{
|
||||
register_exec_domain(&solaris_exec_domain);
|
||||
init_socksys();
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
module_init(solaris_init);
|
||||
module_exit(solaris_exit);
|
||||
|
@ -168,8 +168,7 @@ static struct file_operations socksys_fops = {
|
||||
.release = socksys_release,
|
||||
};
|
||||
|
||||
int __init
|
||||
init_socksys(void)
|
||||
int __init init_socksys(void)
|
||||
{
|
||||
int ret;
|
||||
struct file * file;
|
||||
@ -199,8 +198,7 @@ init_socksys(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
void
|
||||
cleanup_socksys(void)
|
||||
void __exit cleanup_socksys(void)
|
||||
{
|
||||
if (unregister_chrdev(30, "socksys"))
|
||||
printk ("Couldn't unregister socksys character device\n");
|
||||
|
Loading…
Reference in New Issue
Block a user