rjw | 1f88458 | 2022-01-06 17:20:42 +0800 | [diff] [blame^] | 1 | /* |
| 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) |
| 24 | extern void met_get_cpuinfo(int cpu, struct cpuinfo_arm **cpuinfo); |
| 25 | extern void (*met_get_cpuinfo_symbol)(int cpu, struct cpuinfo_arm **cpuinfo); |
| 26 | #else |
| 27 | extern void met_get_cpuinfo(int cpu, struct cpuinfo_arm64 **cpuinfo); |
| 28 | extern void (*met_get_cpuinfo_symbol)(int cpu, struct cpuinfo_arm64 **cpuinfo); |
| 29 | #endif |
| 30 | |
| 31 | extern void (*tracing_record_cmdline_symbol)(struct task_struct *tsk); |
| 32 | extern void met_cpu_frequency(unsigned int frequency, unsigned int cpu_id); |
| 33 | extern void (*met_cpu_frequency_symbol)(unsigned int frequency, unsigned int cpu_id); |
| 34 | extern void (*met_arch_setup_dma_ops_symbol)(struct device *dev); |
| 35 | extern u64 (*met_perf_event_read_local_symbol)(struct perf_event *ev); |
| 36 | extern struct task_struct *(*met_kthread_create_on_cpu_symbol)(int (*threadfn)(void *data), |
| 37 | void *data, unsigned int cpu, |
| 38 | const char *namefmt); |
| 39 | extern int (*met_smp_call_function_single_symbol)(int cpu, smp_call_func_t func, void *info, int wait); |
| 40 | |
| 41 | extern void met_tracing_record_cmdline(struct task_struct *tsk); |
| 42 | extern int met_reg_switch(void); |
| 43 | extern int (*met_reg_switch_symbol)(void); |
| 44 | extern void met_unreg_switch(void); |
| 45 | extern void (*met_unreg_switch_symbol)(void); |
| 46 | extern void met_arch_setup_dma_ops(struct device *dev); |
| 47 | extern u64 met_perf_event_read_local(struct perf_event *ev); |
| 48 | extern struct task_struct *met_kthread_create_on_cpu(int (*threadfn)(void *data), |
| 49 | void *data, unsigned int cpu, |
| 50 | const char *namefmt); |
| 51 | extern int met_smp_call_function_single(int cpu, smp_call_func_t func, void *info, int wait); |
| 52 | extern void met_arch_send_call_function_single_ipi(int cpu); |
| 53 | #endif /* MET_KERNEL_SYMBOL */ |