Skip to content

Commit 55205c9

Browse files
Vladimir ZapolskiyIngo Molnar
authored andcommitted
oprofile, arm/sh: Fix oprofile_arch_exit() linkage issue
This change fixes a linking problem, which happens if oprofile is selected to be compiled as built-in: `oprofile_arch_exit' referenced in section `.init.text' of arch/arm/oprofile/built-in.o: defined in discarded section `.exit.text' of arch/arm/oprofile/built-in.o The problem is appeared after commit 87121ca, which introduced oprofile_arch_exit() calls from __init function. Note that the aforementioned commit has been backported to stable branches, and the problem is known to be reproduced at least with 3.0.13 and 3.1.5 kernels. Signed-off-by: Vladimir Zapolskiy <[email protected]> Signed-off-by: Robert Richter <[email protected]> Cc: Will Deacon <[email protected]> Cc: oprofile-list <[email protected]> Cc: <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]>
1 parent b9e26df commit 55205c9

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

arch/arm/oprofile/common.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ int __init oprofile_arch_init(struct oprofile_operations *ops)
116116
return oprofile_perf_init(ops);
117117
}
118118

119-
void __exit oprofile_arch_exit(void)
119+
void oprofile_arch_exit(void)
120120
{
121121
oprofile_perf_exit();
122122
}

arch/sh/oprofile/common.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ int __init oprofile_arch_init(struct oprofile_operations *ops)
4949
return oprofile_perf_init(ops);
5050
}
5151

52-
void __exit oprofile_arch_exit(void)
52+
void oprofile_arch_exit(void)
5353
{
5454
oprofile_perf_exit();
5555
kfree(sh_pmu_op_name);
@@ -60,5 +60,5 @@ int __init oprofile_arch_init(struct oprofile_operations *ops)
6060
ops->backtrace = sh_backtrace;
6161
return -ENODEV;
6262
}
63-
void __exit oprofile_arch_exit(void) {}
63+
void oprofile_arch_exit(void) {}
6464
#endif /* CONFIG_HW_PERF_EVENTS */

0 commit comments

Comments
 (0)