13d0407baSopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */ 23d0407baSopenharmony_ci#undef TRACE_SYSTEM 33d0407baSopenharmony_ci#define TRACE_SYSTEM cpufreq 43d0407baSopenharmony_ci 53d0407baSopenharmony_ci#define TRACE_INCLUDE_PATH trace/hooks 63d0407baSopenharmony_ci 73d0407baSopenharmony_ci#if !defined(_TRACE_HOOK_CPUFREQ_H) || defined(TRACE_HEADER_MULTI_READ) 83d0407baSopenharmony_ci#define _TRACE_HOOK_CPUFREQ_H 93d0407baSopenharmony_ci 103d0407baSopenharmony_ci#include <linux/cpufreq.h> 113d0407baSopenharmony_ci#include <linux/tracepoint.h> 123d0407baSopenharmony_ci#include <trace/hooks/vendor_hooks.h> 133d0407baSopenharmony_ci 143d0407baSopenharmony_ciDECLARE_RESTRICTED_HOOK(android_rvh_show_max_freq, 153d0407baSopenharmony_ci TP_PROTO(struct cpufreq_policy *policy, unsigned int *max_freq), 163d0407baSopenharmony_ci TP_ARGS(policy, max_freq), 1); 173d0407baSopenharmony_ci 183d0407baSopenharmony_ciDECLARE_HOOK(android_vh_show_max_freq, 193d0407baSopenharmony_ci TP_PROTO(struct cpufreq_policy *policy, unsigned int *max_freq), 203d0407baSopenharmony_ci TP_ARGS(policy, max_freq)); 213d0407baSopenharmony_ci 223d0407baSopenharmony_ciDECLARE_HOOK(android_vh_freq_table_limits, 233d0407baSopenharmony_ci TP_PROTO(struct cpufreq_policy *policy, unsigned int min_freq, 243d0407baSopenharmony_ci unsigned int max_freq), 253d0407baSopenharmony_ci TP_ARGS(policy, min_freq, max_freq)); 263d0407baSopenharmony_ci 273d0407baSopenharmony_ciDECLARE_HOOK(android_vh_cpufreq_acct_update_power, 283d0407baSopenharmony_ci TP_PROTO(u64 cputime, struct task_struct *p, unsigned int state), 293d0407baSopenharmony_ci TP_ARGS(cputime, p, state)); 303d0407baSopenharmony_ci 313d0407baSopenharmony_ciDECLARE_RESTRICTED_HOOK(android_rvh_cpufreq_transition, 323d0407baSopenharmony_ci TP_PROTO(struct cpufreq_policy *policy), 333d0407baSopenharmony_ci TP_ARGS(policy), 1); 343d0407baSopenharmony_ci 353d0407baSopenharmony_ciDECLARE_HOOK(android_vh_cpufreq_resolve_freq, 363d0407baSopenharmony_ci TP_PROTO(struct cpufreq_policy *policy, unsigned int target_freq, 373d0407baSopenharmony_ci unsigned int old_target_freq), 383d0407baSopenharmony_ci TP_ARGS(policy, target_freq, old_target_freq)); 393d0407baSopenharmony_ci 403d0407baSopenharmony_ciDECLARE_HOOK(android_vh_cpufreq_fast_switch, 413d0407baSopenharmony_ci TP_PROTO(struct cpufreq_policy *policy, unsigned int target_freq, 423d0407baSopenharmony_ci unsigned int old_target_freq), 433d0407baSopenharmony_ci TP_ARGS(policy, target_freq, old_target_freq)); 443d0407baSopenharmony_ci 453d0407baSopenharmony_ciDECLARE_HOOK(android_vh_cpufreq_target, 463d0407baSopenharmony_ci TP_PROTO(struct cpufreq_policy *policy, unsigned int target_freq, 473d0407baSopenharmony_ci unsigned int old_target_freq), 483d0407baSopenharmony_ci TP_ARGS(policy, target_freq, old_target_freq)); 493d0407baSopenharmony_ci/* macro versions of hooks are no longer required */ 503d0407baSopenharmony_ci 513d0407baSopenharmony_ci#endif /* _TRACE_HOOK_CPUFREQ_H */ 523d0407baSopenharmony_ci/* This part must be outside protection */ 533d0407baSopenharmony_ci#include <trace/define_trace.h> 54