diff options
author | Stephen Rothwell <sfr@canb.auug.org.au> | 2016-07-28 13:02:20 +1000 |
---|---|---|
committer | Stephen Rothwell <sfr@canb.auug.org.au> | 2016-07-28 13:02:20 +1000 |
commit | 588c986e0eb8ca74a81638fe5165e5749a2653a0 (patch) | |
tree | 6df27b7d72f752f4a62103226ac111758d790e4c /arch/sh | |
parent | 4211ca800f068ec3695dc2428ff279bfa0a951d8 (diff) | |
parent | f86a490b46315e3746117a7a1b4f4c1876abd416 (diff) | |
download | linux-next-588c986e0eb8ca74a81638fe5165e5749a2653a0.tar.gz |
Merge remote-tracking branch 'tip/auto-latest'
Diffstat (limited to 'arch/sh')
-rw-r--r-- | arch/sh/kernel/perf_event.c | 23 |
1 files changed, 4 insertions, 19 deletions
diff --git a/arch/sh/kernel/perf_event.c b/arch/sh/kernel/perf_event.c index 4dca18347ee9..ba3269a8304b 100644 --- a/arch/sh/kernel/perf_event.c +++ b/arch/sh/kernel/perf_event.c @@ -352,28 +352,12 @@ static struct pmu pmu = { .read = sh_pmu_read, }; -static void sh_pmu_setup(int cpu) +static int sh_pmu_prepare_cpu(unsigned int cpu) { struct cpu_hw_events *cpuhw = &per_cpu(cpu_hw_events, cpu); memset(cpuhw, 0, sizeof(struct cpu_hw_events)); -} - -static int -sh_pmu_notifier(struct notifier_block *self, unsigned long action, void *hcpu) -{ - unsigned int cpu = (long)hcpu; - - switch (action & ~CPU_TASKS_FROZEN) { - case CPU_UP_PREPARE: - sh_pmu_setup(cpu); - break; - - default: - break; - } - - return NOTIFY_OK; + return 0; } int register_sh_pmu(struct sh_pmu *_pmu) @@ -394,6 +378,7 @@ int register_sh_pmu(struct sh_pmu *_pmu) WARN_ON(_pmu->num_events > MAX_HWEVENTS); perf_pmu_register(&pmu, "cpu", PERF_TYPE_RAW); - perf_cpu_notifier(sh_pmu_notifier); + cpuhp_setup_state(CPUHP_PERF_SUPERH, "PERF_SUPERH", sh_pmu_prepare_cpu, + NULL); return 0; } |