Lines Matching refs:ctr
62 static void loongson3_reg_setup(struct op_counter_config *ctr) in loongson3_reg_setup() argument
71 if (ctr[0].enabled) { in loongson3_reg_setup()
72 control1 |= LOONGSON3_PERFCTRL_EVENT(0, ctr[0].event) | in loongson3_reg_setup()
74 if (ctr[0].kernel) in loongson3_reg_setup()
76 if (ctr[0].user) in loongson3_reg_setup()
78 reg.reset_counter1 = 0x8000000000000000ULL - ctr[0].count; in loongson3_reg_setup()
81 if (ctr[1].enabled) { in loongson3_reg_setup()
82 control2 |= LOONGSON3_PERFCTRL_EVENT(1, ctr[1].event) | in loongson3_reg_setup()
84 if (ctr[1].kernel) in loongson3_reg_setup()
86 if (ctr[1].user) in loongson3_reg_setup()
88 reg.reset_counter2 = 0x8000000000000000ULL - ctr[1].count; in loongson3_reg_setup()
91 if (ctr[0].enabled) in loongson3_reg_setup()
93 if (ctr[1].enabled) in loongson3_reg_setup()
98 reg.ctr1_enable = ctr[0].enabled; in loongson3_reg_setup()
99 reg.ctr2_enable = ctr[1].enabled; in loongson3_reg_setup()