From 1590a0e8e12357d5d1a8007c977c0f498b4c7baf Mon Sep 17 00:00:00 2001 From: Giuliano Procida Date: Wed, 15 Jun 2022 15:33:31 +0100 Subject: [PATCH] ANDROID: GKI: include more type definitions in vendor hooks The following types are now fully defined in ABI XML. * `struct binder_transaction_data` * `struct blk_mq_alloc_data` * `struct media_link_desc` * `struct packet_type` * `struct printk_record` * `struct printk_ringbuffer` Bug: 233047575 Change-Id: Ib7a096c937cfa9facca89b8a26edd2f4b00416a1 Signed-off-by: Giuliano Procida --- android/abi_gki_aarch64.xml | 3875 ++++++++++++++------------- include/trace/hooks/binder.h | 21 +- include/trace/hooks/block.h | 11 +- include/trace/hooks/cgroup.h | 13 +- include/trace/hooks/cpuidle.h | 5 + include/trace/hooks/cpuidle_psci.h | 5 + include/trace/hooks/creds.h | 7 + include/trace/hooks/debug.h | 5 + include/trace/hooks/dtask.h | 17 +- include/trace/hooks/fault.h | 5 + include/trace/hooks/fips140.h | 5 + include/trace/hooks/fpsimd.h | 5 + include/trace/hooks/gic_v3.h | 9 +- include/trace/hooks/iommu.h | 7 +- include/trace/hooks/logbuf.h | 7 +- include/trace/hooks/mm.h | 23 +- include/trace/hooks/mmc_core.h | 13 +- include/trace/hooks/module.h | 5 + include/trace/hooks/net.h | 11 +- include/trace/hooks/pm_domain.h | 5 + include/trace/hooks/power.h | 13 +- include/trace/hooks/psi.h | 7 +- include/trace/hooks/remoteproc.h | 5 + include/trace/hooks/rwsem.h | 5 + include/trace/hooks/sched.h | 28 +- include/trace/hooks/shmem_fs.h | 5 + include/trace/hooks/signal.h | 5 + include/trace/hooks/softlockup.h | 5 + include/trace/hooks/sys.h | 5 + include/trace/hooks/syscall_check.h | 7 + include/trace/hooks/thermal.h | 7 +- include/trace/hooks/traps.h | 5 + include/trace/hooks/typec.h | 7 +- include/trace/hooks/ufshcd.h | 15 +- include/trace/hooks/v4l2core.h | 21 +- include/trace/hooks/v4l2mc.h | 7 + 36 files changed, 2348 insertions(+), 1853 deletions(-) diff --git a/android/abi_gki_aarch64.xml b/android/abi_gki_aarch64.xml index 9021a3ecb335..251da9a8b3dc 100644 --- a/android/abi_gki_aarch64.xml +++ b/android/abi_gki_aarch64.xml @@ -6927,7 +6927,7 @@ - + @@ -8273,7 +8273,7 @@ - + @@ -8370,6 +8370,7 @@ + @@ -9686,21 +9687,21 @@ - + - + - + - + - + - + @@ -11751,42 +11752,42 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -14705,18 +14706,18 @@ - + - + - + - + - + @@ -14785,7 +14786,47 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -16006,18 +16047,18 @@ - + - + - + - + - + @@ -17293,6 +17334,7 @@ + @@ -19351,51 +19393,51 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -19416,39 +19458,39 @@ - + - + - + - + - + - + - + - + - + - + - + - + @@ -22228,6 +22270,7 @@ + @@ -27274,36 +27317,36 @@ - + - + - + - + - + - + - + - + - + - + - + @@ -28436,6 +28479,13 @@ + + + + + + + @@ -31081,27 +31131,27 @@ - + - + - + - + - + - + - + - + @@ -32586,7 +32636,20 @@ - + + + + + + + + + + + + + + @@ -33530,7 +33593,7 @@ - + @@ -38207,24 +38270,24 @@ - + - + - + - + - + - + - + @@ -39330,18 +39393,18 @@ - + - + - + - + - + @@ -40411,24 +40474,24 @@ - + - + - + - + - + - + - + @@ -40827,6 +40890,32 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -48256,7 +48345,17 @@ - + + + + + + + + + + + @@ -48273,6 +48372,14 @@ + + + + + + + + @@ -50293,18 +50400,18 @@ - + - + - + - + - + @@ -50707,12 +50814,12 @@ - + - + - + @@ -52853,6 +52960,14 @@ + + + + + + + + @@ -56451,18 +56566,18 @@ - + - + - + - + - + @@ -58026,7 +58141,7 @@ - + @@ -60416,12 +60531,12 @@ - + - + - + @@ -62589,7 +62704,7 @@ - + @@ -65232,15 +65347,15 @@ - + - + - + - + @@ -65361,7 +65476,35 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -65979,72 +66122,72 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -66624,6 +66767,12 @@ + + + + + + @@ -66800,6 +66949,20 @@ + + + + + + + + + + + + + + @@ -67087,18 +67250,18 @@ - + - + - + - + - + @@ -68781,6 +68944,7 @@ + @@ -69018,12 +69182,12 @@ - + - + - + @@ -71552,7 +71716,7 @@ - + @@ -73366,54 +73530,54 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -75630,7 +75794,7 @@ - + @@ -75791,7 +75955,7 @@ - + @@ -75959,54 +76123,54 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -77852,6 +78016,7 @@ + @@ -78039,7 +78204,26 @@ - + + + + + + + + + + + + + + + + + + + + @@ -79113,6 +79297,26 @@ + + + + + + + + + + + + + + + + + + + + @@ -82194,54 +82398,54 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -82526,12 +82730,12 @@ - + - + - + @@ -82893,12 +83097,12 @@ - + - + - + @@ -83126,15 +83330,15 @@ - + - + - + - + @@ -83229,7 +83433,7 @@ - + @@ -84328,291 +84532,291 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -84830,6 +85034,14 @@ + + + + + + + + @@ -86388,7 +86600,7 @@ - + @@ -88352,6 +88564,20 @@ + + + + + + + + + + + + + + @@ -89093,6 +89319,14 @@ + + + + + + + + @@ -90802,10 +91036,19 @@ + + + + + + + + + @@ -99063,7 +99306,17 @@ - + + + + + + + + + + + @@ -99766,12 +100019,12 @@ - + - + - + @@ -102096,7 +102349,7 @@ - + @@ -104238,21 +104491,21 @@ - + - + - + - + - + - + @@ -104858,6 +105111,11 @@ + + + + + @@ -105773,48 +106031,48 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -106262,66 +106520,66 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -107210,24 +107468,24 @@ - + - + - + - + - + - + - + @@ -107383,87 +107641,87 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -111321,7 +111579,7 @@ - + @@ -112120,99 +112378,99 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -112453,6 +112711,7 @@ + @@ -116311,96 +116570,96 @@ - - - - - + + + + + - - - - + + + + - - - - + + + + - - - - - - + + + + + + - - - + + + - - - - - + + + + + - - - - - + + + + + - - - - - - - - - + + + + + + + + + - - - - - - - - - - - + + + + + + + + + + + - - - + + + - - - - + + + + - - - + + + - - - - + + + + @@ -116408,153 +116667,153 @@ - - - - + + + + - - - - + + + + - - - - - + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - + + - - - - - - + + + + + - - - - - - + + + + + - - - + + + + + - - - - - - + + + + + + + - - - - + + + + + + - - - - - + + + + + + - - - - - + + + + - - - - - + + + - - - - - - - + + + - - - - - - + + + - - - - - - + + + - - - - + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + @@ -116569,25 +116828,25 @@ - - - - - + + + + + - - - - - - - + + + + + + + - - - + + + @@ -116597,24 +116856,24 @@ - - - - - + + + + + - - - - - - + + + + + + - - - + + + @@ -116629,19 +116888,19 @@ - - - + + + - - - - - - - - + + + + + + + + @@ -116651,113 +116910,113 @@ - - - - + + + + - - - - + + + + - - - - - + + + + + - - - + + + - - - + + + - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - + - - - + + + - - - - - + + + + + + - - - - - - - + + + + + - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -116765,49 +117024,49 @@ - - - - + + + + - - - + + + - - - - + + + + - - - + + + - - - + + + - - - - + + + + - - - - - + + + + + - - - + + + @@ -116816,154 +117075,154 @@ - + + + + + + + + + + + - + - - - + + + - - - + + + + + - - - + + + + + + - - - - - + + + + + + + - - - - - - + + + - - - - - - - + + + + - - - + + + + - - - - + + + + + + - - - - + + + + + - - - - - - + + + + + + - - - - - + + + + + + - - - - - - + + + + + - - - - - - + + + + + + - - - - - + + + - - - - - - + + + + + - - - + + + + + + - - - - - + + + + + + - - - - - - + + + + + + - - - - - - - - - - - - - - - - - - - - - + + + + + @@ -116973,19 +117232,19 @@ - - - - - - + + + + + + - - - - - + + + + + @@ -116996,200 +117255,200 @@ - - - - - + + + + + - - - - + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - + + + + - - - - + + + + + + + + - - - - - + + + + + + + + - - - - + + + + - - - - - - + + + + + + - - - - + + + + - - - - - - - - + + + + - - - - - - - - + + + + + - - - - + + + + - - - - - - + + + + + + - - - - + + + - - - - + + + + + - - - - - + + + + + - - - - + + + + + - - - - - - + + + + + + - - - + + + - - - - - + + + + - - - - - + + + + - - - - - + + + + + - - - - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + @@ -117204,55 +117463,55 @@ - - - - + + + + - - - - + + + + - - - - - - - - + + + + + + + + - - - + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + @@ -117288,63 +117547,63 @@ - - - - + + + + - - - - + + + + - - - - - + + + + + - - - - + + + + - - - - - - - - + + + + + + + + - - - - - - - + + + + + + + - - - - - - + + + + + + - - - - - + + + + + @@ -117353,71 +117612,71 @@ - - - - + + + + - - - - + + + + - - - + + + - - - - + + + + - - - - - + + + + + - - - - + + + + - - - - + + + + - - - + + + - - - - - - - + + + + + + + - - - + + + - - - - + + + + @@ -117459,11 +117718,11 @@ - - - - - + + + + + @@ -117477,51 +117736,51 @@ - - - - - + + + + + - - - - - - - - - - - - - - + - - - - - - + + + + - - - - - + + + + + + - - - + + + + + + + + + + + + + + + + + @@ -117530,151 +117789,151 @@ - - - - + + + + - - - + + + - - - + + + - - - - - + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - + - - - - + + + + - - - - + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - - + + + + - - - - - + + + - - - - + + + - - - - - - - - - - - - - + + + @@ -117683,10 +117942,10 @@ - - - - + + + + @@ -117697,25 +117956,25 @@ - - - - - - - + + + + + + + - - - - + + + + - - - - + + + + @@ -117723,92 +117982,92 @@ - - - - + + + + - - - - + + + + - - - - + + + + - - - - - - - - + + + + + + + + - - - - - - + - - - + + + - - - + + + - - - + + + - - - + + + - - - - + + + - - - - + + + + - - - - - + + + + - - - - + + + + + - - - + + + + + + + + + @@ -117816,15 +118075,15 @@ - - - + + + - - - - + + + + @@ -117880,35 +118139,35 @@ - - - + + + - - - + + + - - - - + + + + - - - - - + + + + + - - - - - - + + + + + + @@ -117917,10 +118176,10 @@ - - - - + + + + @@ -117928,10 +118187,10 @@ - - - - + + + + @@ -117973,22 +118232,22 @@ - - - - + + + + - - - - + + + + - - - - + + + + @@ -118003,12 +118262,12 @@ - - - - - - + + + + + + @@ -118027,107 +118286,107 @@ - - - - - - - - - - - - - - - + - - - - - - + + + - - - - - + + + + + - + - - + + + + + + - - - - + + + + + - - - - - - + + + + - - - - + + + + - - - - - - + + + + + + - - - - - - + + + + - - - - + + + + + + - - - - - + + + + + + - - - - - + + + + - - - + + + + + - - - + + + + + + + + + + + + + + + @@ -118149,27 +118408,27 @@ - - - - - - + + + + + + - - - - - + + + + + - - - - - - + + + + + + @@ -118570,186 +118829,186 @@ - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + - - - + + + - - - + + + - - - + + + - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + - - - - - - - - + + + + + + + + - - - - - - - + + + + + + + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - + + + + + + + + - - - - - - - - - + + + + + + + + + - - - - - - - - - - - + + + + + + + + + + + @@ -118757,78 +119016,78 @@ - + - - - - - - - - + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + - - + + - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + - - + + @@ -118838,57 +119097,57 @@ - - - - - - + + + + + + - + - + - - - - + + + + - - - + + + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + - - - - - + + + + + @@ -128839,32 +129098,32 @@ - - - + + + - - - - + + + + - - - - + + + + - - - + + + - - - - + + + + diff --git a/include/trace/hooks/binder.h b/include/trace/hooks/binder.h index a5c090f38388..2b9e7e09a13d 100644 --- a/include/trace/hooks/binder.h +++ b/include/trace/hooks/binder.h @@ -11,13 +11,26 @@ * Following tracepoints are not exported in tracefs and provide a * mechanism for vendor modules to hook and extend functionality */ -struct binder_transaction; -struct task_struct; +#ifdef __GENKSYMS__ struct binder_alloc; struct binder_proc; struct binder_thread; -struct binder_transaction_data; +struct binder_transaction; +struct task_struct; struct seq_file; +struct binder_transaction_data; +#else +/* struct binder_alloc */ +#include <../drivers/android/binder_alloc.h> +/* struct binder_proc, struct binder_thread, struct binder_transaction */ +#include <../drivers/android/binder_internal.h> +/* struct task_struct */ +#include +/* struct seq_file */ +#include +/* struct binder_transaction_data */ +#include +#endif /* __GENKSYMS__ */ DECLARE_HOOK(android_vh_binder_transaction_init, TP_PROTO(struct binder_transaction *t), TP_ARGS(t)); @@ -30,8 +43,6 @@ DECLARE_HOOK(android_vh_binder_set_priority, DECLARE_HOOK(android_vh_binder_restore_priority, TP_PROTO(struct binder_transaction *t, struct task_struct *task), TP_ARGS(t, task)); -struct binder_proc; -struct binder_thread; DECLARE_HOOK(android_vh_binder_wakeup_ilocked, TP_PROTO(struct task_struct *task, bool sync, struct binder_proc *proc), TP_ARGS(task, sync, proc)); diff --git a/include/trace/hooks/block.h b/include/trace/hooks/block.h index 0d9d7db39968..964fff355602 100644 --- a/include/trace/hooks/block.h +++ b/include/trace/hooks/block.h @@ -10,9 +10,18 @@ #include #include -struct blk_mq_tag_set; +#ifdef __GENKSYMS__ struct blk_mq_tags; struct blk_mq_alloc_data; +struct blk_mq_tag_set; +#else +/* struct blk_mq_tags */ +#include <../block/blk-mq-tag.h> +/* struct blk_mq_alloc_data */ +#include <../block/blk-mq.h> +/* struct blk_mq_tag_set */ +#include +#endif /* __GENKSYMS__ */ DECLARE_HOOK(android_vh_blk_alloc_rqs, TP_PROTO(size_t *rq_size, struct blk_mq_tag_set *set, diff --git a/include/trace/hooks/cgroup.h b/include/trace/hooks/cgroup.h index 6b6d7918c518..8d838c389703 100644 --- a/include/trace/hooks/cgroup.h +++ b/include/trace/hooks/cgroup.h @@ -8,7 +8,18 @@ #include #include +#ifdef __GENKSYMS__ +struct cgroup_taskset; +struct cgroup_subsys; struct task_struct; +#else +/* struct cgroup_taskset */ +#include <../kernel/cgroup/cgroup-internal.h> +/* struct cgroup_subsys */ +#include +/* struct task_struct */ +#include +#endif /* __GENKSYMS__ */ DECLARE_HOOK(android_vh_cgroup_set_task, TP_PROTO(int ret, struct task_struct *task), TP_ARGS(ret, task)); @@ -22,8 +33,6 @@ DECLARE_RESTRICTED_HOOK(android_rvh_refrigerator, TP_PROTO(bool f), TP_ARGS(f), 1); -struct cgroup_subsys; -struct cgroup_taskset; DECLARE_HOOK(android_vh_cgroup_attach, TP_PROTO(struct cgroup_subsys *ss, struct cgroup_taskset *tset), TP_ARGS(ss, tset)) diff --git a/include/trace/hooks/cpuidle.h b/include/trace/hooks/cpuidle.h index 6d1f4bf7f1ed..8d1e83cdc436 100644 --- a/include/trace/hooks/cpuidle.h +++ b/include/trace/hooks/cpuidle.h @@ -10,7 +10,12 @@ #include #include +#ifdef __GENKSYMS__ struct cpuidle_device; +#else +/* struct cpuidle_device */ +#include +#endif /* __GENKSYMS__ */ DECLARE_HOOK(android_vh_cpu_idle_enter, TP_PROTO(int *state, struct cpuidle_device *dev), diff --git a/include/trace/hooks/cpuidle_psci.h b/include/trace/hooks/cpuidle_psci.h index 94b01eba0b4e..994e76b3db1b 100644 --- a/include/trace/hooks/cpuidle_psci.h +++ b/include/trace/hooks/cpuidle_psci.h @@ -11,7 +11,12 @@ * mechanism for vendor modules to hook and extend functionality */ +#ifdef __GENKSYMS__ struct cpuidle_device; +#else +/* struct cpuidle_device */ +#include +#endif /* __GENKSYMS__ */ DECLARE_HOOK(android_vh_cpuidle_psci_enter, TP_PROTO(struct cpuidle_device *dev, bool s2idle), TP_ARGS(dev, s2idle)); diff --git a/include/trace/hooks/creds.h b/include/trace/hooks/creds.h index dd877e3a1f3e..a3042e0ffd4d 100644 --- a/include/trace/hooks/creds.h +++ b/include/trace/hooks/creds.h @@ -11,8 +11,15 @@ * Following tracepoints are not exported in tracefs and provide a * mechanism for vendor modules to hook and extend functionality */ +#ifdef __GENKSYMS__ struct cred; struct task_struct; +#else +/* struct cred */ +#include +/* struct task_struct */ +#include +#endif /* __GENKSYMS__ */ DECLARE_HOOK(android_vh_commit_creds, TP_PROTO(const struct task_struct *task, const struct cred *new), TP_ARGS(task, new)); diff --git a/include/trace/hooks/debug.h b/include/trace/hooks/debug.h index ac006d7fdd0a..3ed574dbfaeb 100644 --- a/include/trace/hooks/debug.h +++ b/include/trace/hooks/debug.h @@ -11,7 +11,12 @@ #include #if defined(CONFIG_TRACEPOINTS) && defined(CONFIG_ANDROID_VENDOR_HOOKS) +#ifdef __GENKSYMS__ struct pt_regs; +#else +/* struct pt_regs */ +#include +#endif /* __GENKSYMS__ */ DECLARE_HOOK(android_vh_ipi_stop, TP_PROTO(struct pt_regs *regs), diff --git a/include/trace/hooks/dtask.h b/include/trace/hooks/dtask.h index 7053563e2e8f..9890bfe5c41d 100644 --- a/include/trace/hooks/dtask.h +++ b/include/trace/hooks/dtask.h @@ -11,7 +11,21 @@ * Following tracepoints are not exported in tracefs and provide a * mechanism for vendor modules to hook and extend functionality */ +#ifdef __GENKSYMS__ struct mutex; +struct rt_mutex; +struct rw_semaphore; +struct task_struct; +#else +/* struct mutex */ +#include +/* struct rt_mutex */ +#include +/* struct rw_semaphore */ +#include +/* struct task_struct */ +#include +#endif /* __GENKSYMS__ */ DECLARE_HOOK(android_vh_mutex_wait_start, TP_PROTO(struct mutex *lock), TP_ARGS(lock)); @@ -19,7 +33,6 @@ DECLARE_HOOK(android_vh_mutex_wait_finish, TP_PROTO(struct mutex *lock), TP_ARGS(lock)); -struct rt_mutex; DECLARE_HOOK(android_vh_rtmutex_wait_start, TP_PROTO(struct rt_mutex *lock), TP_ARGS(lock)); @@ -27,7 +40,6 @@ DECLARE_HOOK(android_vh_rtmutex_wait_finish, TP_PROTO(struct rt_mutex *lock), TP_ARGS(lock)); -struct rw_semaphore; DECLARE_HOOK(android_vh_rwsem_read_wait_start, TP_PROTO(struct rw_semaphore *sem), TP_ARGS(sem)); @@ -41,7 +53,6 @@ DECLARE_HOOK(android_vh_rwsem_write_wait_finish, TP_PROTO(struct rw_semaphore *sem), TP_ARGS(sem)); -struct task_struct; DECLARE_HOOK(android_vh_sched_show_task, TP_PROTO(struct task_struct *task), TP_ARGS(task)); diff --git a/include/trace/hooks/fault.h b/include/trace/hooks/fault.h index 2c4176001ead..de66a1ca33c7 100644 --- a/include/trace/hooks/fault.h +++ b/include/trace/hooks/fault.h @@ -11,7 +11,12 @@ * Following tracepoints are not exported in tracefs and provide a * mechanism for vendor modules to hook and extend functionality */ +#ifdef __GENKSYMS__ struct pt_regs; +#else +/* struct pt_regs */ +#include +#endif /* __GENKSYMS__ */ DECLARE_RESTRICTED_HOOK(android_rvh_die_kernel_fault, TP_PROTO(struct pt_regs *regs, unsigned int esr, unsigned long addr, const char *msg), TP_ARGS(regs, esr, addr, msg), 1); diff --git a/include/trace/hooks/fips140.h b/include/trace/hooks/fips140.h index 3aebf6168791..02283a1b126f 100644 --- a/include/trace/hooks/fips140.h +++ b/include/trace/hooks/fips140.h @@ -8,7 +8,12 @@ #include #include +#ifdef __GENKSYMS__ struct crypto_aes_ctx; +#else +/* struct crypto_aes_ctx */ +#include +#endif /* __GENKSYMS__ */ /* * These hooks exist only for the benefit of the FIPS140 crypto module, which diff --git a/include/trace/hooks/fpsimd.h b/include/trace/hooks/fpsimd.h index a4a3ce228fff..ab7c34ce64f8 100644 --- a/include/trace/hooks/fpsimd.h +++ b/include/trace/hooks/fpsimd.h @@ -10,7 +10,12 @@ #include #include +#ifdef __GENKSYMS__ struct task_struct; +#else +/* struct task_struct */ +#include +#endif /* __GENKSYMS__ */ DECLARE_HOOK(android_vh_is_fpsimd_save, TP_PROTO(struct task_struct *prev, struct task_struct *next), diff --git a/include/trace/hooks/gic_v3.h b/include/trace/hooks/gic_v3.h index 42e0bb934570..6b649fd865b1 100644 --- a/include/trace/hooks/gic_v3.h +++ b/include/trace/hooks/gic_v3.h @@ -10,8 +10,15 @@ * Following tracepoints are not exported in tracefs and provide a * mechanism for vendor modules to hook and extend functionality */ -struct irq_data; +#ifdef __GENKSYMS__ struct cpumask; +struct irq_data; +#else +/* struct cpumask */ +#include +/* struct irq_data */ +#include +#endif /* __GENKSYMS__ */ DECLARE_RESTRICTED_HOOK(android_rvh_gic_v3_set_affinity, TP_PROTO(struct irq_data *d, const struct cpumask *mask_val, u64 *affinity, bool force, void __iomem *base), diff --git a/include/trace/hooks/iommu.h b/include/trace/hooks/iommu.h index e818b90e482c..28bd0a3929ed 100644 --- a/include/trace/hooks/iommu.h +++ b/include/trace/hooks/iommu.h @@ -12,6 +12,12 @@ #include #include +#ifdef __GENKSYMS__ +struct iova_domain; +#else +/* struct iova_domain */ +#include +#endif /* __GENKSYMS__ */ DECLARE_RESTRICTED_HOOK(android_rvh_iommu_setup_dma_ops, TP_PROTO(struct device *dev, u64 dma_base, u64 size), TP_ARGS(dev, dma_base, size), 1); @@ -24,7 +30,6 @@ DECLARE_HOOK(android_vh_iommu_alloc_iova, TP_PROTO(struct device *dev, dma_addr_t iova, size_t size), TP_ARGS(dev, iova, size)); -struct iova_domain; DECLARE_HOOK(android_vh_iommu_iovad_alloc_iova, TP_PROTO(struct device *dev, struct iova_domain *iovad, dma_addr_t iova, size_t size), diff --git a/include/trace/hooks/logbuf.h b/include/trace/hooks/logbuf.h index f73ad597fc64..6aeb10a4661b 100644 --- a/include/trace/hooks/logbuf.h +++ b/include/trace/hooks/logbuf.h @@ -10,8 +10,13 @@ #include #include -struct printk_ringbuffer; +#ifdef __GENKSYMS__ struct printk_record; +struct printk_ringbuffer; +#else +/* struct printk_record, struct printk_ringbuffer */ +#include <../kernel/printk/printk_ringbuffer.h> +#endif /* __GENKSYMS__ */ DECLARE_HOOK(android_vh_logbuf, TP_PROTO(struct printk_ringbuffer *rb, struct printk_record *r), diff --git a/include/trace/hooks/mm.h b/include/trace/hooks/mm.h index 4af456345aa4..11073388847b 100644 --- a/include/trace/hooks/mm.h +++ b/include/trace/hooks/mm.h @@ -14,6 +14,24 @@ #include #include +#ifdef __GENKSYMS__ +struct slabinfo; +struct cgroup_subsys_state; +struct device; +struct mem_cgroup; +struct readahead_control; +#else +/* struct slabinfo */ +#include <../mm/slab.h> +/* struct cgroup_subsys_state */ +#include +/* struct device */ +#include +/* struct mem_cgroup */ +#include +/* struct readahead_control */ +#include +#endif /* __GENKSYMS__ */ struct cma; DECLARE_RESTRICTED_HOOK(android_rvh_set_skip_swapcache_flags, @@ -68,7 +86,6 @@ DECLARE_HOOK(android_vh_include_reserved_zone, DECLARE_HOOK(android_vh_show_mem, TP_PROTO(unsigned int filter, nodemask_t *nodemask), TP_ARGS(filter, nodemask)); -struct slabinfo; struct dirty_throttle_control; DECLARE_HOOK(android_vh_mm_dirty_limits, TP_PROTO(struct dirty_throttle_control *const gdtc, bool strictlimit, @@ -88,7 +105,6 @@ DECLARE_HOOK(android_vh_show_stack_hash, DECLARE_HOOK(android_vh_save_track_hash, TP_PROTO(bool alloc, unsigned long p), TP_ARGS(alloc, p)); -struct mem_cgroup; DECLARE_HOOK(android_vh_vmpressure, TP_PROTO(struct mem_cgroup *memcg, bool *bypass), TP_ARGS(memcg, bypass)); @@ -101,7 +117,6 @@ DECLARE_HOOK(android_vh_mem_cgroup_free, DECLARE_HOOK(android_vh_mem_cgroup_id_remove, TP_PROTO(struct mem_cgroup *memcg), TP_ARGS(memcg)); -struct cgroup_subsys_state; DECLARE_HOOK(android_vh_mem_cgroup_css_online, TP_PROTO(struct cgroup_subsys_state *css, struct mem_cgroup *memcg), TP_ARGS(css, memcg)); @@ -128,11 +143,9 @@ DECLARE_HOOK(android_vh_cma_drain_all_pages_bypass, DECLARE_HOOK(android_vh_pcplist_add_cma_pages_bypass, TP_PROTO(int migratetype, bool *bypass), TP_ARGS(migratetype, bypass)); -struct device; DECLARE_HOOK(android_vh_subpage_dma_contig_alloc, TP_PROTO(bool *allow_subpage_alloc, struct device *dev, size_t *size), TP_ARGS(allow_subpage_alloc, dev, size)); -struct readahead_control; DECLARE_HOOK(android_vh_ra_tuning_max_page, TP_PROTO(struct readahead_control *ractl, unsigned long *max_page), TP_ARGS(ractl, max_page)); diff --git a/include/trace/hooks/mmc_core.h b/include/trace/hooks/mmc_core.h index ad367782d59f..b4b93b2f4c9e 100644 --- a/include/trace/hooks/mmc_core.h +++ b/include/trace/hooks/mmc_core.h @@ -10,9 +10,18 @@ #include #include -struct mmc_host; -struct mmc_card; +#ifdef __GENKSYMS__ struct sdhci_host; +struct mmc_card; +struct mmc_host; +#else +/* struct sdhci_host */ +#include <../drivers/mmc/host/sdhci.h> +/* struct mmc_card */ +#include +/* struct mmc_host */ +#include +#endif /* __GENKSYMS__ */ DECLARE_HOOK(android_vh_mmc_blk_reset, TP_PROTO(struct mmc_host *host, int err, bool *allow), diff --git a/include/trace/hooks/module.h b/include/trace/hooks/module.h index 281cb0d37c12..3c552945e92e 100644 --- a/include/trace/hooks/module.h +++ b/include/trace/hooks/module.h @@ -11,7 +11,12 @@ * Following tracepoints are not exported in tracefs and provide a * mechanism for vendor modules to hook and extend functionality */ +#ifdef __GENKSYMS__ struct module; +#else +/* struct module */ +#include +#endif /* __GENKSYMS__ */ DECLARE_HOOK(android_vh_set_module_permit_before_init, TP_PROTO(const struct module *mod), TP_ARGS(mod)); diff --git a/include/trace/hooks/net.h b/include/trace/hooks/net.h index acb2fd2c7e07..f5347e393f5f 100644 --- a/include/trace/hooks/net.h +++ b/include/trace/hooks/net.h @@ -9,9 +9,18 @@ #include #include +#ifdef __GENKSYMS__ struct packet_type; -struct list_head; struct sk_buff; +struct list_head; +#else +/* struct packet_type */ +#include +/* struct sk_buff */ +#include +/* struct list_head */ +#include +#endif /* __GENKSYMS__ */ DECLARE_HOOK(android_vh_ptype_head, TP_PROTO(const struct packet_type *pt, struct list_head *vendor_pt), TP_ARGS(pt, vendor_pt)); diff --git a/include/trace/hooks/pm_domain.h b/include/trace/hooks/pm_domain.h index 548e350e8090..7021850865ff 100644 --- a/include/trace/hooks/pm_domain.h +++ b/include/trace/hooks/pm_domain.h @@ -11,7 +11,12 @@ #include #include +#ifdef __GENKSYMS__ struct generic_pm_domain; +#else +/* struct generic_pm_domain */ +#include +#endif /* __GENKSYMS__ */ DECLARE_HOOK(android_vh_allow_domain_state, TP_PROTO(struct generic_pm_domain *genpd, uint32_t idx, bool *allow), TP_ARGS(genpd, idx, allow)) diff --git a/include/trace/hooks/power.h b/include/trace/hooks/power.h index 149ea08580b8..de747ac98472 100644 --- a/include/trace/hooks/power.h +++ b/include/trace/hooks/power.h @@ -11,7 +11,17 @@ * Following tracepoints are not exported in tracefs and provide a * mechanism for vendor modules to hook and extend functionality */ +#ifdef __GENKSYMS__ +enum freq_qos_req_type; +struct freq_constraints; +struct freq_qos_request; struct task_struct; +#else +/* enum freq_qos_req_type, struct freq_constraints, struct freq_qos_request */ +#include +/* struct task_struct */ +#include +#endif /* __GENKSYMS__ */ DECLARE_HOOK(android_vh_try_to_freeze_todo, TP_PROTO(unsigned int todo, unsigned int elapsed_msecs, bool wq_busy), TP_ARGS(todo, elapsed_msecs, wq_busy)); @@ -20,9 +30,6 @@ DECLARE_HOOK(android_vh_try_to_freeze_todo_unfrozen, TP_PROTO(struct task_struct *p), TP_ARGS(p)); -enum freq_qos_req_type; -struct freq_qos_request; -struct freq_constraints; DECLARE_HOOK(android_vh_freq_qos_add_request, TP_PROTO(struct freq_constraints *qos, struct freq_qos_request *req, diff --git a/include/trace/hooks/psi.h b/include/trace/hooks/psi.h index 62d1a0ee7b63..3842118af3c3 100644 --- a/include/trace/hooks/psi.h +++ b/include/trace/hooks/psi.h @@ -12,8 +12,13 @@ #if defined(CONFIG_TRACEPOINTS) && defined(CONFIG_ANDROID_VENDOR_HOOKS) -struct psi_trigger; +#ifdef __GENKSYMS__ struct psi_group; +struct psi_trigger; +#else +/* struct psi_group, struct psi_trigger */ +#include +#endif /* __GENKSYMS__ */ DECLARE_HOOK(android_vh_psi_event, TP_PROTO(struct psi_trigger *t), TP_ARGS(t)); diff --git a/include/trace/hooks/remoteproc.h b/include/trace/hooks/remoteproc.h index c39c2c1bffb3..e596d7c3b37f 100644 --- a/include/trace/hooks/remoteproc.h +++ b/include/trace/hooks/remoteproc.h @@ -10,7 +10,12 @@ #include #include +#ifdef __GENKSYMS__ struct rproc; +#else +/* struct rproc */ +#include +#endif /* __GENKSYMS__ */ /* When recovery succeeds */ DECLARE_HOOK(android_vh_rproc_recovery, diff --git a/include/trace/hooks/rwsem.h b/include/trace/hooks/rwsem.h index c8e445216910..ed9daf91f133 100644 --- a/include/trace/hooks/rwsem.h +++ b/include/trace/hooks/rwsem.h @@ -10,8 +10,13 @@ * Following tracepoints are not exported in tracefs and provide a * mechanism for vendor modules to hook and extend functionality */ +#ifdef __GENKSYMS__ struct rw_semaphore; struct rwsem_waiter; +#else +/* struct rw_semaphore, struct rwsem_waiter */ +#include +#endif /* __GENKSYMS__ */ DECLARE_HOOK(android_vh_rwsem_init, TP_PROTO(struct rw_semaphore *sem), TP_ARGS(sem)); diff --git a/include/trace/hooks/sched.h b/include/trace/hooks/sched.h index 55fc6c3a1a89..891c89fa8262 100644 --- a/include/trace/hooks/sched.h +++ b/include/trace/hooks/sched.h @@ -10,7 +10,27 @@ * Following tracepoints are not exported in tracefs and provide a * mechanism for vendor modules to hook and extend functionality */ +#ifdef __GENKSYMS__ +struct cgroup_taskset; +struct cgroup_subsys_state; +struct cpufreq_policy; +struct em_perf_domain; +enum uclamp_id; +struct sched_entity; struct task_struct; +struct uclamp_se; +#else +/* struct cgroup_taskset */ +#include <../kernel/cgroup/cgroup-internal.h> +/* struct cgroup_subsys_state */ +#include +/* struct cpufreq_policy */ +#include +/* struct em_perf_domain */ +#include +/* enum uclamp_id, struct sched_entity, struct task_struct, struct uclamp_se */ +#include +#endif /* __GENKSYMS__ */ DECLARE_RESTRICTED_HOOK(android_rvh_select_task_rq_fair, TP_PROTO(struct task_struct *p, int prev_cpu, int sd_flag, int wake_flags, int *new_cpu), TP_ARGS(p, prev_cpu, sd_flag, wake_flags, new_cpu), 1); @@ -178,7 +198,6 @@ DECLARE_RESTRICTED_HOOK(android_rvh_account_irq, TP_PROTO(struct task_struct *curr, int cpu, s64 delta), TP_ARGS(curr, cpu, delta), 1); -struct sched_entity; DECLARE_RESTRICTED_HOOK(android_rvh_place_entity, TP_PROTO(struct cfs_rq *cfs_rq, struct sched_entity *se, int initial, u64 vruntime), TP_ARGS(cfs_rq, se, initial, vruntime), 1); @@ -195,7 +214,6 @@ DECLARE_RESTRICTED_HOOK(android_rvh_update_misfit_status, TP_PROTO(struct task_struct *p, struct rq *rq, bool *need_update), TP_ARGS(p, rq, need_update), 1); -struct cgroup_taskset; DECLARE_RESTRICTED_HOOK(android_rvh_cpu_cgroup_attach, TP_PROTO(struct cgroup_taskset *tset), TP_ARGS(tset), 1); @@ -204,7 +222,6 @@ DECLARE_RESTRICTED_HOOK(android_rvh_cpu_cgroup_can_attach, TP_PROTO(struct cgroup_taskset *tset, int *retval), TP_ARGS(tset, retval), 1); -struct cgroup_subsys_state; DECLARE_RESTRICTED_HOOK(android_rvh_cpu_cgroup_online, TP_PROTO(struct cgroup_subsys_state *css), TP_ARGS(css), 1); @@ -225,14 +242,12 @@ DECLARE_RESTRICTED_HOOK(android_rvh_sched_exec, TP_PROTO(bool *cond), TP_ARGS(cond), 1); -struct cpufreq_policy; DECLARE_HOOK(android_vh_map_util_freq, TP_PROTO(unsigned long util, unsigned long freq, unsigned long cap, unsigned long *next_freq, struct cpufreq_policy *policy, bool *need_freq_update), TP_ARGS(util, freq, cap, next_freq, policy, need_freq_update)); -struct em_perf_domain; DECLARE_HOOK(android_vh_em_cpu_energy, TP_PROTO(struct em_perf_domain *pd, unsigned long max_util, unsigned long sum_util, @@ -268,8 +283,6 @@ DECLARE_HOOK(android_vh_set_wake_flags, TP_PROTO(int *wake_flags, unsigned int *mode), TP_ARGS(wake_flags, mode)); -enum uclamp_id; -struct uclamp_se; DECLARE_RESTRICTED_HOOK(android_rvh_uclamp_eff_get, TP_PROTO(struct task_struct *p, enum uclamp_id clamp_id, struct uclamp_se *uclamp_max, struct uclamp_se *uclamp_eff, int *ret), @@ -329,7 +342,6 @@ DECLARE_RESTRICTED_HOOK(android_rvh_after_dequeue_task, TP_ARGS(rq, p), 1); struct cfs_rq; -struct sched_entity; struct rq_flags; DECLARE_RESTRICTED_HOOK(android_rvh_enqueue_entity, TP_PROTO(struct cfs_rq *cfs, struct sched_entity *se), diff --git a/include/trace/hooks/shmem_fs.h b/include/trace/hooks/shmem_fs.h index 08e63033070e..617bc69f3d06 100644 --- a/include/trace/hooks/shmem_fs.h +++ b/include/trace/hooks/shmem_fs.h @@ -8,7 +8,12 @@ #include #include +#ifdef __GENKSYMS__ struct page; +#else +/* struct page */ +#include +#endif /* __GENKSYMS__ */ DECLARE_HOOK(android_vh_shmem_alloc_page, TP_PROTO(struct page **page), TP_ARGS(page)); diff --git a/include/trace/hooks/signal.h b/include/trace/hooks/signal.h index ee36ea1de283..1bb556e728c8 100644 --- a/include/trace/hooks/signal.h +++ b/include/trace/hooks/signal.h @@ -8,7 +8,12 @@ #include #include +#ifdef __GENKSYMS__ struct task_struct; +#else +/* struct task_struct */ +#include +#endif /* __GENKSYMS__ */ DECLARE_HOOK(android_vh_do_send_sig_info, TP_PROTO(int sig, struct task_struct *killer, struct task_struct *dst), TP_ARGS(sig, killer, dst)); diff --git a/include/trace/hooks/softlockup.h b/include/trace/hooks/softlockup.h index 9294913f91df..cfa899f5de11 100644 --- a/include/trace/hooks/softlockup.h +++ b/include/trace/hooks/softlockup.h @@ -11,7 +11,12 @@ * Following tracepoints are not exported in tracefs and provide a * mechanism for vendor modules to hook and extend functionality */ +#ifdef __GENKSYMS__ struct pt_regs; +#else +/* struct pt_regs */ +#include +#endif /* __GENKSYMS__ */ DECLARE_HOOK(android_vh_watchdog_timer_softlockup, TP_PROTO(int duration, struct pt_regs *regs, bool is_panic), TP_ARGS(duration, regs, is_panic)); diff --git a/include/trace/hooks/sys.h b/include/trace/hooks/sys.h index 9e5d7a5cb2cf..adcf9eaa7716 100644 --- a/include/trace/hooks/sys.h +++ b/include/trace/hooks/sys.h @@ -8,7 +8,12 @@ #include #include +#ifdef __GENKSYMS__ struct task_struct; +#else +/* struct task_struct */ +#include +#endif /* __GENKSYMS__ */ DECLARE_HOOK(android_vh_syscall_prctl_finished, TP_PROTO(int option, struct task_struct *task), TP_ARGS(option, task)); diff --git a/include/trace/hooks/syscall_check.h b/include/trace/hooks/syscall_check.h index d39802aa4a1e..54720d10cde8 100644 --- a/include/trace/hooks/syscall_check.h +++ b/include/trace/hooks/syscall_check.h @@ -11,8 +11,15 @@ * Following tracepoints are not exported in tracefs and provide a * mechanism for vendor modules to hook and extend functionality */ +#ifdef __GENKSYMS__ struct file; union bpf_attr; +#else +/* struct file */ +#include +/* union bpf_attr */ +#include +#endif /* __GENKSYMS__ */ DECLARE_HOOK(android_vh_check_mmap_file, TP_PROTO(const struct file *file, unsigned long prot, unsigned long flag, unsigned long ret), diff --git a/include/trace/hooks/thermal.h b/include/trace/hooks/thermal.h index 944454ca0e48..5e61ecd38425 100644 --- a/include/trace/hooks/thermal.h +++ b/include/trace/hooks/thermal.h @@ -10,11 +10,16 @@ #include #include +#ifdef __GENKSYMS__ +struct thermal_zone_device; +#else +/* struct thermal_zone_device */ +#include +#endif /* __GENKSYMS__ */ DECLARE_HOOK(android_vh_enable_thermal_genl_check, TP_PROTO(int event, int tz_id, int *enable_thermal_genl), TP_ARGS(event, tz_id, enable_thermal_genl)); -struct thermal_zone_device; DECLARE_HOOK(android_vh_thermal_pm_notify_suspend, TP_PROTO(struct thermal_zone_device *tz, int *irq_wakeable), TP_ARGS(tz, irq_wakeable)); diff --git a/include/trace/hooks/traps.h b/include/trace/hooks/traps.h index d1ceb632c1d5..116c49b73dc7 100644 --- a/include/trace/hooks/traps.h +++ b/include/trace/hooks/traps.h @@ -11,7 +11,12 @@ * Following tracepoints are not exported in tracefs and provide a * mechanism for vendor modules to hook and extend functionality */ +#ifdef __GENKSYMS__ struct pt_regs; +#else +/* struct pt_regs */ +#include +#endif /* __GENKSYMS__ */ DECLARE_RESTRICTED_HOOK(android_rvh_do_undefinstr, TP_PROTO(struct pt_regs *regs, bool user), TP_ARGS(regs, user), diff --git a/include/trace/hooks/typec.h b/include/trace/hooks/typec.h index f87151124075..db06fb8c30e9 100644 --- a/include/trace/hooks/typec.h +++ b/include/trace/hooks/typec.h @@ -11,8 +11,13 @@ * Following tracepoints are not exported in tracefs and provide a * mechanism for vendor modules to hook and extend functionality */ -struct tcpci; +#ifdef __GENKSYMS__ struct tcpci_data; +#else +/* struct tcpci_data */ +#include <../drivers/usb/typec/tcpm/tcpci.h> +#endif /* __GENKSYMS__ */ +struct tcpci; struct tcpm_port; #ifndef TYPEC_TIMER diff --git a/include/trace/hooks/ufshcd.h b/include/trace/hooks/ufshcd.h index 744a1db41631..8483dc966c6c 100644 --- a/include/trace/hooks/ufshcd.h +++ b/include/trace/hooks/ufshcd.h @@ -10,9 +10,20 @@ * Following tracepoints are not exported in tracefs and provide a * mechanism for vendor modules to hook and extend functionality */ +#ifdef __GENKSYMS__ struct ufs_hba; -struct request; struct ufshcd_lrb; +struct uic_command; +struct request; +struct scsi_device; +#else +/* struct ufs_hba, struct ufshcd_lrb, struct uic_command */ +#include <../drivers/scsi/ufs/ufshcd.h> +/* struct request */ +#include +/* struct scsi_device */ +#include +#endif /* __GENKSYMS__ */ DECLARE_HOOK(android_vh_ufs_fill_prdt, TP_PROTO(struct ufs_hba *hba, struct ufshcd_lrb *lrbp, @@ -44,7 +55,6 @@ DECLARE_HOOK(android_vh_ufs_compl_command, TP_PROTO(struct ufs_hba *hba, struct ufshcd_lrb *lrbp), TP_ARGS(hba, lrbp)); -struct uic_command; DECLARE_HOOK(android_vh_ufs_send_uic_command, TP_PROTO(struct ufs_hba *hba, struct uic_command *ucmd, const char *str), @@ -58,7 +68,6 @@ DECLARE_HOOK(android_vh_ufs_check_int_errors, TP_PROTO(struct ufs_hba *hba, bool queue_eh_work), TP_ARGS(hba, queue_eh_work)); -struct scsi_device; DECLARE_HOOK(android_vh_ufs_update_sdev, TP_PROTO(struct scsi_device *sdev), TP_ARGS(sdev)); diff --git a/include/trace/hooks/v4l2core.h b/include/trace/hooks/v4l2core.h index 7207810a7e37..bb53021a7796 100644 --- a/include/trace/hooks/v4l2core.h +++ b/include/trace/hooks/v4l2core.h @@ -10,12 +10,26 @@ #include #include +#ifdef __GENKSYMS__ +struct v4l2_subdev; +struct v4l2_subdev_pad_config; +struct v4l2_subdev_format; +struct v4l2_subdev_frame_interval; +struct v4l2_subdev_selection; +struct v4l2_fmtdesc; struct v4l2_format; +#else +/* struct v4l2_subdev, struct v4l2_subdev_pad_config */ +#include +/* struct v4l2_subdev_format, struct v4l2_subdev_frame_interval, struct v4l2_subdev_selection */ +#include +/* struct v4l2_fmtdesc, struct v4l2_format */ +#include +#endif /* __GENKSYMS__ */ DECLARE_HOOK(android_vh_clear_reserved_fmt_fields, TP_PROTO(struct v4l2_format *fmt, int *ret), TP_ARGS(fmt, ret)); -struct v4l2_fmtdesc; DECLARE_HOOK(android_vh_fill_ext_fmtdesc, TP_PROTO(struct v4l2_fmtdesc *fmtd, const char **descr), TP_ARGS(fmtd, descr)); @@ -24,21 +38,16 @@ DECLARE_HOOK(android_vh_clear_mask_adjust, TP_PROTO(unsigned int ctrl, int *n), TP_ARGS(ctrl, n)); -struct v4l2_subdev; -struct v4l2_subdev_pad_config; -struct v4l2_subdev_selection; DECLARE_HOOK(android_vh_v4l2subdev_set_selection, TP_PROTO(struct v4l2_subdev *sd, struct v4l2_subdev_pad_config *pad, struct v4l2_subdev_selection *sel, int *ret), TP_ARGS(sd, pad, sel, ret)); -struct v4l2_subdev_format; DECLARE_HOOK(android_vh_v4l2subdev_set_fmt, TP_PROTO(struct v4l2_subdev *sd, struct v4l2_subdev_pad_config *pad, struct v4l2_subdev_format *format, int *ret), TP_ARGS(sd, pad, format, ret)); -struct v4l2_subdev_frame_interval; DECLARE_HOOK(android_vh_v4l2subdev_set_frame_interval, TP_PROTO(struct v4l2_subdev *sd, struct v4l2_subdev_frame_interval *fi, int *ret), diff --git a/include/trace/hooks/v4l2mc.h b/include/trace/hooks/v4l2mc.h index 0f60515bb8e2..1f4edc658616 100644 --- a/include/trace/hooks/v4l2mc.h +++ b/include/trace/hooks/v4l2mc.h @@ -10,8 +10,15 @@ #include #include +#ifdef __GENKSYMS__ struct media_link; struct media_link_desc; +#else +/* struct media_link */ +#include +/* struct media_link_desc */ +#include +#endif /* __GENKSYMS__ */ DECLARE_HOOK(android_vh_media_device_setup_link, TP_PROTO(struct media_link *link, struct media_link_desc *linkd, int *ret), TP_ARGS(link, linkd, ret));