static inline bool __rb_time_read(rb_time_t *t, u64 *ret, unsigned long *cnt)
{
	unsigned long top, bottom;
	unsigned long c;

	/*
	 * If the read is interrupted by a write, then the cnt will
	 * be different. Loop until both top and bottom have been read
	 * without interruption.
	 */
	do {
		c = local_read(&t->cnt);
		top = local_read(&t->top);
		bottom = local_read(&t->bottom);
	} while (c != local_read(&t->cnt));

	*cnt = rb_time_cnt(top);

	/* If top and bottom counts don't match, this interrupted a write */
	if (*cnt != rb_time_cnt(bottom))
		return false;

	*ret = rb_time_val(top, bottom);
	return true;
}
static inline bool __rb_time_read(rb_time_t *t, u64 *ret, unsigned long *cnt)
{
	unsigned long top, bottom;
	unsigned long c;

	 
	do {
		c = local_read(&t->cnt);
		top = local_read(&t->top);
		bottom = local_read(&t->bottom);
	} while (c != local_read(&t->cnt));

	*cnt = rb_time_cnt(top);

	 
	if (*cnt != rb_time_cnt(bottom))
		return false;

	*ret = rb_time_val(top, bottom);
	return true;
}