linux/arch
Grant Grundler 84be31be37 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
2009-07-03 03:34:09 +00:00
..
alpha Move FAULT_FLAG_xyz into handle_mm_fault() callers 2009-06-21 13:08:22 -07:00
arm Merge git://git.infradead.org/mtd-2.6 2009-06-22 16:56:22 -07:00
avr32 Move FAULT_FLAG_xyz into handle_mm_fault() callers 2009-06-21 13:08:22 -07:00
blackfin Blackfin: fix dma-mapping build errors 2009-06-22 22:31:00 -04:00
cris Move FAULT_FLAG_xyz into handle_mm_fault() callers 2009-06-21 13:08:22 -07:00
frv Move FAULT_FLAG_xyz into handle_mm_fault() callers 2009-06-21 13:08:22 -07:00
h8300 ptrace: remove PT_DTRACE from arch/h8300 2009-06-18 13:03:48 -07:00
ia64 Merge git://git.infradead.org/~dwmw2/iommu-2.6.31 2009-06-22 21:38:22 -07:00
m32r Move FAULT_FLAG_xyz into handle_mm_fault() callers 2009-06-21 13:08:22 -07:00
m68k Move FAULT_FLAG_xyz into handle_mm_fault() callers 2009-06-21 13:08:22 -07:00
m68knommu ptrace: remove PT_DTRACE from m68k, m68knommu 2009-06-18 13:03:48 -07:00
microblaze Move FAULT_FLAG_xyz into handle_mm_fault() callers 2009-06-21 13:08:22 -07:00
mips Move FAULT_FLAG_xyz into handle_mm_fault() callers 2009-06-21 13:08:22 -07:00
mn10300 MN10300: Fix the vmlinux ldscript 2009-06-22 13:34:50 -07:00
parisc parisc: fix "delay!" timer handling 2009-07-03 03:34:09 +00:00
powerpc Merge branch 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6 2009-06-22 11:59:51 -07:00
s390 [S390] Update default configuration. 2009-06-22 12:08:25 +02:00
sh Move FAULT_FLAG_xyz into handle_mm_fault() callers 2009-06-21 13:08:22 -07:00
sparc Move FAULT_FLAG_xyz into handle_mm_fault() callers 2009-06-21 13:08:22 -07:00
um Move FAULT_FLAG_xyz into handle_mm_fault() callers 2009-06-21 13:08:22 -07:00
x86 Merge git://git.infradead.org/~dwmw2/iommu-2.6.31 2009-06-22 21:38:22 -07:00
xtensa xtensa: enable m41t80 driver in s6105_defconfig 2009-06-22 02:38:11 -07:00
.gitignore
Kconfig gcov: add gcov profiling infrastructure 2009-06-18 13:03:57 -07:00