Lines Matching defs:hwc

856 static inline int p4_pmu_clear_cccr_ovf(struct hw_perf_event *hwc)
861 rdmsrl(hwc->config_base, v);
863 wrmsrl(hwc->config_base, v & ~P4_CCCR_OVF);
874 rdmsrl(hwc->event_base, v);
906 struct hw_perf_event *hwc = &event->hw;
913 (void)wrmsrl_safe(hwc->config_base,
914 p4_config_unpack_cccr(hwc->config) & ~P4_CCCR_ENABLE & ~P4_CCCR_OVF & ~P4_CCCR_RESERVED);
952 struct hw_perf_event *hwc = &event->hw;
953 int thread = p4_ht_config_thread(hwc->config);
954 u64 escr_conf = p4_config_unpack_escr(p4_clear_ht_bit(hwc->config));
955 unsigned int idx = p4_config_unpack_event(hwc->config);
966 WARN_ON_ONCE(p4_is_event_cascaded(hwc->config));
967 WARN_ON_ONCE(hwc->idx == 1);
973 cccr = p4_config_unpack_cccr(hwc->config);
979 p4_pmu_enable_pebs(hwc->config);
982 (void)wrmsrl_safe(hwc->config_base,
1011 struct hw_perf_event *hwc = &event->hw;
1012 s64 left = this_cpu_read(pmc_prev_left[hwc->idx]);
1017 if (hwc->event_base) {
1026 wrmsrl(hwc->event_base, (u64)(-left) & x86_pmu.cntval_mask);
1037 struct hw_perf_event *hwc;
1054 hwc = &event->hw;
1056 WARN_ON_ONCE(hwc->idx != idx);
1059 overflow = p4_pmu_clear_cccr_ovf(hwc);
1068 perf_sample_data_init(&data, 0, hwc->last_period);
1100 static void p4_pmu_swap_config_ts(struct hw_perf_event *hwc, int cpu)
1107 if (!p4_should_swap_ts(hwc->config, cpu))
1115 escr = p4_config_unpack_escr(hwc->config);
1116 cccr = p4_config_unpack_cccr(hwc->config);
1129 hwc->config = p4_config_pack_escr(escr);
1130 hwc->config |= p4_config_pack_cccr(cccr);
1131 hwc->config |= P4_CONFIG_HT;
1143 hwc->config = p4_config_pack_escr(escr);
1144 hwc->config |= p4_config_pack_cccr(cccr);
1145 hwc->config &= ~P4_CONFIG_HT;
1245 struct hw_perf_event *hwc;
1257 hwc = &cpuc->event_list[i]->hw;
1270 bind = p4_config_get_bind(hwc->config);
1275 if (hwc->idx != -1 && !p4_should_swap_ts(hwc->config, cpu)) {
1276 cntr_idx = hwc->idx;
1278 assign[i] = hwc->idx;
1287 config_alias = p4_get_alias_event(hwc->config);
1290 hwc->config = config_alias;
1297 * Unfortunately, p4_pmu_swap_config_ts touches the hwc->config
1310 if (p4_should_swap_ts(hwc->config, cpu))
1311 hwc->idx = -1;
1312 p4_pmu_swap_config_ts(hwc, cpu);