arm: oprofile: fix linkage issue
Subsystems (2)
PATCH 1/1 arm: oprofile: fix 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 87121ca504, 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.
--- arch/arm/oprofile/common.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
arch/arm/oprofile/common.c +1 -1
@@ -116,7 +116,7 @@ int __init oprofile_arch_init(struct oprofile_operations *ops)return oprofile_perf_init (ops); } -void __exit oprofile_arch_exit(void) +void oprofile_arch_exit (void ) {oprofile_perf_exit (); }
Signature · 1 line
1.7.2.3
PATCH 1/1 arm: oprofile: fix linkage issue
Quoted 11 lines · Vladimir Zapolskiy
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' ofarch/arm/oprofile/built-in.o: defined in discarded section `.exit.text' ofarch/arm/oprofile/built-in.oThe problem is appeared after commit
87121ca504, which introducedoprofile_arch_exit()calls from__initfunction. 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.
I will fix it upstream, afterwards this goes into stable due to the stable tag.
Right, commit 87121ca504 went into stable kernels 3.0 and 3.1, need to fix them too:
Please fix also arch/sh with this patch:
$ git grep exit.*oprofile_arch_exit arch/*/oprofile drivers/oprofile/
arch/arm/oprofile/common.c:void __exit oprofile_arch_exit(void)
arch/sh/oprofile/common.c:void __exit oprofile_arch_exit(void)
arch/sh/oprofile/common.c:void __exit oprofile_arch_exit(void) {}Thanks,
-Robert
Quoted 26 lines
Signed-off-by Vladimir Zapolskiy <[email protected]>Cc Will Deacon <[email protected]>Cc Robert Richter <[email protected]>Cc stable at kernel.org--- arch/arm/oprofile/common.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)arch/arm/oprofile/common.c +1
-1@@ -116,7 +116,7 @@ int __init oprofile_arch_init(struct oprofile_operations *ops)return oprofile_perf_init (ops); } -void __exit oprofile_arch_exit(void) +void oprofile_arch_exit (void ) {oprofile_perf_exit (); }Signature · 1 line
1.7.2.3
Signature · 2 lines
Advanced Micro Devices, Inc. Operating System Research Center
PATCH 1/1 arm: oprofile: fix linkage issue
Quoted 8 lines · ext Robert Richter
Quoted 7 lines · Vladimir Zapolskiy
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' ofarch/arm/oprofile/built-in.o: defined in discarded section `.exit.text' ofarch/arm/oprofile/built-in.o
Quoted 8 lines
Quoted 4 lines
The problem is appeared after commit
87121ca504, which introducedoprofile_arch_exit()calls from__initfunction. 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.I will fix it upstream, afterwards this goes into stable due to the stable tag.
What's the expected difference with this change?
Quoted 11 lines
Right, commit
87121ca504went into stable kernels 3.0 and 3.1, need to fix them too:CC stable at kernel.org # 3.0+Please fix also
arch/shwith this patch:$ git grep exit.*oprofile_arch_exit arch/*/oprofile drivers/oprofile/ arch/arm/oprofile/common.c:void __exit oprofile_arch_exit(void) arch/sh/oprofile/common.c:void __exit oprofile_arch_exit(void) arch/sh/oprofile/common.c:void __exit oprofile_arch_exit(void) {}
I checked the linkage of arch/sh/oprofile/built-in.o on 3.0.13 under the same conditions, and there the original issue is not reproduced, probably because of not tightly optimized vmlinux ld script, so for sh architecture the problem is not so hot as it is for arm.
With best wishes,
Vladimir
Quoted 31 lines
Thanks,
-Robert
Quoted 26 lines
Signed-off-by Vladimir Zapolskiy<[email protected]>Cc Will Deacon<[email protected]>Cc Robert Richter<[email protected]>Cc stable at kernel.org--- arch/arm/oprofile/common.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)arch/arm/oprofile/common.c +1
-2@@ -116,7 +116,7 @@ int __init oprofile_arch_init(struct oprofile_operations *ops)return oprofile_perf_init (ops); } -void __exit oprofile_arch_exit(void) +void oprofile_arch_exit (void ) {oprofile_perf_exit (); } --1.7.2.3
PATCH 1/1 arm: oprofile: fix linkage issue
In reply to Robert RichterQuoted 21 lines · Robert Richter
Quoted 11 lines · Vladimir Zapolskiy
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' ofarch/arm/oprofile/built-in.o: defined in discarded section `.exit.text' ofarch/arm/oprofile/built-in.oThe problem is appeared after commit
87121ca504, which introducedoprofile_arch_exit()calls from__initfunction. 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.I will fix it upstream, afterwards this goes into stable due to the stable tag.
Right, commit
87121ca504went into stable kernels 3.0 and 3.1, need to fix them too:CC stable at kernel.org # 3.0+
Quoted 8 lines
Please fix also
arch/shwith this patch:$ git grep exit.*oprofile_arch_exit arch/*/oprofile drivers/oprofile/ arch/arm/oprofile/common.c:void __exit oprofile_arch_exit(void) arch/sh/oprofile/common.c:void __exit oprofile_arch_exit(void) arch/sh/oprofile/common.c:void __exit oprofile_arch_exit(void) {}Thanks,
To make things easier: if you aggree I will apply your patch with the changes below in addition. No need to respin a new patch version.
Thanks,
-Robert
arch/sh/oprofile/common.c +2 -2
@@ -49,7 +49,7 @@ int __init oprofile_arch_init(struct oprofile_operations *ops)return oprofile_perf_init (ops); } -void __exit oprofile_arch_exit(void) +void oprofile_arch_exit (void ) {oprofile_perf_exit ();kfree (sh_pmu_op_name);
@@ -60,5 +60,5 @@ int __init oprofile_arch_init(struct oprofile_operations *ops) ops->backtrace = sh_backtrace; return -ENODEV; } -void __exit oprofile_arch_exit(void) {} +void oprofile_arch_exit (void ) {}#endif /* CONFIG_HW_PERF_EVENTS */
Signature · 2 lines
Advanced Micro Devices, Inc. Operating System Research Center
PATCH 1/1 arm: oprofile: fix linkage issue
Quoted 29 lines · ext Robert Richter
Quoted 28 lines · Robert Richter
Quoted 11 lines · Vladimir Zapolskiy
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' ofarch/arm/oprofile/built-in.o: defined in discarded section `.exit.text' ofarch/arm/oprofile/built-in.oThe problem is appeared after commit
87121ca504, which introducedoprofile_arch_exit()calls from__initfunction. 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.I will fix it upstream, afterwards this goes into stable due to the stable tag.
Right, commit
87121ca504went into stable kernels 3.0 and 3.1, need to fix them too:CC stable at kernel.org # 3.0+Please fix also
arch/shwith this patch:$ git grep exit.*oprofile_arch_exit arch/*/oprofile drivers/oprofile/ arch/arm/oprofile/common.c:void __exit oprofile_arch_exit(void) arch/sh/oprofile/common.c:void __exit oprofile_arch_exit(void) arch/sh/oprofile/common.c:void __exit oprofile_arch_exit(void) {}
Quoted 5 lines
Quoted 1 line
Thanks,
To make things easier: if you aggree I will apply your patch with the changes below in addition. No need to respin a new patch version.
Certainly, thanks.
With best wishes,
Vladimir
Quoted 24 lines
arch/sh/oprofile/common.c +2
-2@@ -49,7 +49,7 @@ int __init oprofile_arch_init(struct oprofile_operations *ops)return oprofile_perf_init (ops); } -void __exit oprofile_arch_exit(void) +void oprofile_arch_exit (void ) {oprofile_perf_exit ();kfree (sh_pmu_op_name);@@ -60,5 +60,5 @@ int __init oprofile_arch_init(struct oprofile_operations *ops) ops->backtrace = sh_backtrace; return -ENODEV; } -void __exit oprofile_arch_exit(void) {} +void oprofile_arch_exit (void ) {}#endif /* CONFIG_HW_PERF_EVENTS */
PATCH 1/1 arm: oprofile: fix linkage issue
In reply to Vladimir ZapolskiyHello.
Quoted 8 lines · Vladimir Zapolskiy
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' ofarch/arm/oprofile/built-in.o: defined in discarded section `.exit.text' ofarch/arm/oprofile/built-in.oThe problem is
s/is/has/
Quoted 1 line
appeared after commit
87121ca504, which introduced
Please also specify that commit's summary in parens.
Quoted 8 lines
oprofile_arch_exit()calls from__initfunction. 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]>Cc Will Deacon<[email protected]>Cc Robert Richter<[email protected]>Cc stable at kernel.org
WBR, Sergei