|
@@ -300,7 +300,7 @@ again:
|
|
|
|
|
|
static void bfin_pmu_stop(struct perf_event *event, int flags)
|
|
|
{
|
|
|
- struct cpu_hw_events *cpuc = &__get_cpu_var(cpu_hw_events);
|
|
|
+ struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events);
|
|
|
struct hw_perf_event *hwc = &event->hw;
|
|
|
int idx = hwc->idx;
|
|
|
|
|
@@ -318,7 +318,7 @@ static void bfin_pmu_stop(struct perf_event *event, int flags)
|
|
|
|
|
|
static void bfin_pmu_start(struct perf_event *event, int flags)
|
|
|
{
|
|
|
- struct cpu_hw_events *cpuc = &__get_cpu_var(cpu_hw_events);
|
|
|
+ struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events);
|
|
|
struct hw_perf_event *hwc = &event->hw;
|
|
|
int idx = hwc->idx;
|
|
|
|
|
@@ -335,7 +335,7 @@ static void bfin_pmu_start(struct perf_event *event, int flags)
|
|
|
|
|
|
static void bfin_pmu_del(struct perf_event *event, int flags)
|
|
|
{
|
|
|
- struct cpu_hw_events *cpuc = &__get_cpu_var(cpu_hw_events);
|
|
|
+ struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events);
|
|
|
|
|
|
bfin_pmu_stop(event, PERF_EF_UPDATE);
|
|
|
__clear_bit(event->hw.idx, cpuc->used_mask);
|
|
@@ -345,7 +345,7 @@ static void bfin_pmu_del(struct perf_event *event, int flags)
|
|
|
|
|
|
static int bfin_pmu_add(struct perf_event *event, int flags)
|
|
|
{
|
|
|
- struct cpu_hw_events *cpuc = &__get_cpu_var(cpu_hw_events);
|
|
|
+ struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events);
|
|
|
struct hw_perf_event *hwc = &event->hw;
|
|
|
int idx = hwc->idx;
|
|
|
int ret = -EAGAIN;
|
|
@@ -421,7 +421,7 @@ static int bfin_pmu_event_init(struct perf_event *event)
|
|
|
|
|
|
static void bfin_pmu_enable(struct pmu *pmu)
|
|
|
{
|
|
|
- struct cpu_hw_events *cpuc = &__get_cpu_var(cpu_hw_events);
|
|
|
+ struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events);
|
|
|
struct perf_event *event;
|
|
|
struct hw_perf_event *hwc;
|
|
|
int i;
|