diff options
author | Stephane Eranian <eranian@google.com> | 2022-03-23 01:15:12 +0300 |
---|---|---|
committer | Peter Zijlstra <peterz@infradead.org> | 2022-04-05 11:24:38 +0300 |
commit | 2a606a18cd672a16343d146a126721b34cc6adbd (patch) | |
tree | de6c1658adb954ac20819332cf1e033fd7cb8cf2 /include/linux/perf_event.h | |
parent | cc37e520a236069c0de0e7ea455082fa11c73b12 (diff) | |
download | linux-2a606a18cd672a16343d146a126721b34cc6adbd.tar.xz |
ACPI: Add perf low power callback
Add an optional callback needed by some PMU features, e.g., AMD
BRS, to give a chance to the perf_events code to change its state before
a CPU goes to low power and after it comes back.
The callback is void when the PERF_NEEDS_LOPWR_CB flag is not set.
This flag must be set in arch specific perf_event.h header whenever needed.
When not set, there is no impact on the ACPI code.
Signed-off-by: Stephane Eranian <eranian@google.com>
[peterz: build fix]
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lore.kernel.org/r/20220322221517.2510440-9-eranian@google.com
Diffstat (limited to 'include/linux/perf_event.h')
-rw-r--r-- | include/linux/perf_event.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h index a411080d5169..da759560eec5 100644 --- a/include/linux/perf_event.h +++ b/include/linux/perf_event.h @@ -1676,4 +1676,10 @@ typedef int (perf_snapshot_branch_stack_t)(struct perf_branch_entry *entries, unsigned int cnt); DECLARE_STATIC_CALL(perf_snapshot_branch_stack, perf_snapshot_branch_stack_t); +#ifndef PERF_NEEDS_LOPWR_CB +static inline void perf_lopwr_cb(bool mode) +{ +} +#endif + #endif /* _LINUX_PERF_EVENT_H */ |