blob: 82897058dba2c4734c8fe657d3492d440ebb2a9c [file] [log] [blame]
rjw1f884582022-01-06 17:20:42 +08001/*
2 * Copyright (C) 2019 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 int (*met_perf_event_read_local_symbol)(struct perf_event *ev, u64 *value);
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);
46#ifdef MET_EVENT_POWER_SUPPORT
47extern int met_reg_event_power(void);
48extern int (*met_reg_event_power_symbol)(void);
49extern void met_unreg_event_power(void);
50extern void (*met_unreg_event_power_symbol)(void);
51#endif
52extern void met_arch_setup_dma_ops(struct device *dev);
53extern int met_perf_event_read_local(struct perf_event *ev, u64 *value);
54extern struct task_struct *met_kthread_create_on_cpu(int (*threadfn)(void *data),
55 void *data, unsigned int cpu,
56 const char *namefmt);
57extern int met_smp_call_function_single(int cpu, smp_call_func_t func, void *info, int wait);
58extern void met_arch_send_call_function_single_ipi(int cpu);
59
60#if defined(CONFIG_MTK_TINYSYS_SSPM_SUPPORT) && defined(ONDIEMET_SUPPORT)
61#ifdef SSPM_VERSION_V2
62#include "sspm/ondiemet_sspm.h"
63extern struct mtk_ipi_device sspm_ipidev;
64extern struct mtk_ipi_device *sspm_ipidev_symbol;
65#endif
66#endif
67
68#endif /* MET_KERNEL_SYMBOL */