lkml.org 
[lkml]   [2005]   [Jan]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] OProfile: Fix oops on undetected CPU type
On Fri, Jan 28, 2005 at 12:06:19PM -0700, Zwane Mwaikambo wrote:

> ===== drivers/oprofile/oprofile_files.c 1.7 vs edited =====
> --- 1.7/drivers/oprofile/oprofile_files.c 2005-01-04 19:48:23 -07:00
> +++ edited/drivers/oprofile/oprofile_files.c 2005-01-28 11:36:25 -07:00
> @@ -63,7 +63,9 @@ static struct file_operations pointer_si
>
> static ssize_t cpu_type_read(struct file * file, char __user * buf, size_t count, loff_t * offset)
> {
> - return oprofilefs_str_to_user(oprofile_ops.cpu_type, buf, count, offset);
> + if (oprofile_ops.cpu_type)
> + return oprofilefs_str_to_user(oprofile_ops.cpu_type, buf, count, offset);
> + return -EIO;

This is wrong: you need to investigate why .cpu_type isn't set: in
particular, it should have fallen back to timer mode.
oprofile_arch_init() should have returned -ENODEV, and that should have
set timer mode.

Unfortunately bkcvs seems out of date so I can't even look at this
myself.

john
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:10    [W:0.054 / U:0.420 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site