lkml.org 
[lkml]   [2008]   [Oct]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Please pull arch perfmon update
On 14.10.08 16:15:07, Andi Kleen wrote:
> On Tue, Oct 14, 2008 at 04:05:50PM +0200, Robert Richter wrote:
> > On 13.10.08 22:29:51, Andi Kleen wrote:
> > > > I added a follow on patch (446223f) on branch arch-perfmon that
> > >
> > > I didn't do that intentionally because it's called too late.
> > > The function really has to be called early, so that the fallback
> > > works.
> >
> > The hook is in op_nmi_init() and directly called after
> > arch_perfmon_init() and before init_sysfs(). Only
> > register_cpu_notifier() and the setup of oprofile_operations are in
> > between. This should work.
>
> The problem is that arch perfmon init should only be called after
> the other initialization function failed.
>
> So you would need a chain of op_x86_model_spec for fallback.
>
> It's simpler and cleaner to just write that out in explicit C.

The patch makes arch_perfmon_setup_counters() static, so the init code
is bound directly to the model (it is model specific code). The
interface is much cleaner now since the delaration as an external is
not needed then.

The init function is only called, if this cpu type (i386/arch_perfmon)
is selected. And this type is only selected after all other init
funtions were failing.

Please test the patch, I don't see a reason why it should not work.

-Robert

--
Advanced Micro Devices, Inc.
Operating System Research Center
email: robert.richter@amd.com



\
 
 \ /
  Last update: 2008-10-14 16:39    [W:0.032 / U:1.112 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site