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) in is_portid_root() argument
256 return portid == FME_PORTID_ROOT; in is_portid_root()
259 static bool is_portid_port(u32 portid) in is_portid_port() argument
261 return portid < PERF_MAX_PORT_NUM; in is_portid_port()
264 static bool is_portid_root_or_port(u32 portid) in is_portid_root_or_port() argument
266 return is_portid_root(portid) || is_portid_port(portid); in is_portid_root_or_port()
288 static int basic_event_init(struct fme_perf_priv *priv, u32 event, u32 portid) in basic_event_init() argument
290 if (event <= BASIC_EVNT_MAX && is_portid_root(portid)) in basic_event_init()
297 u32 event, u32 portid) in basic_read_event_counter() argument
304 static int cache_event_init(struct fme_perf_priv *priv, u32 event, u32 portid) in cache_event_init() argument
307 event <= CACHE_EVNT_MAX && is_portid_root(portid)) in cache_event_init()
314 u32 event, u32 portid) in cache_read_event_counter() argument
350 u32 portid) in is_fabric_event_supported() argument
352 if (event > FAB_EVNT_MAX || !is_portid_root_or_port(portid)) in is_fabric_event_supported()
363 static int fabric_event_init(struct fme_perf_priv *priv, u32 event, u32 portid) in fabric_event_init() argument
369 if (!is_fabric_event_supported(priv, event, portid)) in fabric_event_init()
381 if (priv->fab_users && priv->fab_port_id != portid) { in fabric_event_init()
393 if (priv->fab_port_id == portid) in fabric_event_init()
396 priv->fab_port_id = portid; in fabric_event_init()
401 if (is_portid_root(portid)) { in fabric_event_init()
405 v |= FIELD_PREP(FAB_PORT_ID, portid); in fabric_event_init()
415 u32 portid) in fabric_event_destroy() argument
423 u32 portid) in fabric_read_event_counter() argument
444 static int vtd_event_init(struct fme_perf_priv *priv, u32 event, u32 portid) in vtd_event_init() argument
447 event <= VTD_EVNT_MAX && is_portid_port(portid)) in vtd_event_init()
454 u32 portid) in vtd_read_event_counter() argument
459 event += (portid * (VTD_EVNT_MAX + 1)); in vtd_read_event_counter()
477 static int vtd_sip_event_init(struct fme_perf_priv *priv, u32 event, u32 portid) in vtd_sip_event_init() argument
480 event <= VTD_SIP_EVNT_MAX && is_portid_root(portid)) in vtd_sip_event_init()
487 u32 portid) in vtd_sip_read_event_counter() argument
800 u32 eventid, evtype, portid; in fme_perf_event_init() local
821 portid = get_portid(event->attr.config); in fme_perf_event_init()
828 hwc->config_base = portid; in fme_perf_event_init()
833 __func__, eventid, evtype, portid); in fme_perf_event_init()
837 return ops->event_init(priv, eventid, portid); in fme_perf_event_init()