linux/arch/parisc/kernel
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
..
.gitignore
asm-offsets.c parisc: move pdc_result to real2.S 2008-10-10 16:32:28 +00:00
binfmt_elf32.c [PATCH] remove unused ibcs2/PER_SVR4 in SET_PERSONALITY 2008-10-16 15:40:05 +02:00
cache.c parisc: remove CVS keywords 2009-07-03 03:34:06 +00:00
drivers.c parisc: add uevent helper for parisc bus 2009-01-05 19:11:59 +00:00
entry.S parisc: add ftrace (function and graph tracer) functionality 2009-03-31 02:51:34 +00:00
firmware.c parisc: expose 32/64-bit capabilities in cpuinfo 2009-03-31 02:51:33 +00:00
ftrace.c parisc: add ftrace (function and graph tracer) functionality 2009-03-31 02:51:34 +00:00
hardware.c
head.S parisc: hijack jump to start_kernel 2008-10-10 16:32:30 +00:00
hpmc.S parisc: export length of os_hpmc vector 2009-01-05 19:18:27 +00:00
init_task.c mm: consolidate init_mm definition 2009-06-16 19:47:28 -07:00
inventory.c
irq.c parisc: remove obsolete hw_interrupt_type 2009-07-03 03:34:08 +00:00
Makefile parisc: add ftrace (function and graph tracer) functionality 2009-03-31 02:51:34 +00:00
module.c module: cleanup FIXME comments about trimming exception table entries. 2009-06-12 21:47:05 +09:30
pa7300lc.c
pacache.S
parisc_ksyms.c parisc: add ftrace (function and graph tracer) functionality 2009-03-31 02:51:34 +00:00
pci-dma.c parisc: BUG_ON() cleanup 2009-03-13 01:16:35 -04:00
pci.c parisc: remove CVS keywords 2009-07-03 03:34:06 +00:00
pdc_chassis.c
pdc_cons.c parisc: Use DEFINE_SPINLOCK 2009-01-05 19:13:18 +00:00
perf_asm.S
perf_images.h
perf.c parisc: Replace NR_CPUS in parisc code 2009-01-05 19:09:02 +00:00
process.c ptrace: remove PT_DTRACE from avr32, mn10300, parisc, s390, sh, xtensa 2009-06-18 13:03:48 -07:00
processor.c parisc: remove CVS keywords 2009-07-03 03:34:06 +00:00
ptrace.c parisc: fix bug in compat_arch_ptrace 2008-11-20 13:09:17 -08:00
real2.S parisc: move pdc_result to real2.S 2008-10-10 16:32:28 +00:00
setup.c parisc: remove CVS keywords 2009-07-03 03:34:06 +00:00
signal32.c
signal32.h
signal.c CRED: Wrap task credential accesses in the PA-RISC arch 2008-11-14 10:38:38 +11:00
smp.c Merge branch 'rusty-cpumask-parisc' into parisc 2009-04-02 01:43:14 +00:00
stacktrace.c parisc: add LATENCYTOP_SUPPORT and CONFIG_STACKTRACE_SUPPORT 2009-03-31 02:51:34 +00:00
sys32.h
sys_parisc32.c ptrace: remove PT_DTRACE from avr32, mn10300, parisc, s390, sh, xtensa 2009-06-18 13:03:48 -07:00
sys_parisc.c
syscall_table.S parisc: wire up preadv/pwritev syscalls 2009-07-03 03:34:05 +00:00
syscall.S parisc: document light weight syscall ABI 2009-03-31 02:51:35 +00:00
time.c parisc: fix "delay!" timer handling 2009-07-03 03:34:09 +00:00
topology.c parisc: Replace NR_CPUS in parisc code 2009-01-05 19:09:02 +00:00
traps.c parisc: oops_enter()/oops_exit() in die() 2009-03-31 02:51:35 +00:00
unaligned.c
unwind.c parisc: fix GFP_KERNEL use while atomic in unwinder 2009-01-05 18:15:25 +00:00
vmlinux.lds.S parisc: add ftrace (function and graph tracer) functionality 2009-03-31 02:51:34 +00:00