Commit 1b6740a1 was marked as stable but conflicts with 93068241.
This patch resolves the conflict so that an OProfile-enabled ARM kernel can be used.
Cc: Catalin Marinas catalin.marinas@arm.com Cc: Linaro Dev linaro-dev@lists.linaro.org Signed-off-by: Will Deacon will.deacon@arm.com ---
Nicolas - this patch fixes an unresolved merge conflict present in the Linaro 2.6.35-stable tree which results in build failure if oprofile is enabled. The resolution isn't especially trivial but I think I've got it right.
arch/arm/oprofile/common.c | 27 ++++----------------------- 1 files changed, 4 insertions(+), 23 deletions(-)
diff --git a/arch/arm/oprofile/common.c b/arch/arm/oprofile/common.c index b03ef43..bd7426f 100644 --- a/arch/arm/oprofile/common.c +++ b/arch/arm/oprofile/common.c @@ -352,6 +352,8 @@ int __init oprofile_arch_init(struct oprofile_operations *ops) { int cpu, ret = 0;
+ memset(&perf_events, 0, sizeof(perf_events)); + perf_num_counters = armpmu_get_max_events();
counter_config = kcalloc(perf_num_counters, @@ -365,11 +367,8 @@ int __init oprofile_arch_init(struct oprofile_operations *ops) }
ret = init_driverfs(); - if (ret) { - kfree(counter_config); - counter_config = NULL; - return ret; - } + if (ret) + goto out;
for_each_possible_cpu(cpu) { perf_events[cpu] = kcalloc(perf_num_counters, @@ -410,36 +409,18 @@ void __exit oprofile_arch_exit(void) int cpu, id; struct perf_event *event;
-<<<<<<< HEAD for_each_possible_cpu(cpu) { for (id = 0; id < perf_num_counters; ++id) { event = perf_events[cpu][id]; if (event) perf_event_release_kernel(event); -======= - if (*perf_events) { - for_each_possible_cpu(cpu) { - for (id = 0; id < perf_num_counters; ++id) { - event = perf_events[cpu][id]; - if (event != NULL) - perf_event_release_kernel(event); - } - kfree(perf_events[cpu]); ->>>>>>> v2.6.35.8 }
kfree(perf_events[cpu]); }
-<<<<<<< HEAD kfree(counter_config); exit_driverfs(); -======= - if (counter_config) { - kfree(counter_config); - exit_driverfs(); - } ->>>>>>> v2.6.35.8 } #else int __init oprofile_arch_init(struct oprofile_operations *ops)
On Mon, 22 Nov 2010, Will Deacon wrote:
Commit 1b6740a1 was marked as stable but conflicts with 93068241.
This patch resolves the conflict so that an OProfile-enabled ARM kernel can be used.
Cc: Catalin Marinas catalin.marinas@arm.com Cc: Linaro Dev linaro-dev@lists.linaro.org Signed-off-by: Will Deacon will.deacon@arm.com
Nicolas - this patch fixes an unresolved merge conflict present in the Linaro 2.6.35-stable tree which results in build failure if oprofile is enabled. The resolution isn't especially trivial but I think I've got it right.
Applied, thanks.
Nicolas