Home
last modified time | relevance | path

Searched refs:hwc (Results 1 – 25 of 84) sorted by relevance

1234

/linux/drivers/net/ethernet/microsoft/mana/
H A Dhw_channel.c9 static int mana_hwc_get_msg_index(struct hw_channel_context *hwc, u16 *msg_id) in mana_hwc_get_msg_index() argument
11 struct gdma_resource *r = &hwc->inflight_msg_res; in mana_hwc_get_msg_index()
15 down(&hwc->sema); in mana_hwc_get_msg_index()
19 index = find_first_zero_bit(hwc->inflight_msg_res.map, in mana_hwc_get_msg_index()
20 hwc->inflight_msg_res.size); in mana_hwc_get_msg_index()
22 bitmap_set(hwc->inflight_msg_res.map, index, 1); in mana_hwc_get_msg_index()
31 static void mana_hwc_put_msg_index(struct hw_channel_context *hwc, u16 msg_id) in mana_hwc_put_msg_index() argument
33 struct gdma_resource *r = &hwc->inflight_msg_res; in mana_hwc_put_msg_index()
37 bitmap_clear(hwc->inflight_msg_res.map, msg_id, 1); in mana_hwc_put_msg_index()
40 up(&hwc in mana_hwc_put_msg_index()
79 mana_hwc_handle_resp(struct hw_channel_context * hwc,u32 resp_len,struct hwc_work_request * rx_req,u16 msg_id) mana_hwc_handle_resp() argument
115 struct hw_channel_context *hwc = ctx; mana_hwc_init_event_handler() local
243 struct hw_channel_context *hwc = ctx; mana_hwc_rx_event_handler() local
298 struct hw_channel_context *hwc = ctx; mana_hwc_tx_event_handler() local
304 mana_hwc_create_gdma_wq(struct hw_channel_context * hwc,enum gdma_queue_type type,u64 queue_size,struct gdma_queue ** queue) mana_hwc_create_gdma_wq() argument
320 mana_hwc_create_gdma_cq(struct hw_channel_context * hwc,u64 queue_size,void * ctx,gdma_cq_callback * cb,struct gdma_queue * parent_eq,struct gdma_queue ** queue) mana_hwc_create_gdma_cq() argument
338 mana_hwc_create_gdma_eq(struct hw_channel_context * hwc,u64 queue_size,void * ctx,gdma_eq_callback * cb,struct gdma_queue ** queue) mana_hwc_create_gdma_eq() argument
398 mana_hwc_create_cq(struct hw_channel_context * hwc,u16 q_depth,gdma_eq_callback * callback,void * ctx,hwc_rx_event_handler_t * rx_ev_hdlr,void * rx_ev_ctx,hwc_tx_event_handler_t * tx_ev_hdlr,void * tx_ev_ctx,struct hwc_cq ** hwc_cq_ptr) mana_hwc_create_cq() argument
459 mana_hwc_alloc_dma_buf(struct hw_channel_context * hwc,u16 q_depth,u32 max_msg_size,struct hwc_dma_buf ** dma_buf_ptr) mana_hwc_alloc_dma_buf() argument
508 mana_hwc_dealloc_dma_buf(struct hw_channel_context * hwc,struct hwc_dma_buf * dma_buf) mana_hwc_dealloc_dma_buf() argument
519 mana_hwc_destroy_wq(struct hw_channel_context * hwc,struct hwc_wq * hwc_wq) mana_hwc_destroy_wq() argument
531 mana_hwc_create_wq(struct hw_channel_context * hwc,enum gdma_queue_type q_type,u16 q_depth,u32 max_msg_size,struct hwc_cq * hwc_cq,struct hwc_wq ** hwc_wq_ptr) mana_hwc_create_wq() argument
625 mana_hwc_init_inflight_msg(struct hw_channel_context * hwc,u16 num_msg) mana_hwc_init_inflight_msg() argument
638 mana_hwc_test_channel(struct hw_channel_context * hwc,u16 q_depth,u32 max_req_msg_size,u32 max_resp_msg_size) mana_hwc_test_channel() argument
672 struct hw_channel_context *hwc = gc->hwc.driver_data; mana_hwc_establish_channel() local
710 mana_hwc_init_queues(struct hw_channel_context * hwc,u16 q_depth,u32 max_req_msg_size,u32 max_resp_msg_size) mana_hwc_init_queues() argument
758 struct hw_channel_context *hwc; mana_hwc_create_channel() local
813 struct hw_channel_context *hwc = gc->hwc.driver_data; mana_hwc_destroy_channel() local
855 mana_hwc_send_request(struct hw_channel_context * hwc,u32 req_len,const void * req,u32 resp_len,void * resp) mana_hwc_send_request() argument
[all...]
/linux/drivers/net/ethernet/mellanox/mlx5/core/sf/
H A Dhw_table.c35 struct mlx5_sf_hwc_table *hwc; member
46 if (table->hwc[i].controller == controller) in mlx5_sf_controller_to_hwc()
47 return &table->hwc[i]; in mlx5_sf_controller_to_hwc()
50 return &table->hwc[!!controller]; in mlx5_sf_controller_to_hwc()
55 struct mlx5_sf_hwc_table *hwc; in mlx5_sf_sw_to_hw_id() local
57 hwc = mlx5_sf_controller_to_hwc(dev, controller); in mlx5_sf_sw_to_hw_id()
58 return hwc->start_fn_id + sw_id; in mlx5_sf_sw_to_hw_id()
61 static u16 mlx5_sf_hw_to_sw_id(struct mlx5_sf_hwc_table *hwc, u16 hw_id) in mlx5_sf_hw_to_sw_id() argument
63 return hw_id - hwc->start_fn_id; in mlx5_sf_hw_to_sw_id()
72 if (table->hwc[ in mlx5_sf_table_fn_to_hwc()
85 struct mlx5_sf_hwc_table *hwc; mlx5_sf_hw_table_id_alloc() local
115 struct mlx5_sf_hwc_table *hwc; mlx5_sf_hw_table_id_free() local
183 mlx5_sf_hw_table_hwc_sf_free(struct mlx5_core_dev * dev,struct mlx5_sf_hwc_table * hwc,int idx) mlx5_sf_hw_table_hwc_sf_free() argument
195 struct mlx5_sf_hwc_table *hwc; mlx5_sf_hw_table_sf_deferred_free() local
219 mlx5_sf_hw_table_hwc_dealloc_all(struct mlx5_core_dev * dev,struct mlx5_sf_hwc_table * hwc) mlx5_sf_hw_table_hwc_dealloc_all() argument
238 mlx5_sf_hw_table_hwc_init(struct mlx5_sf_hwc_table * hwc,u16 max_fn,u16 base_id) mlx5_sf_hw_table_hwc_init() argument
255 mlx5_sf_hw_table_hwc_cleanup(struct mlx5_sf_hwc_table * hwc) mlx5_sf_hw_table_hwc_cleanup() argument
404 struct mlx5_sf_hwc_table *hwc; mlx5_sf_hw_vhca_event() local
466 struct mlx5_sf_hwc_table *hwc; mlx5_sf_hw_table_esw_changed_event_handler() local
[all...]
/linux/drivers/perf/
H A Driscv_pmu.c149 struct hw_perf_event *hwc = &event->hw; in riscv_pmu_ctr_get_width_mask() local
151 if (hwc->idx == -1) in riscv_pmu_ctr_get_width_mask()
155 cwidth = rvpmu->ctr_get_width(hwc->idx); in riscv_pmu_ctr_get_width_mask()
163 struct hw_perf_event *hwc = &event->hw; in riscv_pmu_event_update() local
168 if (!rvpmu->ctr_read || (hwc->state & PERF_HES_UPTODATE)) in riscv_pmu_event_update()
174 prev_raw_count = local64_read(&hwc->prev_count); in riscv_pmu_event_update()
176 oldval = local64_cmpxchg(&hwc->prev_count, prev_raw_count, in riscv_pmu_event_update()
182 local64_sub(delta, &hwc->period_left); in riscv_pmu_event_update()
189 struct hw_perf_event *hwc = &event->hw; in riscv_pmu_stop() local
192 if (!(hwc->state & PERF_HES_STOPPED)) { in riscv_pmu_stop()
[all …]
H A Dthunderx2_pmu.c325 struct hw_perf_event *hwc = &event->hw; in init_cntr_base_l3c() local
332 hwc->config_base = (unsigned long)tx2_pmu->base in init_cntr_base_l3c()
334 hwc->event_base = (unsigned long)tx2_pmu->base in init_cntr_base_l3c()
341 struct hw_perf_event *hwc = &event->hw; in init_cntr_base_dmc() local
347 hwc->config_base = (unsigned long)tx2_pmu->base in init_cntr_base_dmc()
350 hwc->event_base = (unsigned long)tx2_pmu->base in init_cntr_base_dmc()
357 struct hw_perf_event *hwc = &event->hw; in init_cntr_base_ccpi2() local
362 hwc->config_base = (unsigned long)tx2_pmu->base in init_cntr_base_ccpi2()
364 hwc->event_base = (unsigned long)tx2_pmu->base; in init_cntr_base_ccpi2()
370 struct hw_perf_event *hwc in uncore_start_event_l3c() local
391 struct hw_perf_event *hwc = &event->hw; uncore_start_event_dmc() local
416 struct hw_perf_event *hwc = &event->hw; uncore_stop_event_dmc() local
433 struct hw_perf_event *hwc = &event->hw; uncore_start_event_ccpi2() local
457 struct hw_perf_event *hwc = &event->hw; uncore_stop_event_ccpi2() local
466 struct hw_perf_event *hwc = &event->hw; tx2_uncore_event_update() local
569 struct hw_perf_event *hwc = &event->hw; tx2_uncore_event_init() local
607 struct hw_perf_event *hwc = &event->hw; tx2_uncore_event_start() local
631 struct hw_perf_event *hwc = &event->hw; tx2_uncore_event_stop() local
649 struct hw_perf_event *hwc = &event->hw; tx2_uncore_event_add() local
673 struct hw_perf_event *hwc = &event->hw; tx2_uncore_event_del() local
[all...]
H A Dstarfive_starlink_pmu.c157 struct hw_perf_event *hwc = &event->hw; in starlink_pmu_set_event_period() local
166 local64_set(&hwc->prev_count, val); in starlink_pmu_set_event_period()
167 if (hwc->config == STARLINK_CYCLES) in starlink_pmu_set_event_period()
177 struct hw_perf_event *hwc = &event->hw; in starlink_pmu_counter_start() local
192 if (hwc->config == STARLINK_CYCLES) { in starlink_pmu_counter_start()
214 struct hw_perf_event *hwc = &event->hw; in starlink_pmu_counter_stop() local
223 if (hwc->config == STARLINK_CYCLES) in starlink_pmu_counter_stop()
234 struct hw_perf_event *hwc = &event->hw; in starlink_pmu_update() local
235 int idx = hwc->idx; in starlink_pmu_update()
241 prev_raw_count = local64_read(&hwc in starlink_pmu_update()
260 struct hw_perf_event *hwc = &event->hw; starlink_pmu_start() local
279 struct hw_perf_event *hwc = &event->hw; starlink_pmu_stop() local
294 struct hw_perf_event *hwc = &event->hw; starlink_pmu_add() local
334 struct hw_perf_event *hwc = &event->hw; starlink_pmu_del() local
370 struct hw_perf_event *hwc = &event->hw; starlink_pmu_event_init() local
[all...]
H A Dqcom_l2_pmu.c299 struct hw_perf_event *hwc = &event->hw; in l2_cache_event_update() local
301 u32 idx = hwc->idx; in l2_cache_event_update()
304 prev = local64_read(&hwc->prev_count); in l2_cache_event_update()
306 } while (local64_cmpxchg(&hwc->prev_count, prev, now) != prev); in l2_cache_event_update()
320 struct hw_perf_event *hwc) in l2_cache_cluster_set_period() argument
322 u32 idx = hwc->idx; in l2_cache_cluster_set_period()
335 local64_set(&hwc->prev_count, new); in l2_cache_cluster_set_period()
342 struct hw_perf_event *hwc = &event->hw; in l2_cache_get_event_idx() local
347 if (hwc->config_base == L2CYCLE_CTR_RAW_CODE) { in l2_cache_get_event_idx()
364 group = L2_EVT_GROUP(hwc in l2_cache_get_event_idx()
377 struct hw_perf_event *hwc = &event->hw; l2_cache_clear_event_idx() local
398 struct hw_perf_event *hwc; l2_cache_handle_irq() local
440 struct hw_perf_event *hwc = &event->hw; l2_cache_event_init() local
544 struct hw_perf_event *hwc = &event->hw; l2_cache_event_start() local
574 struct hw_perf_event *hwc = &event->hw; l2_cache_event_stop() local
590 struct hw_perf_event *hwc = &event->hw; l2_cache_event_add() local
617 struct hw_perf_event *hwc = &event->hw; l2_cache_event_del() local
[all...]
H A Darm_pmu.c207 struct hw_perf_event *hwc = &event->hw; in armpmu_event_set_period() local
208 s64 left = local64_read(&hwc->period_left); in armpmu_event_set_period()
209 s64 period = hwc->sample_period; in armpmu_event_set_period()
216 local64_set(&hwc->period_left, left); in armpmu_event_set_period()
217 hwc->last_period = period; in armpmu_event_set_period()
223 local64_set(&hwc->period_left, left); in armpmu_event_set_period()
224 hwc->last_period = period; in armpmu_event_set_period()
237 local64_set(&hwc->prev_count, (u64)-left); in armpmu_event_set_period()
249 struct hw_perf_event *hwc = &event->hw; in armpmu_event_update() local
254 prev_raw_count = local64_read(&hwc->prev_count); in armpmu_event_update()
[all …]
H A Dmarvell_pem_pmu.c192 struct hw_perf_event *hwc = &event->hw; in pem_perf_event_init() local
224 hwc->idx = -1; in pem_perf_event_init()
237 struct hw_perf_event *hwc = &event->hw; in pem_perf_event_update() local
241 prev_count = local64_read(&hwc->prev_count); in pem_perf_event_update()
242 new_count = pem_perf_read_counter(pmu, event, hwc->idx); in pem_perf_event_update()
243 } while (local64_xchg(&hwc->prev_count, new_count) != prev_count); in pem_perf_event_update()
251 struct hw_perf_event *hwc = &event->hw; in pem_perf_event_start() local
252 int eventid = hwc->idx; in pem_perf_event_start()
258 local64_set(&hwc->prev_count, in pem_perf_event_start()
261 hwc in pem_perf_event_start()
266 struct hw_perf_event *hwc = &event->hw; pem_perf_event_add() local
281 struct hw_perf_event *hwc = &event->hw; pem_perf_event_stop() local
291 struct hw_perf_event *hwc = &event->hw; pem_perf_event_del() local
[all...]
H A Dmarvell_cn10k_tad_pmu.c54 struct hw_perf_event *hwc = &event->hw; in tad_pmu_event_counter_read() local
55 u32 counter_idx = hwc->idx; in tad_pmu_event_counter_read()
60 prev = local64_read(&hwc->prev_count); in tad_pmu_event_counter_read()
64 } while (local64_cmpxchg(&hwc->prev_count, prev, new) != prev); in tad_pmu_event_counter_read()
72 struct hw_perf_event *hwc = &event->hw; in tad_pmu_event_counter_stop() local
73 u32 counter_idx = hwc->idx; in tad_pmu_event_counter_stop()
85 hwc->state |= PERF_HES_STOPPED | PERF_HES_UPTODATE; in tad_pmu_event_counter_stop()
91 struct hw_perf_event *hwc = &event->hw; in tad_pmu_event_counter_start() local
93 u32 counter_idx = hwc->idx; in tad_pmu_event_counter_start()
97 hwc in tad_pmu_event_counter_start()
117 struct hw_perf_event *hwc = &event->hw; tad_pmu_event_counter_del() local
128 struct hw_perf_event *hwc = &event->hw; tad_pmu_event_counter_add() local
[all...]
/linux/drivers/perf/hisilicon/
H A Dhisi_uncore_l3c_pmu.c160 static u32 hisi_l3c_pmu_event_readl(struct hw_perf_event *hwc, u32 reg) in hisi_l3c_pmu_event_readl() argument
162 return readl((void __iomem *)hwc->event_base + reg); in hisi_l3c_pmu_event_readl()
165 static void hisi_l3c_pmu_event_writel(struct hw_perf_event *hwc, u32 reg, u32 val) in hisi_l3c_pmu_event_writel() argument
167 writel(val, (void __iomem *)hwc->event_base + reg); in hisi_l3c_pmu_event_writel()
170 static u64 hisi_l3c_pmu_event_readq(struct hw_perf_event *hwc, u32 reg) in hisi_l3c_pmu_event_readq() argument
172 return readq((void __iomem *)hwc->event_base + reg); in hisi_l3c_pmu_event_readq()
175 static void hisi_l3c_pmu_event_writeq(struct hw_perf_event *hwc, u32 reg, u64 val) in hisi_l3c_pmu_event_writeq() argument
177 writeq(val, (void __iomem *)hwc->event_base + reg); in hisi_l3c_pmu_event_writeq()
182 struct hw_perf_event *hwc = &event->hw; in hisi_l3c_pmu_config_req_tracetag() local
189 val = hisi_l3c_pmu_event_readl(hwc, L3C_TRACETAG_CTR in hisi_l3c_pmu_config_req_tracetag()
203 struct hw_perf_event *hwc = &event->hw; hisi_l3c_pmu_clear_req_tracetag() local
224 struct hw_perf_event *hwc = &event->hw; hisi_l3c_pmu_write_ds() local
247 struct hw_perf_event *hwc = &event->hw; hisi_l3c_pmu_config_ds() local
265 struct hw_perf_event *hwc = &event->hw; hisi_l3c_pmu_clear_ds() local
283 struct hw_perf_event *hwc = &event->hw; hisi_l3c_pmu_config_core_tracetag() local
304 struct hw_perf_event *hwc = &event->hw; hisi_l3c_pmu_clear_core_tracetag() local
371 hisi_l3c_pmu_read_counter(struct hisi_pmu * l3c_pmu,struct hw_perf_event * hwc) hisi_l3c_pmu_read_counter() argument
377 hisi_l3c_pmu_write_counter(struct hisi_pmu * l3c_pmu,struct hw_perf_event * hwc,u64 val) hisi_l3c_pmu_write_counter() argument
385 struct hw_perf_event *hwc = &l3c_pmu->pmu_events.hw_events[idx]->hw; hisi_l3c_pmu_write_evtype() local
471 hisi_l3c_pmu_enable_counter(struct hisi_pmu * l3c_pmu,struct hw_perf_event * hwc) hisi_l3c_pmu_enable_counter() argument
482 hisi_l3c_pmu_disable_counter(struct hisi_pmu * l3c_pmu,struct hw_perf_event * hwc) hisi_l3c_pmu_disable_counter() argument
493 hisi_l3c_pmu_enable_counter_int(struct hisi_pmu * l3c_pmu,struct hw_perf_event * hwc) hisi_l3c_pmu_enable_counter_int() argument
504 hisi_l3c_pmu_disable_counter_int(struct hisi_pmu * l3c_pmu,struct hw_perf_event * hwc) hisi_l3c_pmu_disable_counter_int() argument
535 struct hw_perf_event *hwc = &l3c_pmu->pmu_events.hw_events[idx]->hw; hisi_l3c_pmu_clear_int_status() local
[all...]
H A Dhisi_uncore_pmu.c209 struct hw_perf_event *hwc = &event->hw; in hisi_uncore_pmu_event_init() local
248 hwc->idx = -1; in hisi_uncore_pmu_event_init()
249 hwc->config_base = event->attr.config; in hisi_uncore_pmu_event_init()
268 struct hw_perf_event *hwc = &event->hw; in hisi_uncore_pmu_enable_event() local
270 hisi_pmu->ops->write_evtype(hisi_pmu, hwc->idx, in hisi_uncore_pmu_enable_event()
276 hisi_pmu->ops->enable_counter_int(hisi_pmu, hwc); in hisi_uncore_pmu_enable_event()
277 hisi_pmu->ops->enable_counter(hisi_pmu, hwc); in hisi_uncore_pmu_enable_event()
286 struct hw_perf_event *hwc = &event->hw; in hisi_uncore_pmu_disable_event() local
288 hisi_pmu->ops->disable_counter(hisi_pmu, hwc); in hisi_uncore_pmu_disable_event()
289 hisi_pmu->ops->disable_counter_int(hisi_pmu, hwc); in hisi_uncore_pmu_disable_event()
[all …]
H A Dhisi_pcie_pmu.c268 struct hw_perf_event *hwc = &event->hw; in hisi_pcie_pmu_config_event_ctrl() local
271 hisi_pcie_pmu_writeq(pcie_pmu, HISI_PCIE_EVENT_CTRL, hwc->idx, reg); in hisi_pcie_pmu_config_event_ctrl()
277 struct hw_perf_event *hwc = &event->hw; in hisi_pcie_pmu_clear_event_ctrl() local
279 hisi_pcie_pmu_writeq(pcie_pmu, HISI_PCIE_EVENT_CTRL, hwc->idx, HISI_PCIE_INIT_SET); in hisi_pcie_pmu_clear_event_ctrl()
384 struct hw_perf_event *hwc = &event->hw; in hisi_pcie_pmu_event_init() local
391 hwc->event_base = HISI_PCIE_EXT_CNT; in hisi_pcie_pmu_event_init()
393 hwc->event_base = HISI_PCIE_CNT; in hisi_pcie_pmu_event_init()
448 struct hw_perf_event *hwc = &event->hw; in hisi_pcie_pmu_event_update() local
452 prev_cnt = local64_read(&hwc->prev_count); in hisi_pcie_pmu_event_update()
454 } while (local64_cmpxchg(&hwc in hisi_pcie_pmu_event_update()
469 struct hw_perf_event *hwc = &event->hw; hisi_pcie_pmu_set_period() local
491 hisi_pcie_pmu_enable_counter(struct hisi_pcie_pmu * pcie_pmu,struct hw_perf_event * hwc) hisi_pcie_pmu_enable_counter() argument
501 hisi_pcie_pmu_disable_counter(struct hisi_pcie_pmu * pcie_pmu,struct hw_perf_event * hwc) hisi_pcie_pmu_disable_counter() argument
511 hisi_pcie_pmu_enable_int(struct hisi_pcie_pmu * pcie_pmu,struct hw_perf_event * hwc) hisi_pcie_pmu_enable_int() argument
518 hisi_pcie_pmu_disable_int(struct hisi_pcie_pmu * pcie_pmu,struct hw_perf_event * hwc) hisi_pcie_pmu_disable_int() argument
534 struct hw_perf_event *hwc = &event->hw; hisi_pcie_pmu_start() local
560 struct hw_perf_event *hwc = &event->hw; hisi_pcie_pmu_stop() local
578 struct hw_perf_event *hwc = &event->hw; hisi_pcie_pmu_add() local
604 struct hw_perf_event *hwc = &event->hw; hisi_pcie_pmu_del() local
[all...]
H A Dhisi_uncore_ddrc_pmu.c68 #define GET_DDRC_EVENTID(hwc) (hwc->config_base & 0x7) argument
87 struct hw_perf_event *hwc) in hisi_ddrc_pmu_read_counter() argument
92 return readl(ddrc_pmu->base + ddrc_reg_off[hwc->idx]); in hisi_ddrc_pmu_read_counter()
94 return readq(ddrc_pmu->base + DDRC_EVENT_CNTn(regs->event_cnt, hwc->idx)); in hisi_ddrc_pmu_read_counter()
98 struct hw_perf_event *hwc, u64 val) in hisi_ddrc_pmu_write_counter() argument
103 writel((u32)val, ddrc_pmu->base + ddrc_reg_off[hwc->idx]); in hisi_ddrc_pmu_write_counter()
105 writeq(val, ddrc_pmu->base + DDRC_EVENT_CNTn(regs->event_cnt, hwc->idx)); in hisi_ddrc_pmu_write_counter()
128 struct hw_perf_event *hwc = &event->hw; in hisi_ddrc_pmu_v1_get_event_idx() local
130 int idx = GET_DDRC_EVENTID(hwc); in hisi_ddrc_pmu_v1_get_event_idx()
172 hisi_ddrc_pmu_enable_counter(struct hisi_pmu * ddrc_pmu,struct hw_perf_event * hwc) hisi_ddrc_pmu_enable_counter() argument
183 hisi_ddrc_pmu_disable_counter(struct hisi_pmu * ddrc_pmu,struct hw_perf_event * hwc) hisi_ddrc_pmu_disable_counter() argument
194 hisi_ddrc_pmu_enable_counter_int(struct hisi_pmu * ddrc_pmu,struct hw_perf_event * hwc) hisi_ddrc_pmu_enable_counter_int() argument
205 hisi_ddrc_pmu_disable_counter_int(struct hisi_pmu * ddrc_pmu,struct hw_perf_event * hwc) hisi_ddrc_pmu_disable_counter_int() argument
[all...]
H A Dhisi_uncore_uc_pmu.c258 struct hw_perf_event *hwc) in hisi_uc_pmu_enable_counter() argument
264 val |= (1 << hwc->idx); in hisi_uc_pmu_enable_counter()
269 struct hw_perf_event *hwc) in hisi_uc_pmu_disable_counter() argument
275 val &= ~(1 << hwc->idx); in hisi_uc_pmu_disable_counter()
280 struct hw_perf_event *hwc) in hisi_uc_pmu_read_counter() argument
282 return readq(uc_pmu->base + HISI_UC_CNTR_REGn(hwc->idx)); in hisi_uc_pmu_read_counter()
294 struct hw_perf_event *hwc, u64 val) in hisi_uc_pmu_write_counter_normal() argument
296 writeq(val, uc_pmu->base + HISI_UC_CNTR_REGn(hwc->idx)); in hisi_uc_pmu_write_counter_normal()
300 struct hw_perf_event *hwc, u64 val) in hisi_uc_pmu_write_counter_quirk_v2() argument
303 hisi_uc_pmu_write_counter_normal(uc_pmu, hwc, va in hisi_uc_pmu_write_counter_quirk_v2()
308 hisi_uc_pmu_write_counter(struct hisi_pmu * uc_pmu,struct hw_perf_event * hwc,u64 val) hisi_uc_pmu_write_counter() argument
332 hisi_uc_pmu_enable_counter_int(struct hisi_pmu * uc_pmu,struct hw_perf_event * hwc) hisi_uc_pmu_enable_counter_int() argument
342 hisi_uc_pmu_disable_counter_int(struct hisi_pmu * uc_pmu,struct hw_perf_event * hwc) hisi_uc_pmu_disable_counter_int() argument
[all...]
H A Dhisi_uncore_cpa_pmu.c50 struct hw_perf_event *hwc) in hisi_cpa_pmu_read_counter() argument
52 return readq(cpa_pmu->base + hisi_cpa_pmu_get_counter_offset(hwc->idx)); in hisi_cpa_pmu_read_counter()
56 struct hw_perf_event *hwc, u64 val) in hisi_cpa_pmu_write_counter() argument
58 writeq(val, cpa_pmu->base + hisi_cpa_pmu_get_counter_offset(hwc->idx)); in hisi_cpa_pmu_write_counter()
121 struct hw_perf_event *hwc) in hisi_cpa_pmu_enable_counter() argument
127 val |= 1 << hwc->idx; in hisi_cpa_pmu_enable_counter()
132 struct hw_perf_event *hwc) in hisi_cpa_pmu_disable_counter() argument
138 val &= ~(1UL << hwc->idx); in hisi_cpa_pmu_disable_counter()
143 struct hw_perf_event *hwc) in hisi_cpa_pmu_enable_counter_int() argument
149 val &= ~(1UL << hwc in hisi_cpa_pmu_enable_counter_int()
154 hisi_cpa_pmu_disable_counter_int(struct hisi_pmu * cpa_pmu,struct hw_perf_event * hwc) hisi_cpa_pmu_disable_counter_int() argument
[all...]
H A Dhisi_uncore_noc_pmu.c89 struct hw_perf_event *hwc) in hisi_noc_pmu_read_counter() argument
93 return readq(noc_pmu->base + NOC_PMU_EVENT_CNTRn(reg_info->event_cntr0, hwc->idx)); in hisi_noc_pmu_read_counter()
97 struct hw_perf_event *hwc, u64 val) in hisi_noc_pmu_write_counter() argument
101 writeq(val, noc_pmu->base + NOC_PMU_EVENT_CNTRn(reg_info->event_cntr0, hwc->idx)); in hisi_noc_pmu_write_counter()
105 struct hw_perf_event *hwc) in hisi_noc_pmu_enable_counter() argument
110 reg = readl(noc_pmu->base + NOC_PMU_EVENT_CTRLn(reg_info->event_ctrl0, hwc->idx)); in hisi_noc_pmu_enable_counter()
112 writel(reg, noc_pmu->base + NOC_PMU_EVENT_CTRLn(reg_info->event_ctrl0, hwc->idx)); in hisi_noc_pmu_enable_counter()
116 struct hw_perf_event *hwc) in hisi_noc_pmu_disable_counter() argument
121 reg = readl(noc_pmu->base + NOC_PMU_EVENT_CTRLn(reg_info->event_ctrl0, hwc->idx)); in hisi_noc_pmu_disable_counter()
123 writel(reg, noc_pmu->base + NOC_PMU_EVENT_CTRLn(reg_info->event_ctrl0, hwc in hisi_noc_pmu_disable_counter()
127 hisi_noc_pmu_enable_counter_int(struct hisi_pmu * noc_pmu,struct hw_perf_event * hwc) hisi_noc_pmu_enable_counter_int() argument
133 hisi_noc_pmu_disable_counter_int(struct hisi_pmu * noc_pmu,struct hw_perf_event * hwc) hisi_noc_pmu_disable_counter_int() argument
178 struct hw_perf_event *hwc = &event->hw; hisi_noc_pmu_enable_filter() local
[all...]
/linux/arch/loongarch/kernel/
H A Dperf_event.c253 static int loongarch_pmu_alloc_counter(struct cpu_hw_events *cpuc, struct hw_perf_event *hwc) in loongarch_pmu_alloc_counter() argument
300 struct hw_perf_event *hwc, in loongarch_pmu_event_set_period() argument
304 u64 left = local64_read(&hwc->period_left); in loongarch_pmu_event_set_period()
305 u64 period = hwc->sample_period; in loongarch_pmu_event_set_period()
310 local64_set(&hwc->period_left, left); in loongarch_pmu_event_set_period()
311 hwc->last_period = period; in loongarch_pmu_event_set_period()
316 local64_set(&hwc->period_left, left); in loongarch_pmu_event_set_period()
317 hwc->last_period = period; in loongarch_pmu_event_set_period()
323 local64_set(&hwc->period_left, left); in loongarch_pmu_event_set_period()
326 local64_set(&hwc->prev_count, loongarch_pmu.overflow - left); in loongarch_pmu_event_set_period()
[all …]
/linux/arch/x86/events/amd/
H A Diommu.c210 struct hw_perf_event *hwc = &event->hw; in perf_iommu_event_init() local
228 hwc->conf = event->attr.config; in perf_iommu_event_init()
229 hwc->conf1 = event->attr.config1; in perf_iommu_event_init()
242 struct hw_perf_event *hwc = &ev->hw; in perf_iommu_enable_event() local
243 u8 bank = hwc->iommu_bank; in perf_iommu_enable_event()
244 u8 cntr = hwc->iommu_cntr; in perf_iommu_enable_event()
247 reg = GET_CSOURCE(hwc); in perf_iommu_enable_event()
250 reg = GET_DEVID_MASK(hwc); in perf_iommu_enable_event()
251 reg = GET_DEVID(hwc) | (reg << 32); in perf_iommu_enable_event()
256 reg = GET_PASID_MASK(hwc); in perf_iommu_enable_event()
[all …]
H A Duncore.c138 struct hw_perf_event *hwc = &event->hw; in amd_uncore_read() local
147 prev = local64_read(&hwc->prev_count); in amd_uncore_read()
153 if (hwc->event_base_rdpmc < 0) in amd_uncore_read()
154 rdmsrq(hwc->event_base, new); in amd_uncore_read()
156 new = rdpmc(hwc->event_base_rdpmc); in amd_uncore_read()
158 local64_set(&hwc->prev_count, new); in amd_uncore_read()
168 struct hw_perf_event *hwc = &event->hw; in amd_uncore_start() local
174 wrmsrq(hwc->event_base, (u64)local64_read(&hwc->prev_count)); in amd_uncore_start()
176 hwc in amd_uncore_start()
186 struct hw_perf_event *hwc = &event->hw; amd_uncore_stop() local
207 struct hw_perf_event *hwc = &event->hw; amd_uncore_add() local
251 struct hw_perf_event *hwc = &event->hw; amd_uncore_del() local
289 struct hw_perf_event *hwc = &event->hw; amd_uncore_event_init() local
673 struct hw_perf_event *hwc = &event->hw; amd_uncore_df_event_init() local
686 struct hw_perf_event *hwc = &event->hw; amd_uncore_df_add() local
809 struct hw_perf_event *hwc = &event->hw; amd_uncore_l3_event_init() local
944 struct hw_perf_event *hwc = &event->hw; amd_uncore_umc_event_init() local
959 struct hw_perf_event *hwc = &event->hw; amd_uncore_umc_start() local
975 struct hw_perf_event *hwc = &event->hw; amd_uncore_umc_read() local
[all...]
H A Dpower.c49 struct hw_perf_event *hwc = &event->hw; in event_update() local
53 prev_pwr_acc = hwc->pwr_acc; in event_update()
54 prev_ptsc = hwc->ptsc; in event_update()
93 struct hw_perf_event *hwc = &event->hw; in pmu_event_stop() local
96 if (!(hwc->state & PERF_HES_STOPPED)) in pmu_event_stop()
97 hwc->state |= PERF_HES_STOPPED; in pmu_event_stop()
100 if ((mode & PERF_EF_UPDATE) && !(hwc->state & PERF_HES_UPTODATE)) { in pmu_event_stop()
106 hwc->state |= PERF_HES_UPTODATE; in pmu_event_stop()
112 struct hw_perf_event *hwc = &event->hw; in pmu_event_add() local
114 hwc->state = PERF_HES_UPTODATE | PERF_HES_STOPPED; in pmu_event_add()
/linux/drivers/gpu/drm/amd/amdgpu/
H A Damdgpu_pmu.c211 struct hw_perf_event *hwc = &event->hw; in amdgpu_perf_event_init() local
218 hwc->config = event->attr.config; in amdgpu_perf_event_init()
219 hwc->config_base = AMDGPU_PMU_PERF_TYPE_NONE; in amdgpu_perf_event_init()
227 struct hw_perf_event *hwc = &event->hw; in amdgpu_perf_start() local
233 if (WARN_ON_ONCE(!(hwc->state & PERF_HES_STOPPED))) in amdgpu_perf_start()
240 WARN_ON_ONCE(!(hwc->state & PERF_HES_UPTODATE)); in amdgpu_perf_start()
241 hwc->state = 0; in amdgpu_perf_start()
243 switch (hwc->config_base) { in amdgpu_perf_start()
248 hwc->config, 0 /* unused */, in amdgpu_perf_start()
253 hwc->idx = target_cntr; in amdgpu_perf_start()
[all …]
/linux/arch/s390/kernel/
H A Dperf_cpum_sf.c33 #define OVERFLOW_REG(hwc) ((hwc)->extra_reg.config) argument
34 #define SFB_ALLOC_REG(hwc) ((hwc)->extra_reg.alloc) argument
35 #define TEAR_REG(hwc) ((hwc)->last_tag) argument
36 #define SAMPL_RATE(hwc) ((hwc)->event_base) argument
37 #define SAMPL_FLAGS(hwc) ((hwc)->config_base) argument
38 #define SAMPL_DIAG_MODE(hwc) (SAMPL_FLAGS(hwc) & PERF_CPUM_SF_DIAG_MODE) argument
39 #define SAMPL_FREQ_MODE(hwc) (SAMPL_FLAGS(hwc) & PERF_CPUM_SF_FREQ_MODE) argument
361 static unsigned long sfb_max_limit(struct hw_perf_event *hwc) in sfb_max_limit() argument
363 return SAMPL_DIAG_MODE(hwc) ? CPUM_SF_MAX_SDB * CPUM_SF_SDB_DIAG_FACTOR in sfb_max_limit()
368 struct hw_perf_event *hwc) in sfb_pending_allocs() argument
[all …]
/linux/arch/sh/kernel/
H A Dperf_event.c103 struct hw_perf_event *hwc = &event->hw; in __hw_perf_event_init() local
153 hwc->config |= config; in __hw_perf_event_init()
159 struct hw_perf_event *hwc, int idx) in sh_perf_event_update() argument
178 prev_raw_count = local64_read(&hwc->prev_count); in sh_perf_event_update()
181 if (local64_cmpxchg(&hwc->prev_count, prev_raw_count, in sh_perf_event_update()
202 struct hw_perf_event *hwc = &event->hw; in sh_pmu_stop() local
203 int idx = hwc->idx; in sh_pmu_stop()
206 sh_pmu->disable(hwc, idx); in sh_pmu_stop()
220 struct hw_perf_event *hwc = &event->hw; in sh_pmu_start() local
221 int idx = hwc->idx; in sh_pmu_start()
[all …]
/linux/arch/x86/events/
H A Dcore.c130 struct hw_perf_event *hwc = &event->hw; in x86_perf_event_update() local
135 if (unlikely(!hwc->event_base)) in x86_perf_event_update()
145 prev_raw_count = local64_read(&hwc->prev_count); in x86_perf_event_update()
147 new_raw_count = rdpmc(hwc->event_base_rdpmc); in x86_perf_event_update()
148 } while (!local64_try_cmpxchg(&hwc->prev_count, in x86_perf_event_update()
163 local64_sub(delta, &hwc->period_left); in x86_perf_event_update()
376 set_ext_hw_attr(struct hw_perf_event *hwc, struct perf_event *event) in set_ext_hw_attr() argument
406 hwc->config |= val; in set_ext_hw_attr()
542 struct hw_perf_event *hwc = &event->hw; in x86_setup_perfctr() local
546 hwc in x86_setup_perfctr()
850 struct hw_perf_event *hwc = &cpuc->events[idx]->hw; x86_pmu_disable_all() local
908 struct hw_perf_event *hwc = &cpuc->events[idx]->hw; x86_pmu_enable_all() local
1155 struct hw_perf_event *hwc; x86_schedule_events() local
1386 struct hw_perf_event *hwc = &event->hw; x86_assign_hw_event() local
1445 struct hw_perf_event *hwc = &event->hw; acr_match_prev_indices() local
1457 struct hw_perf_event *hwc = &event->hw; match_prev_assignment() local
1471 struct hw_perf_event *hwc; x86_pmu_enable() local
1565 struct hw_perf_event *hwc = &event->hw; x86_perf_event_set_period() local
1638 struct hw_perf_event *hwc; x86_pmu_add() local
1782 struct hw_perf_event *hwc = &event->hw; x86_pmu_stop() local
3083 struct hw_perf_event *hwc = &event->hw; x86_pmu_event_idx() local
[all...]
/linux/arch/sparc/kernel/
H A Dperf_event.c827 static inline void sparc_pmu_enable_event(struct cpu_hw_events *cpuc, struct hw_perf_event *hwc, in… in sparc_pmu_enable_event() argument
845 static inline void sparc_pmu_disable_event(struct cpu_hw_events *cpuc, struct hw_perf_event *hwc, i… in sparc_pmu_disable_event() argument
864 struct hw_perf_event *hwc, int idx) in sparc_perf_event_update() argument
871 prev_raw_count = local64_read(&hwc->prev_count); in sparc_perf_event_update()
874 if (local64_cmpxchg(&hwc->prev_count, prev_raw_count, in sparc_perf_event_update()
882 local64_sub(delta, &hwc->period_left); in sparc_perf_event_update()
888 struct hw_perf_event *hwc, int idx) in sparc_perf_event_set_period() argument
890 s64 left = local64_read(&hwc->period_left); in sparc_perf_event_set_period()
891 s64 period = hwc->sample_period; in sparc_perf_event_set_period()
895 if (unlikely(period != hwc->last_period)) in sparc_perf_event_set_period()
[all …]

1234