Mike A. Harris wrote: > > The i830 DRM driver contains empty for loops used for short > delays. Modern gcc and other compilers, when used with > optimization switches will optimize these empty for loops out, > leaving no delay. In addition, CPU's such as the Pentium 4, will > needlessly overheat when executing empty for loops such as this > (assuming they're not optimized out by the compiler) which can > cause the chip to kick in it's thermal protection and lower the > CPU speed.
You've got to be kidding... The P4 docs suggest using a PAUSE insn to reduce the otherwise-huge branch misprediction penalty associated with busy-wait loops like this. It also allows the processor to consume less power, which is handy for mobile platforms. To suggest that a busy-wait loop will cause the processor to overheat (given a functioning -- and attached -- heatsink/fan combo) and kick in the thermal protection is absurd! :-) > Instead of using empty for loops for delays, udelay() should be > used to provide delays. Either way, this is A Good Thing(TM). -- Gareth _______________________________________________ Dri-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/dri-devel
