Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 218634
b: refs/heads/master
c: f80c9e3
h: refs/heads/master
v: v3
  • Loading branch information
Peter Zijlstra authored and Ingo Molnar committed Oct 22, 2010
1 parent d2bfaea commit 000d476
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 13 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6809b6ea73f7291f2e495d40397f1172c9caa77e
refs/heads/master: f80c9e304b8e8062230b0cda2c2fdd586149c771
9 changes: 3 additions & 6 deletions trunk/arch/x86/kernel/cpu/perf_event.c
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ static void release_pmc_hardware(void) {}

#endif

static int reserve_ds_buffers(void);
static void reserve_ds_buffers(void);
static void release_ds_buffers(void);

static void hw_perf_event_destroy(struct perf_event *event)
Expand Down Expand Up @@ -546,11 +546,8 @@ static int __x86_pmu_event_init(struct perf_event *event)
if (atomic_read(&active_events) == 0) {
if (!reserve_pmc_hardware())
err = -EBUSY;
else {
err = reserve_ds_buffers();
if (err)
release_pmc_hardware();
}
else
reserve_ds_buffers();
}
if (!err)
atomic_inc(&active_events);
Expand Down
9 changes: 3 additions & 6 deletions trunk/arch/x86/kernel/cpu/perf_event_intel_ds.c
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ static void release_ds_buffers(void)
put_online_cpus();
}

static int reserve_ds_buffers(void)
static void reserve_ds_buffers(void)
{
int bts_err = 0, pebs_err = 0;
int cpu;
Expand All @@ -200,7 +200,7 @@ static int reserve_ds_buffers(void)
x86_pmu.pebs_active = 0;

if (!x86_pmu.bts && !x86_pmu.pebs)
return 0;
return;

if (!x86_pmu.bts)
bts_err = 1;
Expand Down Expand Up @@ -251,8 +251,6 @@ static int reserve_ds_buffers(void)
}

put_online_cpus();

return 0;
}

/*
Expand Down Expand Up @@ -714,9 +712,8 @@ static void intel_ds_init(void)

#else /* CONFIG_CPU_SUP_INTEL */

static int reserve_ds_buffers(void)
static void reserve_ds_buffers(void)
{
return 0;
}

static void release_ds_buffers(void)
Expand Down

0 comments on commit 000d476

Please sign in to comment.