Lines Matching defs:config
620 static u64 p4_get_alias_event(u64 config)
630 if (!(config & P4_CONFIG_ALIASABLE))
633 config_match = config & P4_CONFIG_EVENT_ALIAS_MASK;
648 return config_match | (config & P4_CONFIG_EVENT_ALIAS_IMMUTABLE_BITS);
705 static struct p4_event_bind *p4_config_get_bind(u64 config)
707 unsigned int evnt = p4_config_unpack_event(config);
720 u64 config;
722 config = p4_general_events[hw_event];
723 bind = p4_config_get_bind(config);
725 config |= p4_config_pack_cccr(P4_CCCR_ESEL(esel));
727 return config;
754 v = p4_config_unpack_event(event->attr.config);
785 emask = p4_config_unpack_escr(event->attr.config) & P4_ESCR_EVENTMASK_MASK;
792 if (p4_config_pebs_has(event->attr.config, P4_PEBS_CONFIG_ENABLE))
795 v = p4_config_unpack_metric(event->attr.config);
811 * specific flags in config (and will save some cpu cycles)
817 event->hw.config = p4_config_pack_escr(escr) |
821 event->hw.config = p4_set_ht_bit(event->hw.config);
830 event->attr.config &= P4_CONFIG_MASK;
840 event->hw.config |= event->attr.config;
841 bind = p4_config_get_bind(event->attr.config);
847 event->hw.config |= p4_config_pack_cccr(P4_CCCR_ESEL(esel));
914 p4_config_unpack_cccr(hwc->config) & ~P4_CCCR_ENABLE & ~P4_CCCR_OVF & ~P4_CCCR_RESERVED);
933 static void p4_pmu_enable_pebs(u64 config)
940 idx = p4_config_unpack_metric(config);
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));
973 cccr = p4_config_unpack_cccr(hwc->config);
979 p4_pmu_enable_pebs(hwc->config);
1074 if (!p4_should_swap_ts(hwc->config, cpu))
1082 escr = p4_config_unpack_escr(hwc->config);
1083 cccr = p4_config_unpack_cccr(hwc->config);
1096 hwc->config = p4_config_pack_escr(escr);
1097 hwc->config |= p4_config_pack_cccr(cccr);
1098 hwc->config |= P4_CONFIG_HT;
1110 hwc->config = p4_config_pack_escr(escr);
1111 hwc->config |= p4_config_pack_cccr(cccr);
1112 hwc->config &= ~P4_CONFIG_HT;
1237 bind = p4_config_get_bind(hwc->config);
1242 if (hwc->idx != -1 && !p4_should_swap_ts(hwc->config, cpu)) {
1254 config_alias = p4_get_alias_event(hwc->config);
1257 hwc->config = config_alias;
1264 * Unfortunately, p4_pmu_swap_config_ts touches the hwc->config
1277 if (p4_should_swap_ts(hwc->config, cpu))
1291 PMU_FORMAT_ATTR(cccr, "config:0-31" );
1292 PMU_FORMAT_ATTR(escr, "config:32-62");
1293 PMU_FORMAT_ATTR(ht, "config:63" );