Commit 48a5126b authored by James Clark's avatar James Clark Committed by Suzuki K Poulose
Browse files

coresight: Remove inlines from static function definitions



These are all static and in one compilation unit so the inline has no
effect on the binary. Except if FTRACE is enabled, then some functions
which were already not inlined now get the nops added which allows them
to be traced.

Reviewed-by: default avatarLeo Yan <leo.yan@arm.com>
Reviewed-by: default avatarYeoreum Yun <yeoreum.yun@arm.com>
Signed-off-by: default avatarJames Clark <james.clark@linaro.org>
Signed-off-by: default avatarSuzuki K Poulose <suzuki.poulose@arm.com>
Link: https://lore.kernel.org/r/20250325-james-coresight-claim-tags-v4-6-dfbd3822b2e5@linaro.org
parent 7cd63686
Loading
Loading
Loading
Loading
+5 −6
Original line number Diff line number Diff line
@@ -113,8 +113,7 @@ typedef u64 cate_t;
 * containing the data page pointer for @offset. If @daddrp is not NULL,
 * @daddrp points the DMA address of the beginning of the table.
 */
static inline cate_t *catu_get_table(struct tmc_sg_table *catu_table,
				     unsigned long offset,
static cate_t *catu_get_table(struct tmc_sg_table *catu_table, unsigned long offset,
			      dma_addr_t *daddrp)
{
	unsigned long buf_size = tmc_sg_table_buf_size(catu_table);
@@ -165,12 +164,12 @@ static void catu_dump_table(struct tmc_sg_table *catu_table)
}

#else
static inline void catu_dump_table(struct tmc_sg_table *catu_table)
static void catu_dump_table(struct tmc_sg_table *catu_table)
{
}
#endif

static inline cate_t catu_make_entry(dma_addr_t addr)
static cate_t catu_make_entry(dma_addr_t addr)
{
	return addr ? CATU_VALID_ENTRY(addr) : 0;
}
@@ -390,7 +389,7 @@ static const struct attribute_group *catu_groups[] = {
};


static inline int catu_wait_for_ready(struct catu_drvdata *drvdata)
static int catu_wait_for_ready(struct catu_drvdata *drvdata)
{
	struct csdev_access *csa = &drvdata->csdev->access;

+7 −7
Original line number Diff line number Diff line
@@ -129,13 +129,13 @@ coresight_find_out_connection(struct coresight_device *csdev,
	return ERR_PTR(-ENODEV);
}

static inline u32 coresight_read_claim_tags_unlocked(struct coresight_device *csdev)
static u32 coresight_read_claim_tags_unlocked(struct coresight_device *csdev)
{
	return FIELD_GET(CORESIGHT_CLAIM_MASK,
			 csdev_access_relaxed_read32(&csdev->access, CORESIGHT_CLAIMCLR));
}

static inline void coresight_set_self_claim_tag_unlocked(struct coresight_device *csdev)
static void coresight_set_self_claim_tag_unlocked(struct coresight_device *csdev)
{
	csdev_access_relaxed_write32(&csdev->access, CORESIGHT_CLAIM_SELF_HOSTED,
				     CORESIGHT_CLAIMSET);
@@ -609,7 +609,7 @@ struct coresight_device *coresight_get_sink_by_id(u32 id)
 * Return true in successful case and power up the device.
 * Return false when failed to get reference of module.
 */
static inline bool coresight_get_ref(struct coresight_device *csdev)
static bool coresight_get_ref(struct coresight_device *csdev)
{
	struct device *dev = csdev->dev.parent;

@@ -628,7 +628,7 @@ static inline bool coresight_get_ref(struct coresight_device *csdev)
 *
 * @csdev: The coresight device to decrement a reference from.
 */
static inline void coresight_put_ref(struct coresight_device *csdev)
static void coresight_put_ref(struct coresight_device *csdev)
{
	struct device *dev = csdev->dev.parent;

@@ -851,7 +851,7 @@ void coresight_release_path(struct coresight_path *path)
}

/* return true if the device is a suitable type for a default sink */
static inline bool coresight_is_def_sink_type(struct coresight_device *csdev)
static bool coresight_is_def_sink_type(struct coresight_device *csdev)
{
	/* sink & correct subtype */
	if (((csdev->type == CORESIGHT_DEV_TYPE_SINK) ||
@@ -1415,7 +1415,7 @@ EXPORT_SYMBOL_GPL(coresight_unregister);
 *
 * Returns the index of the entry, when found. Otherwise, -ENOENT.
 */
static inline int coresight_search_device_idx(struct coresight_dev_list *dict,
static int coresight_search_device_idx(struct coresight_dev_list *dict,
				       struct fwnode_handle *fwnode)
{
	int i;
+1 −1
Original line number Diff line number Diff line
@@ -95,7 +95,7 @@ struct etb_drvdata {
static int etb_set_buffer(struct coresight_device *csdev,
			  struct perf_output_handle *handle);

static inline unsigned int etb_get_buffer_depth(struct etb_drvdata *drvdata)
static unsigned int etb_get_buffer_depth(struct etb_drvdata *drvdata)
{
	return readl_relaxed(drvdata->base + ETB_RAM_DEPTH_REG);
}
+4 −4
Original line number Diff line number Diff line
@@ -84,7 +84,7 @@ static int etm4_probe_cpu(unsigned int cpu);
 *		TRCIDR4.NUMPC > 0b0000 .
 *		TRCSSCSR<n>.PC == 0b1
 */
static inline bool etm4x_sspcicrn_present(struct etmv4_drvdata *drvdata, int n)
static bool etm4x_sspcicrn_present(struct etmv4_drvdata *drvdata, int n)
{
	return (n < drvdata->nr_ss_cmp) &&
	       drvdata->nr_pe &&
@@ -185,7 +185,7 @@ static void etm_write_os_lock(struct etmv4_drvdata *drvdata,
	isb();
}

static inline void etm4_os_unlock_csa(struct etmv4_drvdata *drvdata,
static void etm4_os_unlock_csa(struct etmv4_drvdata *drvdata,
				      struct csdev_access *csa)
{
	WARN_ON(drvdata->cpu != smp_processor_id());
@@ -1070,7 +1070,7 @@ static const struct coresight_ops etm4_cs_ops = {
	.source_ops	= &etm4_source_ops,
};

static inline bool cpu_supports_sysreg_trace(void)
static bool cpu_supports_sysreg_trace(void)
{
	u64 dfr0 = read_sysreg_s(SYS_ID_AA64DFR0_EL1);

@@ -1378,7 +1378,7 @@ static void etm4_init_arch_data(void *info)
	cpu_detect_trace_filtering(drvdata);
}

static inline u32 etm4_get_victlr_access_type(struct etmv4_config *config)
static u32 etm4_get_victlr_access_type(struct etmv4_config *config)
{
	return etm4_get_access_type(config) << __bf_shf(TRCVICTLR_EXLEVEL_MASK);
}
+2 −2
Original line number Diff line number Diff line
@@ -2440,7 +2440,7 @@ static u32 etmv4_cross_read(const struct etmv4_drvdata *drvdata, u32 offset)
	return reg.data;
}

static inline u32 coresight_etm4x_attr_to_offset(struct device_attribute *attr)
static u32 coresight_etm4x_attr_to_offset(struct device_attribute *attr)
{
	struct dev_ext_attribute *eattr;

@@ -2464,7 +2464,7 @@ static ssize_t coresight_etm4x_reg_show(struct device *dev,
	return scnprintf(buf, PAGE_SIZE, "0x%x\n", val);
}

static inline bool
static bool
etm4x_register_implemented(struct etmv4_drvdata *drvdata, u32 offset)
{
	switch (offset) {
Loading