]> git.baikalelectronics.ru Git - kernel.git/commit
x86: GEODE: MFGPT: fix a potential race when disabling a timer
authorAndres Salomon <dilinger@debian.org>
Sat, 9 Feb 2008 22:24:08 +0000 (23:24 +0100)
committerThomas Gleixner <tglx@linutronix.de>
Sat, 9 Feb 2008 22:24:08 +0000 (23:24 +0100)
commit48818d6681773f45ff5b0763ff3cae5d36d1abbe
tree642ce77688984fc60c1f7d8dc2e7e8ad982c9cf9
parentad77bc38360fb40109f7143986c967e1e70ab27f
x86: GEODE: MFGPT: fix a potential race when disabling a timer

We *really* don't want to be reading MFGPTx_SETUP and writing back those
values.  What we want to be doing is clearing CMP1 and CMP2 unconditionally;
otherwise, we have races where CMP1 and/or CMP2 fire after we've read
MFGPTx_SETUP.  They can also fire between when we've written ~CNTEN to
the register, and when the new register values get copied to the timer's
version of the register.  By clearing both fields, we're okay.

Signed-off-by: Andres Salomon <dilinger@debian.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
arch/x86/kernel/mfgpt_32.c