Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=7671988b9cd31daf53fd38f8e75c8b881324842b Commit: 7671988b9cd31daf53fd38f8e75c8b881324842b Parent: 82644459c592a28a3eab682f9b88d81019ddfe8b Author: Thomas Gleixner <[EMAIL PROTECTED]> AuthorDate: Sat Jul 21 04:37:38 2007 -0700 Committer: Linus Torvalds <[EMAIL PROTECTED]> CommitDate: Sat Jul 21 17:49:15 2007 -0700
i386: PIT stop only, when in periodic or oneshot mode The patch is necessary on one of my boxen, where programming the stop sequence twice leads to PIT malfunction. Sigh ! Signed-off-by: Thomas Gleixner <[EMAIL PROTECTED]> Cc: Andi Kleen <[EMAIL PROTECTED]> Cc: Ingo Molnar <[EMAIL PROTECTED]> Signed-off-by: Andrew Morton <[EMAIL PROTECTED]> Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]> --- arch/i386/kernel/i8253.c | 9 ++++++--- 1 files changed, 6 insertions(+), 3 deletions(-) diff --git a/arch/i386/kernel/i8253.c b/arch/i386/kernel/i8253.c index 931eabe..bde249d 100644 --- a/arch/i386/kernel/i8253.c +++ b/arch/i386/kernel/i8253.c @@ -47,9 +47,12 @@ static void init_pit_timer(enum clock_event_mode mode, case CLOCK_EVT_MODE_SHUTDOWN: case CLOCK_EVT_MODE_UNUSED: - outb_p(0x30, PIT_MODE); - outb_p(0, PIT_CH0); /* LSB */ - outb_p(0, PIT_CH0); /* MSB */ + if (evt->mode == CLOCK_EVT_MODE_PERIODIC || + evt->mode == CLOCK_EVT_MODE_ONESHOT) { + outb_p(0x30, PIT_MODE); + outb_p(0, PIT_CH0); + outb_p(0, PIT_CH0); + } break; case CLOCK_EVT_MODE_ONESHOT: - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html