|
Packit Service |
a1973e |
/*
|
|
Packit Service |
a1973e |
* Cell PMU specific types and definitions
|
|
Packit Service |
a1973e |
*
|
|
Packit Service |
a1973e |
* Copyright (c) 2007 TOSHIBA CORPORATION based on code from
|
|
Packit Service |
a1973e |
* Copyright (c) 2001-2006 Hewlett-Packard Development Company, L.P.
|
|
Packit Service |
a1973e |
* Contributed by Stephane Eranian <eranian@hpl.hp.com>
|
|
Packit Service |
a1973e |
*
|
|
Packit Service |
a1973e |
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
Packit Service |
a1973e |
* of this software and associated documentation files (the "Software"), to deal
|
|
Packit Service |
a1973e |
* in the Software without restriction, including without limitation the rights
|
|
Packit Service |
a1973e |
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
|
Packit Service |
a1973e |
* of the Software, and to permit persons to whom the Software is furnished to do so,
|
|
Packit Service |
a1973e |
* subject to the following conditions:
|
|
Packit Service |
a1973e |
*
|
|
Packit Service |
a1973e |
* The above copyright notice and this permission notice shall be included in all
|
|
Packit Service |
a1973e |
* copies or substantial portions of the Software.
|
|
Packit Service |
a1973e |
*
|
|
Packit Service |
a1973e |
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
|
Packit Service |
a1973e |
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
|
|
Packit Service |
a1973e |
* PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
|
Packit Service |
a1973e |
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
|
|
Packit Service |
a1973e |
* CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
|
|
Packit Service |
a1973e |
* OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
Packit Service |
a1973e |
*/
|
|
Packit Service |
a1973e |
#ifndef __PFMLIB_CELL_H__
|
|
Packit Service |
a1973e |
#define __PFMLIB_CELL_H__
|
|
Packit Service |
a1973e |
|
|
Packit Service |
a1973e |
#include <perfmon/pfmlib.h>
|
|
Packit Service |
a1973e |
|
|
Packit Service |
a1973e |
#define PMU_CELL_NUM_COUNTERS 8 /* total number of EvtSel/EvtCtr */
|
|
Packit Service |
a1973e |
#define PMU_CELL_NUM_PERFSEL 8 /* total number of EvtSel */
|
|
Packit Service |
a1973e |
#define PMU_CELL_NUM_PERFCTR 8 /* total number of EvtCtr */
|
|
Packit Service |
a1973e |
|
|
Packit Service |
a1973e |
typedef struct {
|
|
Packit Service |
a1973e |
unsigned int pmX_control_num; /* for pmX_control X=1(pm0_control)...X=8(pm7_control) */
|
|
Packit Service |
a1973e |
unsigned int spe_subunit;
|
|
Packit Service |
a1973e |
unsigned int polarity;
|
|
Packit Service |
a1973e |
unsigned int input_control;
|
|
Packit Service |
a1973e |
unsigned int cnt_mask; /* threshold (reserved) */
|
|
Packit Service |
a1973e |
unsigned int flags; /* counter specific flag (reserved) */
|
|
Packit Service |
a1973e |
} pfmlib_cell_counter_t;
|
|
Packit Service |
a1973e |
|
|
Packit Service |
a1973e |
/*
|
|
Packit Service |
a1973e |
* Cell specific parameters for the library
|
|
Packit Service |
a1973e |
*/
|
|
Packit Service |
a1973e |
typedef struct {
|
|
Packit Service |
a1973e |
unsigned int triggers;
|
|
Packit Service |
a1973e |
unsigned int interval;
|
|
Packit Service |
a1973e |
unsigned int control;
|
|
Packit Service |
a1973e |
pfmlib_cell_counter_t pfp_cell_counters[PMU_CELL_NUM_COUNTERS]; /* extended counter features */
|
|
Packit Service |
a1973e |
uint64_t reserved[4]; /* for future use */
|
|
Packit Service |
a1973e |
} pfmlib_cell_input_param_t;
|
|
Packit Service |
a1973e |
|
|
Packit Service |
a1973e |
typedef struct {
|
|
Packit Service |
a1973e |
uint64_t reserved[8]; /* for future use */
|
|
Packit Service |
a1973e |
} pfmlib_cell_output_param_t;
|
|
Packit Service |
a1973e |
|
|
Packit Service |
a1973e |
int pfm_cell_spe_event(unsigned int event_index);
|
|
Packit Service |
a1973e |
|
|
Packit Service |
a1973e |
#endif /* __PFMLIB_CELL_H__ */
|