android_kernel_samsung_msm8976/arch/powerpc
Paul Mackerras 43875cc0a5 [POWERPC] Fix off-by-one error in setting decrementer on Book E/4xx (v2)
The decrementer in Book E and 4xx processors interrupts on the
transition from 1 to 0, rather than on the 0 to -1 transition as on
64-bit server and 32-bit "classic" (6xx/7xx/7xxx) processors.  At the
moment we subtract 1 from the count of how many decrementer ticks are
required before the next interrupt before putting it into the
decrementer, which is correct for server/classic processors, but could
possibly cause the interrupt to happen too early on Book E and 4xx if
the timebase/decrementer frequency is low.

This fixes the problem by making set_dec subtract 1 from the count for
server and classic processors, instead of having the callers subtract
1.  Since set_dec already had a bunch of ifdefs to handle different
processor types, there is no net increase in ugliness. :)

Note that calling set_dec(0) may not generate an interrupt on some
processors.  To make sure that decrementer_set_next_event always calls
set_dec with an interval of at least 1 tick, we set min_delta_ns of
the decrementer_clockevent to correspond to 2 ticks (2 rather than 1
to compensate for truncations in the conversions between ticks and
ns).

This also removes a redundant call to set the decrementer to
0x7fffffff - it was already set to that earlier in timer_interrupt.

Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-11-08 14:15:31 +11:00
..
boot [POWERPC] bootwrapper: Revert ps3 binary flag usage, and remove .bin suffix 2007-11-08 14:15:30 +11:00
configs Merge branch 'for-2.6.24' of master.kernel.org:/pub/scm/linux/kernel/git/jwboyer/powerpc-4xx into merge 2007-10-23 22:20:51 +10:00
kernel [POWERPC] Fix off-by-one error in setting decrementer on Book E/4xx (v2) 2007-11-08 14:15:31 +11:00
lib [POWERPC] rheap: Changes config mechanism 2007-10-16 17:09:21 -06:00
math-emu [POWERPC] Fix handling of stfiwx math emulation 2007-10-16 09:05:24 -05:00
mm [POWERPC] Fix switch_slb handling of 1T ESID values 2007-11-08 14:15:31 +11:00
oprofile Combine instrumentation menus in kernel/Kconfig.instrumentation 2007-10-19 11:53:54 -07:00
platforms [POWERPC] Fix build failure when CONFIG_VIRT_CPU_ACCOUNTING is not defined 2007-11-08 14:15:31 +11:00
sysdev [POWERPC] Fix mv643xx_pci sysfs .read and .write functions 2007-11-08 14:15:29 +11:00
xmon
.gitignore
Kconfig Combine instrumentation menus in kernel/Kconfig.instrumentation 2007-10-19 11:53:54 -07:00
Kconfig.debug [POWERPC] 4xx: Split early debug output and early boot console for 44x 2007-10-19 16:18:18 -05:00
Makefile kbuild: enable 'make CPPFLAGS=...' to add additional options to CPP 2007-10-15 22:17:25 +02:00