]> git.baikalelectronics.ru Git - kernel.git/commit
x86: GEODE fix a race condition in the MFGPT timer tick
authorJordan Crouse <jordan.crouse@amd.com>
Tue, 22 Jan 2008 22:30:16 +0000 (23:30 +0100)
committerIngo Molnar <mingo@elte.hu>
Tue, 22 Jan 2008 22:30:16 +0000 (23:30 +0100)
commita8708a072a305b3bc9931e24d0b210b3e0a5059e
tree46d16e4d45ebdaca7b01c593bd19d049776568d9
parent2e02ac3b00149ccefa4560168c1dc2574e16d550
x86: GEODE fix a race condition in the MFGPT timer tick

When we set the MFGPT timer tick, there is a chance that we'll
immediately assert an event.  If for some reason the IRQ routing
for this clock has been setup for some other purpose, then we
could end up firing an interrupt into the SMM handler or worse.

This rearranges the timer tick init function to initalize the handler
before we set up the MFGPT clock to make sure that even if we get
an event, it will go to the handler.

Furthermore, in the handler we need to make sure that we clear the
event, even if the timer isn't running.

Signed-off-by: Jordan Crouse <jordan.crouse@amd.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Ingo Molnar <mingo@elte.hu>
Tested-by: Arnd Hannemann <hannemann@i4.informatik.rwth-aachen.de>
arch/x86/kernel/mfgpt_32.c