lkml.org 
[lkml]   [2009]   [Aug]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [patch] x86, perf_counter, bts: add bts to perf_counter
From
Date
On Fri, 2009-08-07 at 09:22 +0200, Markus Metzger wrote:
> @@ -721,9 +903,13 @@ static int __hw_perf_counter_init(struct
> err = 0;
> if (!atomic_inc_not_zero(&active_counters)) {
> mutex_lock(&pmc_reserve_mutex);
> - if (atomic_read(&active_counters) == 0 && !reserve_pmc_hardware())
> - err = -EBUSY;
> - else
> + if (atomic_read(&active_counters) == 0) {
> + if (!reserve_pmc_hardware())
> + err = -EBUSY;
> + else
> + reserve_bts_hardware();
> + }
> + if (!err)
> atomic_inc(&active_counters);
> mutex_unlock(&pmc_reserve_mutex);
> }

You loose the reserve_bts_hardware() error case there.



\
 
 \ /
  Last update: 2009-08-07 13:49    [W:1.751 / U:0.184 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site