Files
msm-5.15/include/trace/hooks/psci.h
Todd Kjos 949edf7539 ANDROID: Fix suspicious RCU usage warning
The hooks added in the suspend path can be called in a
state where RCU locking is not safe. Change the hooks
to restricted hooks which are safe in this context.

Bug: 232468327
Fixes: ace93ca5ef ("ANDROID: GKI: psci: add hook to check if cpu is allowed to power off")
Signed-off-by: Todd Kjos <tkjos@google.com>
Change-Id: I5b887d34ca05e995030ef0c8f39488d932c52770
2022-05-17 23:33:11 +00:00

26 lines
689 B
C

/* SPDX-License-Identifier: GPL-2.0 */
#undef TRACE_SYSTEM
#define TRACE_SYSTEM psci
#undef TRACE_INCLUDE_PATH
#define TRACE_INCLUDE_PATH trace/hooks
#if !defined(_TRACE_HOOK_PSCI_H) || defined(TRACE_HEADER_MULTI_READ)
#define _TRACE_HOOK_PSCI_H
#include <trace/hooks/vendor_hooks.h>
DECLARE_RESTRICTED_HOOK(android_rvh_psci_tos_resident_on,
TP_PROTO(int cpu, bool *resident),
TP_ARGS(cpu, resident), 1);
DECLARE_RESTRICTED_HOOK(android_rvh_psci_cpu_suspend,
TP_PROTO(u32 state, bool *deny),
TP_ARGS(state, deny), 1);
/* macro versions of hooks are no longer required */
#endif /* _TRACE_HOOK_PSCI_H */
/* This part must be outside protection */
#include <trace/define_trace.h>