• Cyrill Gorcunov's avatar
    perf, x86: Make a second write to performance counter if needed · 68aa00ac
    Cyrill Gorcunov authored
    On Netburst PMU we need a second write to a performance counter
    due to cpu erratum.
    
    A simple flag test instead of alternative instructions was choosen
    because wrmsrl is already a macro and if virtualization is turned
    on will need an additional wrapper call which is more expencise.
    
    nb: we should propably switch to jump-labels as only this facility
    reach the mainline.
    Signed-off-by: default avatarCyrill Gorcunov <gorcunov@openvz.org>
    Signed-off-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
    Cc: Robert Richter <robert.richter@amd.com>
    Cc: Lin Ming <ming.m.lin@intel.com>
    Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
    Cc: Frederic Weisbecker <fweisbec@gmail.com>
    LKML-Reference: <20100602212304.GC5264@lenovo>
    Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
    68aa00ac
perf_event_p4.c 26.1 KB