summaryrefslogtreecommitdiff
path: root/arch/parisc/kernel/cache.c
diff options
context:
space:
mode:
authorGrant Grundler <grundler@parisc-linux.org>2009-06-01 00:20:23 +0000
committerKyle McMartin <kyle@mcmartin.ca>2009-07-03 03:34:09 +0000
commit84be31be3727d11b2a91781306b642e801c5a379 (patch)
tree34ba0390a709316a7f4f65f83e6f6ff09248a174 /arch/parisc/kernel/cache.c
parent87451d850c895470a122308086069b7c326c914b (diff)
parisc: fix "delay!" timer handling
Rewrote timer_interrupt() to properly handle the "delayed!" case. If we used floating point math to compute the number of ticks that had elapsed since the last timer interrupt, it could take up to 12K cycles (emperical!) to handle the interrupt. Existing code assumed it would never take more than 8k cycles. We end up programming Interval Timer to a value less than "current" cycle counter. Thus have to wait until Interval Timer "wrapped" and would then get the "delayed!" printk that I moved below. Since we don't really know what the upper limit is, I prefer to read CR16 again after we've programmed it to make sure we won't have to wait for CR16 to wrap. Further, the printk was between reading CR16 (cycle couner) and writing CR16 (the interval timer). This would cause us to continue to set the interval timer to a value that was "behind" the cycle counter. Rinse and repeat. So no printk's between reading CR16 and setting next interval timer. Tested on A500 (550 Mhz PA8600). Signed-off-by: Grant Grundler <grundler@parisc-linux.org> Tested-by: Kyle McMartin <kyle@mcmartin.ca> Signed-off-by: Kyle McMartin <kyle@mcmartin.ca> ---- Kyle, Helge, and other parisc's, Please test on 32-bit before committing. I think I have it right but recognize I might not. TODO: I wanted to use "do_div()" in order to get both remainder and value back with one division op. That should help with the latency alot but can be applied seperately from this patch. thanks, grant
Diffstat (limited to 'arch/parisc/kernel/cache.c')
0 files changed, 0 insertions, 0 deletions