/* Crude but fast random-number generator. Uses a linear congruential generator, with occasional help from cpu_clock().  */
static unsigned long rcu_random(struct rcu_random_state *rrsp)
/* Crude but fast random-number generator. Uses a linear congruential generator, with occasional help from cpu_clock().  */
static unsigned long rcu_random(struct rcu_random_state *rrsp)
{
	if (--rrsp->rrs_count < 0) {
		rrsp->rrs_state +=
			(unsigned long)cpu_clock(raw_smp_processor_id());
		rrsp->rrs_count = RCU_RANDOM_REFRESH;
	}
	rrsp->rrs_state = rrsp->rrs_state * RCU_RANDOM_MULT + RCU_RANDOM_ADD;
	return swahw32(rrsp->rrs_state);
}