Hi

I want to specify the Cell pm_control/pm_interval register value from 
pfmon.
This patch adds them to libpfm IF structure( pfmlib_cell_input_param_t).

Funayama-san, Stephane-san.
Is this OK?

# If you apply this patch, please use attached file instead of the 
following inlined patch.

Thanks,
Takashi Yamamoto.




------------------------------------------------------------------------------
This patch adds two parameters to pfmlib_cell_input_param_t 
to specify the pm_control reg and the pm_interval reg from pfmon command.

Signed-off-by: Takashi Yamamoto <Takashi02_Yamamoto at hq.scei.sony.co.jp>
---
 include/perfmon/pfmlib_cell.h |    2 ++
 lib/pfmlib_cell.c             |    5 ++---
 2 files changed, 4 insertions(+), 3 deletions(-)

--- a/include/perfmon/pfmlib_cell.h
+++ b/include/perfmon/pfmlib_cell.h
@@ -45,6 +45,8 @@ typedef struct {
  */
 typedef struct {
        unsigned int triggers;
+       unsigned int interval;
+       unsigned int control;
        pfmlib_cell_counter_t pfp_cell_counters[PMU_CELL_NUM_COUNTERS]; /* 
extended counter features */
        uint64_t              reserved[4];                              /* 
for future use */
 } pfmlib_cell_input_param_t;
--- a/lib/pfmlib_cell.c
+++ b/lib/pfmlib_cell.c
@@ -53,7 +53,6 @@
 #define PFM_CELL_BASE_WORD_UNIT_FIELD_BIT      24
 #define PFM_CELL_WORD_UNIT_FIELD_WIDTH         2
 #define PFM_CELL_MAX_WORD_NUMBER               3
-#define PFM_CELL_DEFAULT_PM_CONTROL_REG_VALUE  0x0
 #define PFM_CELL_COUNTER_CONTROL_GROUP1                0x80000000
 
 #define ONLY_WORD(x) \
@@ -291,10 +290,10 @@ pfm_cell_dispatch_counters(pfmlib_input_
        pc[4].reg_value = 0;
 
        pc[5].reg_num   = REG_PM_CONTROL;
-       pc[5].reg_value = PFM_CELL_DEFAULT_PM_CONTROL_REG_VALUE;
+       pc[5].reg_value = mod_in->control;
 
        pc[6].reg_num   = REG_PM_INTERVAL;
-       pc[6].reg_value = 0;
+       pc[6].reg_value = mod_in->interval;
 
        pc[7].reg_num   = REG_PM_START_STOP;
        pc[7].reg_value = mod_in->triggers;

Attachment: add-interval-control-param.patch
Description: Binary data

_______________________________________________
perfmon mailing list
[email protected]
http://www.hpl.hp.com/hosted/linux/mail-archives/perfmon/

Reply via email to