int tracing_set_time_stamp_abs(struct trace_array *tr, bool abs)
{
	int ret = 0;

	mutex_lock(&trace_types_lock);

	if (abs && tr->time_stamp_abs_ref++)
		goto out;

	if (!abs) {
		if (WARN_ON_ONCE(!tr->time_stamp_abs_ref)) {
			ret = -EINVAL;
			goto out;
		}

		if (--tr->time_stamp_abs_ref)
			goto out;
	}

	ring_buffer_set_time_stamp_abs(tr->trace_buffer.buffer, abs);

#ifdef CONFIG_TRACER_MAX_TRACE
	if (tr->max_buffer.buffer)
		ring_buffer_set_time_stamp_abs(tr->max_buffer.buffer, abs);
#endif
 out:
	mutex_unlock(&trace_types_lock);

	return ret;
}
int tracing_set_time_stamp_abs(struct trace_array *tr, bool abs)
{
	int ret = 0;

	mutex_lock(&trace_types_lock);

	if (abs && tr->time_stamp_abs_ref++)
		goto out;

	if (!abs) {
		if (WARN_ON_ONCE(!tr->time_stamp_abs_ref)) {
			ret = -EINVAL;
			goto out;
		}

		if (--tr->time_stamp_abs_ref)
			goto out;
	}

	ring_buffer_set_time_stamp_abs(tr->trace_buffer.buffer, abs);

#ifdef CONFIG_TRACER_MAX_TRACE
	if (tr->max_buffer.buffer)
		ring_buffer_set_time_stamp_abs(tr->max_buffer.buffer, abs);
#endif
 out:
	mutex_unlock(&trace_types_lock);

	return ret;
}