Lines Matching refs:portid
170 int (*event_init)(struct fme_perf_priv *priv, u32 event, u32 portid);
172 u32 portid);
173 u64 (*read_counter)(struct fme_perf_priv *priv, u32 event, u32 portid);
219 PMU_FORMAT_ATTR(portid, "config:16-23");
254 static bool is_portid_root(u32 portid)
256 return portid == FME_PORTID_ROOT;
259 static bool is_portid_port(u32 portid)
261 return portid < PERF_MAX_PORT_NUM;
264 static bool is_portid_root_or_port(u32 portid)
266 return is_portid_root(portid) || is_portid_port(portid);
288 static int basic_event_init(struct fme_perf_priv *priv, u32 event, u32 portid)
290 if (event <= BASIC_EVNT_MAX && is_portid_root(portid))
297 u32 event, u32 portid)
304 static int cache_event_init(struct fme_perf_priv *priv, u32 event, u32 portid)
307 event <= CACHE_EVNT_MAX && is_portid_root(portid))
314 u32 event, u32 portid)
350 u32 portid)
352 if (event > FAB_EVNT_MAX || !is_portid_root_or_port(portid))
363 static int fabric_event_init(struct fme_perf_priv *priv, u32 event, u32 portid)
369 if (!is_fabric_event_supported(priv, event, portid))
381 if (priv->fab_users && priv->fab_port_id != portid) {
393 if (priv->fab_port_id == portid)
396 priv->fab_port_id = portid;
401 if (is_portid_root(portid)) {
405 v |= FIELD_PREP(FAB_PORT_ID, portid);
415 u32 portid)
423 u32 portid)
444 static int vtd_event_init(struct fme_perf_priv *priv, u32 event, u32 portid)
447 event <= VTD_EVNT_MAX && is_portid_port(portid))
454 u32 portid)
459 event += (portid * (VTD_EVNT_MAX + 1));
477 static int vtd_sip_event_init(struct fme_perf_priv *priv, u32 event, u32 portid)
480 event <= VTD_SIP_EVNT_MAX && is_portid_root(portid))
487 u32 portid)
536 ptr += sprintf(ptr, ",portid=0x%02x\n", FME_PORTID_ROOT);
538 ptr += sprintf(ptr, ",portid=?\n");
800 u32 eventid, evtype, portid;
821 portid = get_portid(event->attr.config);
828 hwc->config_base = portid;
832 dev_dbg(priv->dev, "%s event=0x%x, evtype=0x%x, portid=0x%x,\n",
833 __func__, eventid, evtype, portid);
837 return ops->event_init(priv, eventid, portid);