Re: [PATCH] (comments requested) adding finer-grained timing to PPC add_timer_randomness()

From: Benjamin Herrenschmidt (benh@kernel.crashing.org)
Date: Thu Aug 23 2001 - 08:11:04 EST


>> In the 2.4 tree we have code that works out a cpu features word from
>> the PVR value. The cpu features word has bits for things like does
>> the cpu have the TB register, does the MMU use a hash table, does the
>> cpu have separate I and D caches, etc.
>
>Reading the PVR is probably faster in this case, since you avoid a
>potential cache miss. As I said in an earlier message the __USE_RTC macro
>should be made dependent on whether the kernel supports 601 or not.

The CPU features will nop-out sections of code that don't apply for
a given CPU if you use the assembly macros. If you nop'out a couple
of instructions, you win over reading the PVR, masking out bits,
comparing, and doing a conditional branch.

Ben.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Thu Aug 23 2001 - 21:00:56 EST