/openbmc/linux/drivers/hwtracing/coresight/ |
H A D | coresight-core.c | 44 struct coresight_device *csdev; member 67 struct coresight_device *csdev = container_of(_dev, struct coresight_device, dev); in coresight_simple_show_pair() local 72 val = csdev_access_relaxed_read_pair(&csdev->access, cs_attr->lo_off, cs_attr->hi_off); in coresight_simple_show_pair() 81 struct coresight_device *csdev = container_of(_dev, struct coresight_device, dev); in coresight_simple_show32() local 86 val = csdev_access_relaxed_read32(&csdev->access, cs_attr->off); in coresight_simple_show32() 104 void coresight_set_percpu_sink(int cpu, struct coresight_device *csdev) in coresight_set_percpu_sink() argument 106 per_cpu(csdev_sink, cpu) = csdev; in coresight_set_percpu_sink() 136 static inline u32 coresight_read_claim_tags(struct coresight_device *csdev) in coresight_read_claim_tags() argument 138 return csdev_access_relaxed_read32(&csdev->access, CORESIGHT_CLAIMCLR); in coresight_read_claim_tags() 141 static inline bool coresight_is_claimed_self_hosted(struct coresight_device *csdev) in coresight_is_claimed_self_hosted() argument [all …]
|
H A D | coresight-syscfg.c | 33 cscfg_get_feat_csdev(struct coresight_device *csdev, const char *name) in cscfg_get_feat_csdev() argument 37 list_for_each_entry(feat_csdev, &csdev->feature_csdev_list, node) { in cscfg_get_feat_csdev() 46 cscfg_alloc_csdev_cfg(struct coresight_device *csdev, int nr_feats) in cscfg_alloc_csdev_cfg() argument 49 struct device *dev = csdev->dev.parent; in cscfg_alloc_csdev_cfg() 58 config_csdev->csdev = csdev; in cscfg_alloc_csdev_cfg() 63 static int cscfg_add_csdev_cfg(struct coresight_device *csdev, in cscfg_add_csdev_cfg() argument 74 feat_csdev = cscfg_get_feat_csdev(csdev, config_desc->feat_ref_names[i]); in cscfg_add_csdev_cfg() 81 config_csdev = cscfg_alloc_csdev_cfg(csdev, in cscfg_add_csdev_cfg() 92 spin_lock_irqsave(&csdev->cscfg_csdev_lock, flags); in cscfg_add_csdev_cfg() 93 list_add(&config_csdev->node, &csdev->config_csdev_list); in cscfg_add_csdev_cfg() [all …]
|
H A D | coresight-tmc-etf.c | 16 static int tmc_set_etf_buffer(struct coresight_device *csdev, 28 dev_err(&drvdata->csdev->dev, in __tmc_etb_enable_hw() 49 int rc = coresight_claim_device(drvdata->csdev); in tmc_etb_enable_hw() 56 coresight_disclaim_device(drvdata->csdev); in tmc_etb_enable_hw() 102 coresight_disclaim_device(drvdata->csdev); in tmc_etb_disable_hw() 114 dev_err(&drvdata->csdev->dev, in __tmc_etf_enable_hw() 132 int rc = coresight_claim_device(drvdata->csdev); in tmc_etf_enable_hw() 139 coresight_disclaim_device(drvdata->csdev); in tmc_etf_enable_hw() 145 struct coresight_device *csdev = drvdata->csdev; in tmc_etf_disable_hw() local 151 coresight_disclaim_device_unlocked(csdev); in tmc_etf_disable_hw() [all …]
|
H A D | coresight-cti-core.c | 42 #define csdev_to_cti_drvdata(csdev) \ argument 43 dev_get_drvdata(csdev->dev.parent) 103 rc = coresight_claim_device(drvdata->csdev); in cti_enable_hw() 136 if (coresight_claim_device(drvdata->csdev)) in cti_cpuhp_enable_hw() 153 struct coresight_device *csdev = drvdata->csdev; in cti_disable_hw() local 178 coresight_disclaim_device_unlocked(csdev); in cti_disable_hw() 251 struct coresight_device *csdev, in cti_add_connection_entry() argument 256 tc->con_dev = csdev; in cti_add_connection_entry() 261 if (csdev) in cti_add_connection_entry() 262 tc->con_dev_name = dev_name(&csdev->dev); in cti_add_connection_entry() [all …]
|
H A D | coresight-dummy.c | 17 struct coresight_device *csdev; member 23 static int dummy_source_enable(struct coresight_device *csdev, in dummy_source_enable() argument 26 dev_dbg(csdev->dev.parent, "Dummy source enabled\n"); in dummy_source_enable() 31 static void dummy_source_disable(struct coresight_device *csdev, in dummy_source_disable() argument 34 dev_dbg(csdev->dev.parent, "Dummy source disabled\n"); in dummy_source_disable() 37 static int dummy_sink_enable(struct coresight_device *csdev, enum cs_mode mode, in dummy_sink_enable() argument 40 dev_dbg(csdev->dev.parent, "Dummy sink enabled\n"); in dummy_sink_enable() 45 static int dummy_sink_disable(struct coresight_device *csdev) in dummy_sink_disable() argument 47 dev_dbg(csdev->dev.parent, "Dummy sink disabled\n"); in dummy_sink_disable() 115 drvdata->csdev = coresight_register(&desc); in dummy_probe() [all …]
|
H A D | coresight-etm3x-core.c | 167 dev_err(&drvdata->csdev->dev, in etm_set_prog() 186 dev_err(&drvdata->csdev->dev, in etm_clr_prog() 366 struct coresight_device *csdev = drvdata->csdev; in etm_enable_hw() local 370 rc = coresight_claim_device_unlocked(csdev); in etm_enable_hw() 432 dev_dbg(&drvdata->csdev->dev, "cpu: %d enable smp call done: %d\n", in etm_enable_hw() 451 static int etm_cpu_id(struct coresight_device *csdev) in etm_cpu_id() argument 453 struct etm_drvdata *drvdata = dev_get_drvdata(csdev->dev.parent); in etm_cpu_id() 472 dev_err(&drvdata->csdev->dev, in etm_read_alloc_trace_id() 474 dev_name(&drvdata->csdev->dev), drvdata->cpu); in etm_read_alloc_trace_id() 483 static int etm_enable_perf(struct coresight_device *csdev, in etm_enable_perf() argument [all …]
|
H A D | coresight-replicator.c | 41 struct coresight_device *csdev; member 48 struct coresight_device *csdev = drvdata->csdev; in dynamic_replicator_reset() local 52 if (!coresight_claim_device_unlocked(csdev)) { in dynamic_replicator_reset() 55 coresight_disclaim_device_unlocked(csdev); in dynamic_replicator_reset() 75 struct coresight_device *csdev = drvdata->csdev; in dynamic_replicator_enable() local 90 rc = coresight_claim_device_unlocked(csdev); in dynamic_replicator_enable() 117 static int replicator_enable(struct coresight_device *csdev, in replicator_enable() argument 122 struct replicator_drvdata *drvdata = dev_get_drvdata(csdev->dev.parent); in replicator_enable() 139 dev_dbg(&csdev->dev, "REPLICATOR enabled\n"); in replicator_enable() 147 struct coresight_device *csdev = drvdata->csdev; in dynamic_replicator_disable() local [all …]
|
H A D | coresight-etb10.c | 86 struct coresight_device *csdev; member 97 static int etb_set_buffer(struct coresight_device *csdev, 135 int rc = coresight_claim_device(drvdata->csdev); in etb_enable_hw() 144 static int etb_enable_sysfs(struct coresight_device *csdev) in etb_enable_sysfs() argument 148 struct etb_drvdata *drvdata = dev_get_drvdata(csdev->dev.parent); in etb_enable_sysfs() 166 atomic_inc(&csdev->refcnt); in etb_enable_sysfs() 172 static int etb_enable_perf(struct coresight_device *csdev, void *data) in etb_enable_perf() argument 177 struct etb_drvdata *drvdata = dev_get_drvdata(csdev->dev.parent); in etb_enable_perf() 202 atomic_inc(&csdev->refcnt); in etb_enable_perf() 211 ret = etb_set_buffer(csdev, handle); in etb_enable_perf() [all …]
|
H A D | coresight-etm-perf.c | 348 struct coresight_device *csdev; in etm_setup_aux() local 350 csdev = per_cpu(csdev_src, cpu); in etm_setup_aux() 356 if (!csdev) { in etm_setup_aux() 376 sink = coresight_find_default_sink(csdev); in etm_setup_aux() 395 path = coresight_build_path(csdev, sink); in etm_setup_aux() 451 struct coresight_device *sink, *csdev = per_cpu(csdev_src, cpu); in etm_event_start() local 455 if (!csdev) in etm_event_start() 496 if (source_ops(csdev)->enable(csdev, event, CS_MODE_PERF)) in etm_event_start() 540 struct coresight_device *sink, *csdev = per_cpu(csdev_src, cpu); in etm_event_stop() local 578 if (!csdev) in etm_event_stop() [all …]
|
H A D | coresight-tpiu.c | 60 struct coresight_device *csdev; member 72 static int tpiu_enable(struct coresight_device *csdev, enum cs_mode mode, in tpiu_enable() argument 75 tpiu_enable_hw(&csdev->access); in tpiu_enable() 76 atomic_inc(&csdev->refcnt); in tpiu_enable() 77 dev_dbg(&csdev->dev, "TPIU enabled\n"); in tpiu_enable() 97 static int tpiu_disable(struct coresight_device *csdev) in tpiu_disable() argument 99 if (atomic_dec_return(&csdev->refcnt)) in tpiu_disable() 102 tpiu_disable_hw(&csdev->access); in tpiu_disable() 104 dev_dbg(&csdev->dev, "TPIU disabled\n"); in tpiu_disable() 164 drvdata->csdev = coresight_register(&desc); in tpiu_probe() [all …]
|
H A D | coresight-sysfs.c | 20 struct coresight_device *csdev = to_coresight_device(dev); in nr_links_show() local 22 return sprintf(buf, "%d\n", csdev->nr_links); in nr_links_show() 41 int coresight_create_conns_sysfs_group(struct coresight_device *csdev) in coresight_create_conns_sysfs_group() argument 45 if (!csdev) in coresight_create_conns_sysfs_group() 48 ret = sysfs_create_group(&csdev->dev.kobj, &coresight_conns_group); in coresight_create_conns_sysfs_group() 52 csdev->has_conns_grp = true; in coresight_create_conns_sysfs_group() 56 void coresight_remove_conns_sysfs_group(struct coresight_device *csdev) in coresight_remove_conns_sysfs_group() argument 58 if (!csdev) in coresight_remove_conns_sysfs_group() 61 if (csdev->has_conns_grp) { in coresight_remove_conns_sysfs_group() 62 sysfs_remove_group(&csdev->dev.kobj, &coresight_conns_group); in coresight_remove_conns_sysfs_group() [all …]
|
H A D | coresight-catu.c | 21 #define csdev_to_catu_drvdata(csdev) \ argument 22 dev_get_drvdata(csdev->dev.parent) 332 struct coresight_device *csdev; in catu_alloc_etr_buf() local 336 csdev = tmc_etr_get_catu_device(tmc_drvdata); in catu_alloc_etr_buf() 337 if (!csdev) in catu_alloc_etr_buf() 343 catu_table = catu_init_sg_table(&csdev->dev, node, in catu_alloc_etr_buf() 393 struct csdev_access *csa = &drvdata->csdev->access; in catu_wait_for_ready() 404 struct device *dev = &drvdata->csdev->dev; in catu_enable_hw() 405 struct coresight_device *csdev = drvdata->csdev; in catu_enable_hw() local 420 rc = coresight_claim_device_unlocked(csdev); in catu_enable_hw() [all …]
|
H A D | coresight-catu.h | 65 struct coresight_device *csdev; member 73 return csdev_access_relaxed_read32(&drvdata->csdev->access, offset); \ 78 csdev_access_relaxed_write32(&drvdata->csdev->access, val, offset); \ 85 return csdev_access_relaxed_read_pair(&drvdata->csdev->access, lo_off, hi_off); \ 90 csdev_access_relaxed_write_pair(&drvdata->csdev->access, val, lo_off, hi_off); \ 100 static inline bool coresight_is_catu_device(struct coresight_device *csdev) in CATU_REG_PAIR() 104 if (csdev->type != CORESIGHT_DEV_TYPE_HELPER) in CATU_REG_PAIR() 106 if (csdev->subtype.helper_subtype != CORESIGHT_DEV_SUBTYPE_HELPER_CATU) in CATU_REG_PAIR()
|
H A D | ultrasoc-smb.c | 109 if (atomic_read(&drvdata->csdev->refcnt)) { in smb_open() 129 struct device *dev = &drvdata->csdev->dev; in smb_read() 215 static void smb_enable_sysfs(struct coresight_device *csdev) in smb_enable_sysfs() argument 217 struct smb_drv_data *drvdata = dev_get_drvdata(csdev->dev.parent); in smb_enable_sysfs() 226 static int smb_enable_perf(struct coresight_device *csdev, void *data) in smb_enable_perf() argument 228 struct smb_drv_data *drvdata = dev_get_drvdata(csdev->dev.parent); in smb_enable_perf() 252 static int smb_enable(struct coresight_device *csdev, enum cs_mode mode, in smb_enable() argument 255 struct smb_drv_data *drvdata = dev_get_drvdata(csdev->dev.parent); in smb_enable() 274 smb_enable_sysfs(csdev); in smb_enable() 277 ret = smb_enable_perf(csdev, data); in smb_enable() [all …]
|
H A D | coresight-priv.h | 137 coresight_find_default_sink(struct coresight_device *csdev); 138 struct list_head *coresight_build_path(struct coresight_device *csdev, 143 int coresight_create_conns_sysfs_group(struct coresight_device *csdev); 144 void coresight_remove_conns_sysfs_group(struct coresight_device *csdev); 160 void (*add)(struct coresight_device *csdev); 161 void (*remove)(struct coresight_device *csdev); 224 void coresight_release_platform_data(struct coresight_device *csdev, 229 void coresight_add_helper(struct coresight_device *csdev, 232 void coresight_set_percpu_sink(int cpu, struct coresight_device *csdev); 234 int coresight_enable_source(struct coresight_device *csdev, enum cs_mode mode, [all …]
|
H A D | coresight-funnel.c | 46 struct coresight_device *csdev; member 55 struct coresight_device *csdev = drvdata->csdev; in dynamic_funnel_enable_hw() local 62 rc = coresight_claim_device_unlocked(csdev); in dynamic_funnel_enable_hw() 77 static int funnel_enable(struct coresight_device *csdev, in funnel_enable() argument 82 struct funnel_drvdata *drvdata = dev_get_drvdata(csdev->dev.parent); in funnel_enable() 98 dev_dbg(&csdev->dev, "FUNNEL inport %d enabled\n", in funnel_enable() 107 struct coresight_device *csdev = drvdata->csdev; in dynamic_funnel_disable_hw() local 117 coresight_disclaim_device_unlocked(csdev); in dynamic_funnel_disable_hw() 122 static void funnel_disable(struct coresight_device *csdev, in funnel_disable() argument 126 struct funnel_drvdata *drvdata = dev_get_drvdata(csdev->dev.parent); in funnel_disable() [all …]
|
H A D | coresight-tmc-core.c | 36 struct coresight_device *csdev = drvdata->csdev; in tmc_wait_for_tmcready() local 37 struct csdev_access *csa = &csdev->access; in tmc_wait_for_tmcready() 41 dev_err(&csdev->dev, in tmc_wait_for_tmcready() 50 struct coresight_device *csdev = drvdata->csdev; in tmc_flush_and_stop() local 51 struct csdev_access *csa = &csdev->access; in tmc_flush_and_stop() 61 dev_err(&csdev->dev, in tmc_flush_and_stop() 121 dev_dbg(&drvdata->csdev->dev, "TMC read start\n"); in tmc_read_prepare() 143 dev_dbg(&drvdata->csdev->dev, "TMC read end\n"); in tmc_read_unprepare() 160 dev_dbg(&drvdata->csdev->dev, "%s: successfully opened\n", __func__); in tmc_open() 190 dev_dbg(&drvdata->csdev->dev, in tmc_read() [all …]
|
H A D | coresight-etm4x-core.c | 200 if (!WARN_ON(!drvdata->csdev)) in etm4_os_unlock() 201 etm4_os_unlock_csa(drvdata, &drvdata->csdev->access); in etm4_os_unlock() 206 if (WARN_ON(!drvdata->csdev)) in etm4_os_lock() 209 etm_write_os_lock(drvdata, &drvdata->csdev->access, 0x1); in etm4_os_lock() 228 static int etm4_cpu_id(struct coresight_device *csdev) in etm4_cpu_id() argument 230 struct etmv4_drvdata *drvdata = dev_get_drvdata(csdev->dev.parent); in etm4_cpu_id() 248 dev_err(&drvdata->csdev->dev, in etm4_read_alloc_trace_id() 250 dev_name(&drvdata->csdev->dev), drvdata->cpu); in etm4_read_alloc_trace_id() 406 struct coresight_device *csdev = drvdata->csdev; in etm4_enable_hw() local 407 struct device *etm_dev = &csdev->dev; in etm4_enable_hw() [all …]
|
H A D | coresight-etm-perf.h | 66 int etm_perf_symlink(struct coresight_device *csdev, bool link); 67 int etm_perf_add_symlink_sink(struct coresight_device *csdev); 68 void etm_perf_del_symlink_sink(struct coresight_device *csdev); 81 static inline int etm_perf_symlink(struct coresight_device *csdev, bool link) in etm_perf_symlink() argument 83 int etm_perf_add_symlink_sink(struct coresight_device *csdev) in etm_perf_add_symlink_sink() argument 85 void etm_perf_del_symlink_sink(struct coresight_device *csdev) {} in etm_perf_del_symlink_sink() argument
|
H A D | coresight-syscfg.h | 72 struct coresight_device *csdev; member 116 int cscfg_register_csdev(struct coresight_device *csdev, u32 match_flags, 118 void cscfg_unregister_csdev(struct coresight_device *csdev); 121 void cscfg_csdev_reset_feats(struct coresight_device *csdev); 122 int cscfg_csdev_enable_active_config(struct coresight_device *csdev, 124 void cscfg_csdev_disable_active_config(struct coresight_device *csdev);
|
H A D | coresight-tpda.c | 49 if (!drvdata->csdev->enable) in __tpda_enable() 57 static int tpda_enable(struct coresight_device *csdev, in tpda_enable() argument 61 struct tpda_drvdata *drvdata = dev_get_drvdata(csdev->dev.parent); in tpda_enable() 87 static void tpda_disable(struct coresight_device *csdev, in tpda_disable() argument 91 struct tpda_drvdata *drvdata = dev_get_drvdata(csdev->dev.parent); in tpda_disable() 170 drvdata->csdev = coresight_register(&desc); in tpda_probe() 171 if (IS_ERR(drvdata->csdev)) in tpda_probe() 172 return PTR_ERR(drvdata->csdev); in tpda_probe() 185 coresight_unregister(drvdata->csdev); in tpda_remove()
|
H A D | coresight-config.c | 83 dev_dbg(&feat_csdev->csdev->dev, "Feature %s: %s", in cscfg_set_on_enable() 98 dev_dbg(&feat_csdev->csdev->dev, "Feature %s: %s", in cscfg_save_on_disable() 170 dev_dbg(&config_csdev->csdev->dev, in cscfg_update_presets() 175 dev_dbg(&config_csdev->csdev->dev, in cscfg_update_presets() 209 dev_dbg(&config_csdev->csdev->dev, in cscfg_update_curr_params() 214 dev_dbg(&config_csdev->csdev->dev, in cscfg_update_curr_params() 230 struct coresight_device *csdev; in cscfg_prog_config() local 234 csdev = feat_csdev->csdev; in cscfg_prog_config() 235 dev_dbg(&csdev->dev, "cfg %s; %s feature:%s", config_csdev->config_desc->name, in cscfg_prog_config()
|
H A D | coresight-tmc-etr.c | 601 struct device *real_dev = drvdata->csdev->dev.parent; in tmc_etr_alloc_flat_buf() 621 flat_buf->dev = &drvdata->csdev->dev; in tmc_etr_alloc_flat_buf() 700 struct device *dev = &drvdata->csdev->dev; in tmc_etr_alloc_sg_buf() 780 struct coresight_device *etr = drvdata->csdev; in tmc_etr_get_catu_device() 849 struct device *dev = &drvdata->csdev->dev; in tmc_alloc_etr_buf() 953 dev_dbg(&drvdata->csdev->dev, in tmc_sync_etr_buf() 978 dev_err(&drvdata->csdev->dev, in __tmc_etr_enable_hw() 1042 rc = coresight_claim_device(drvdata->csdev); in tmc_etr_enable_hw() 1048 coresight_disclaim_device(drvdata->csdev); in tmc_etr_enable_hw() 1138 coresight_disclaim_device(drvdata->csdev); in tmc_etr_disable_hw() [all …]
|
/openbmc/linux/include/linux/ |
H A D | coresight.h | 299 #define source_ops(csdev) csdev->ops->source_ops argument 300 #define sink_ops(csdev) csdev->ops->sink_ops argument 301 #define link_ops(csdev) csdev->ops->link_ops argument 302 #define helper_ops(csdev) csdev->ops->helper_ops argument 303 #define ect_ops(csdev) csdev->ops->ect_ops argument 315 int (*enable)(struct coresight_device *csdev, enum cs_mode mode, 317 int (*disable)(struct coresight_device *csdev); 318 void *(*alloc_buffer)(struct coresight_device *csdev, 322 unsigned long (*update_buffer)(struct coresight_device *csdev, 334 int (*enable)(struct coresight_device *csdev, [all …]
|
/openbmc/linux/drivers/scsi/device_handler/ |
H A D | scsi_dh_emc.c | 136 struct clariion_dh_data *csdev) in parse_sp_info_reply() argument 141 if (csdev->buffer[48] != 0) { in parse_sp_info_reply() 148 if (csdev->buffer[4] > 2) { in parse_sp_info_reply() 156 switch (csdev->buffer[28] & 0x0f) { in parse_sp_info_reply() 168 CLARIION_NAME, csdev->buffer[28] & 0x0f); in parse_sp_info_reply() 173 csdev->default_sp = csdev->buffer[5]; in parse_sp_info_reply() 174 csdev->lun_state = csdev->buffer[4]; in parse_sp_info_reply() 175 csdev->current_sp = csdev->buffer[8]; in parse_sp_info_reply() 176 csdev->port = csdev->buffer[7]; in parse_sp_info_reply() 177 if (csdev->lun_state == CLARIION_LUN_OWNED) in parse_sp_info_reply() [all …]
|