blob: 27ff39ec1bf1a39f11b25277a4b5469ee4571510 [file] [log] [blame]
rjw1f884582022-01-06 17:20:42 +08001/*
2 * Copyright (C) 2018 MediaTek Inc.
3 *
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 */
13
14#ifndef MET_KERNEL_SYMBOL
15#define MET_KERNEL_SYMBOL
16
17/*lookup symbol*/
18#include <asm/cpu.h>
19#include <linux/kallsyms.h>
20#include <linux/perf_event.h>
21#include <linux/kthread.h>
22
23#if defined(CONFIG_MET_ARM_32BIT)
24extern void met_get_cpuinfo(int cpu, struct cpuinfo_arm **cpuinfo);
25extern void (*met_get_cpuinfo_symbol)(int cpu, struct cpuinfo_arm **cpuinfo);
26#else
27extern void met_get_cpuinfo(int cpu, struct cpuinfo_arm64 **cpuinfo);
28extern void (*met_get_cpuinfo_symbol)(int cpu, struct cpuinfo_arm64 **cpuinfo);
29#endif
30
31extern void (*tracing_record_cmdline_symbol)(struct task_struct *tsk);
32extern void met_cpu_frequency(unsigned int frequency, unsigned int cpu_id);
33extern void (*met_cpu_frequency_symbol)(unsigned int frequency, unsigned int cpu_id);
34extern void (*met_arch_setup_dma_ops_symbol)(struct device *dev);
35extern u64 (*met_perf_event_read_local_symbol)(struct perf_event *ev);
36extern struct task_struct *(*met_kthread_create_on_cpu_symbol)(int (*threadfn)(void *data),
37 void *data, unsigned int cpu,
38 const char *namefmt);
39extern int (*met_smp_call_function_single_symbol)(int cpu, smp_call_func_t func, void *info, int wait);
40
41extern void met_tracing_record_cmdline(struct task_struct *tsk);
42extern int met_reg_switch(void);
43extern int (*met_reg_switch_symbol)(void);
44extern void met_unreg_switch(void);
45extern void (*met_unreg_switch_symbol)(void);
46extern void met_arch_setup_dma_ops(struct device *dev);
47extern u64 met_perf_event_read_local(struct perf_event *ev);
48extern struct task_struct *met_kthread_create_on_cpu(int (*threadfn)(void *data),
49 void *data, unsigned int cpu,
50 const char *namefmt);
51extern int met_smp_call_function_single(int cpu, smp_call_func_t func, void *info, int wait);
52extern void met_arch_send_call_function_single_ipi(int cpu);
53#endif /* MET_KERNEL_SYMBOL */