/* Atomically adds @delta to @ptr and returns @delta + *@ptr  */
noinline u64 atomic64_add_return(u64 delta, atomic64_t *ptr)
/* Atomically adds @delta to @ptr and returns @delta + *@ptr  */
noinline u64 atomic64_add_return(u64 delta, atomic64_t *ptr)
{
	u64 old_val, new_val, real_val = 0;
	do {
		old_val = real_val;
		new_val = old_val + delta;
		real_val = atomic64_cmpxchg(ptr, old_val, new_val);
	} while (real_val != old_val);
	return new_val;
}