Commit 85fea39e authored by Akinobu Mita's avatar Akinobu Mita Committed by Linus Torvalds

[PATCH] ppc32: oprofile timer-mode fallback fix

This is oprofile timer-mode fallback fix for ppc.
Signed-off-by: default avatarAkinobu Mita <amgta@yacht.ocn.ne.jp>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 079f11ed
...@@ -124,7 +124,7 @@ static struct oprofile_operations oprof_ppc32_ops = { ...@@ -124,7 +124,7 @@ static struct oprofile_operations oprof_ppc32_ops = {
.cpu_type = NULL /* To be filled in below. */ .cpu_type = NULL /* To be filled in below. */
}; };
void __init oprofile_arch_init(struct oprofile_operations *ops) int __init oprofile_arch_init(struct oprofile_operations *ops)
{ {
char *name; char *name;
int cpu_id = smp_processor_id(); int cpu_id = smp_processor_id();
...@@ -132,14 +132,13 @@ void __init oprofile_arch_init(struct oprofile_operations *ops) ...@@ -132,14 +132,13 @@ void __init oprofile_arch_init(struct oprofile_operations *ops)
#ifdef CONFIG_FSL_BOOKE #ifdef CONFIG_FSL_BOOKE
model = &op_model_fsl_booke; model = &op_model_fsl_booke;
#else #else
printk(KERN_ERR "oprofile enabled on unsupported processor!\n"); return -ENODEV;
return;
#endif #endif
name = kmalloc(32, GFP_KERNEL); name = kmalloc(32, GFP_KERNEL);
if (NULL == name) if (NULL == name)
return; return -ENOMEM;
sprintf(name, "ppc/%s", cur_cpu_spec[cpu_id]->cpu_name); sprintf(name, "ppc/%s", cur_cpu_spec[cpu_id]->cpu_name);
...@@ -151,6 +150,8 @@ void __init oprofile_arch_init(struct oprofile_operations *ops) ...@@ -151,6 +150,8 @@ void __init oprofile_arch_init(struct oprofile_operations *ops)
printk(KERN_INFO "oprofile: using %s performance monitoring.\n", printk(KERN_INFO "oprofile: using %s performance monitoring.\n",
oprof_ppc32_ops.cpu_type); oprof_ppc32_ops.cpu_type);
return 0;
} }
void oprofile_arch_exit(void) void oprofile_arch_exit(void)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment