|
@@ -431,7 +431,7 @@ static void maybe_change_configuration(struct cpu_hw_events *cpuc)
|
|
|
*/
|
|
|
static int alpha_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 n0;
|
|
|
int ret;
|
|
@@ -483,7 +483,7 @@ static int alpha_pmu_add(struct perf_event *event, int flags)
|
|
|
*/
|
|
|
static void alpha_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);
|
|
|
struct hw_perf_event *hwc = &event->hw;
|
|
|
unsigned long irq_flags;
|
|
|
int j;
|
|
@@ -531,7 +531,7 @@ static void alpha_pmu_read(struct perf_event *event)
|
|
|
static void alpha_pmu_stop(struct perf_event *event, int flags)
|
|
|
{
|
|
|
struct hw_perf_event *hwc = &event->hw;
|
|
|
- struct cpu_hw_events *cpuc = &__get_cpu_var(cpu_hw_events);
|
|
|
+ struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events);
|
|
|
|
|
|
if (!(hwc->state & PERF_HES_STOPPED)) {
|
|
|
cpuc->idx_mask &= ~(1UL<<hwc->idx);
|
|
@@ -551,7 +551,7 @@ static void alpha_pmu_stop(struct perf_event *event, int flags)
|
|
|
static void alpha_pmu_start(struct perf_event *event, int flags)
|
|
|
{
|
|
|
struct hw_perf_event *hwc = &event->hw;
|
|
|
- struct cpu_hw_events *cpuc = &__get_cpu_var(cpu_hw_events);
|
|
|
+ struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events);
|
|
|
|
|
|
if (WARN_ON_ONCE(!(hwc->state & PERF_HES_STOPPED)))
|
|
|
return;
|
|
@@ -724,7 +724,7 @@ static int alpha_pmu_event_init(struct perf_event *event)
|
|
|
*/
|
|
|
static void alpha_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);
|
|
|
|
|
|
if (cpuc->enabled)
|
|
|
return;
|
|
@@ -750,7 +750,7 @@ static void alpha_pmu_enable(struct pmu *pmu)
|
|
|
|
|
|
static void alpha_pmu_disable(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);
|
|
|
|
|
|
if (!cpuc->enabled)
|
|
|
return;
|
|
@@ -814,8 +814,8 @@ static void alpha_perf_event_irq_handler(unsigned long la_ptr,
|
|
|
struct hw_perf_event *hwc;
|
|
|
int idx, j;
|
|
|
|
|
|
- __get_cpu_var(irq_pmi_count)++;
|
|
|
- cpuc = &__get_cpu_var(cpu_hw_events);
|
|
|
+ __this_cpu_inc(irq_pmi_count);
|
|
|
+ cpuc = this_cpu_ptr(&cpu_hw_events);
|
|
|
|
|
|
/* Completely counting through the PMC's period to trigger a new PMC
|
|
|
* overflow interrupt while in this interrupt routine is utterly
|