18c2ecf20Sopenharmony_ci/**
28c2ecf20Sopenharmony_ci * @file arch/alpha/oprofile/op_impl.h
38c2ecf20Sopenharmony_ci *
48c2ecf20Sopenharmony_ci * @remark Copyright 2002 OProfile authors
58c2ecf20Sopenharmony_ci * @remark Read the file COPYING
68c2ecf20Sopenharmony_ci *
78c2ecf20Sopenharmony_ci * @author Richard Henderson <rth@twiddle.net>
88c2ecf20Sopenharmony_ci */
98c2ecf20Sopenharmony_ci
108c2ecf20Sopenharmony_ci#ifndef OP_IMPL_H
118c2ecf20Sopenharmony_ci#define OP_IMPL_H 1
128c2ecf20Sopenharmony_ci
138c2ecf20Sopenharmony_ciextern int (*perf_irq)(void);
148c2ecf20Sopenharmony_ci
158c2ecf20Sopenharmony_ci/* Per-counter configuration as set via oprofilefs.  */
168c2ecf20Sopenharmony_cistruct op_counter_config {
178c2ecf20Sopenharmony_ci	unsigned long enabled;
188c2ecf20Sopenharmony_ci	unsigned long event;
198c2ecf20Sopenharmony_ci	unsigned long count;
208c2ecf20Sopenharmony_ci	/* Dummies because I am too lazy to hack the userspace tools.  */
218c2ecf20Sopenharmony_ci	unsigned long kernel;
228c2ecf20Sopenharmony_ci	unsigned long user;
238c2ecf20Sopenharmony_ci	unsigned long exl;
248c2ecf20Sopenharmony_ci	unsigned long unit_mask;
258c2ecf20Sopenharmony_ci};
268c2ecf20Sopenharmony_ci
278c2ecf20Sopenharmony_ci/* Per-architecture configure and hooks.  */
288c2ecf20Sopenharmony_cistruct op_mips_model {
298c2ecf20Sopenharmony_ci	void (*reg_setup) (struct op_counter_config *);
308c2ecf20Sopenharmony_ci	void (*cpu_setup) (void *dummy);
318c2ecf20Sopenharmony_ci	int (*init)(void);
328c2ecf20Sopenharmony_ci	void (*exit)(void);
338c2ecf20Sopenharmony_ci	void (*cpu_start)(void *args);
348c2ecf20Sopenharmony_ci	void (*cpu_stop)(void *args);
358c2ecf20Sopenharmony_ci	char *cpu_type;
368c2ecf20Sopenharmony_ci	unsigned char num_counters;
378c2ecf20Sopenharmony_ci};
388c2ecf20Sopenharmony_ci
398c2ecf20Sopenharmony_civoid op_mips_backtrace(struct pt_regs * const regs, unsigned int depth);
408c2ecf20Sopenharmony_ci
418c2ecf20Sopenharmony_ci#endif
42