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_ci/* Per-counter configuration as set via oprofilefs.  */
148c2ecf20Sopenharmony_cistruct op_counter_config {
158c2ecf20Sopenharmony_ci	unsigned long enabled;
168c2ecf20Sopenharmony_ci	unsigned long event;
178c2ecf20Sopenharmony_ci	unsigned long count;
188c2ecf20Sopenharmony_ci	/* Dummies because I am too lazy to hack the userspace tools.  */
198c2ecf20Sopenharmony_ci	unsigned long kernel;
208c2ecf20Sopenharmony_ci	unsigned long user;
218c2ecf20Sopenharmony_ci	unsigned long unit_mask;
228c2ecf20Sopenharmony_ci};
238c2ecf20Sopenharmony_ci
248c2ecf20Sopenharmony_ci/* System-wide configuration as set via oprofilefs.  */
258c2ecf20Sopenharmony_cistruct op_system_config {
268c2ecf20Sopenharmony_ci	unsigned long enable_pal;
278c2ecf20Sopenharmony_ci	unsigned long enable_kernel;
288c2ecf20Sopenharmony_ci	unsigned long enable_user;
298c2ecf20Sopenharmony_ci};
308c2ecf20Sopenharmony_ci
318c2ecf20Sopenharmony_ci/* Cached values for the various performance monitoring registers.  */
328c2ecf20Sopenharmony_cistruct op_register_config {
338c2ecf20Sopenharmony_ci	unsigned long enable;
348c2ecf20Sopenharmony_ci	unsigned long mux_select;
358c2ecf20Sopenharmony_ci	unsigned long proc_mode;
368c2ecf20Sopenharmony_ci	unsigned long freq;
378c2ecf20Sopenharmony_ci	unsigned long reset_values;
388c2ecf20Sopenharmony_ci	unsigned long need_reset;
398c2ecf20Sopenharmony_ci};
408c2ecf20Sopenharmony_ci
418c2ecf20Sopenharmony_ci/* Per-architecture configuration and hooks.  */
428c2ecf20Sopenharmony_cistruct op_axp_model {
438c2ecf20Sopenharmony_ci	void (*reg_setup) (struct op_register_config *,
448c2ecf20Sopenharmony_ci			   struct op_counter_config *,
458c2ecf20Sopenharmony_ci			   struct op_system_config *);
468c2ecf20Sopenharmony_ci	void (*cpu_setup) (void *);
478c2ecf20Sopenharmony_ci	void (*reset_ctr) (struct op_register_config *, unsigned long);
488c2ecf20Sopenharmony_ci	void (*handle_interrupt) (unsigned long, struct pt_regs *,
498c2ecf20Sopenharmony_ci				  struct op_counter_config *);
508c2ecf20Sopenharmony_ci	char *cpu_type;
518c2ecf20Sopenharmony_ci	unsigned char num_counters;
528c2ecf20Sopenharmony_ci	unsigned char can_set_proc_mode;
538c2ecf20Sopenharmony_ci};
548c2ecf20Sopenharmony_ci
558c2ecf20Sopenharmony_ci#endif
56