mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Chris Wright <chrisw@sous-sol.org>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: Chris Wright <chrisw@sous-sol.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>,
	john stultz <johnstul@us.ibm.com>, Ingo Molnar <mingo@elte.hu>,
	Arjan van de Ven <arjan@infradead.org>,
	Steven Rostedt <rostedt@goodmis.org>, Andi Kleen <ak@suse.de>,
	Andrew Morton <akpm@linux-foundation.org>,
	Joachim Deguara <joachim.deguara@amd.com>
Subject: [PATCH 4/5] i386: i8253 clockevent shutdown and unused using pit
Date: Tue, 8 May 2007 02:46:28 -0700	[thread overview]
Message-ID: <20070508094628.GW3505@sequoia.sous-sol.org> (raw)
In-Reply-To: <20070508093957.GS3505@sequoia.sous-sol.org>

Disable by programming pit directly when performing CLOCK_EVT_MODE_UNUSED
or CLOCK_EVT_MODE_SHUTDOWN transitions.  (A variant) tested successfully
by Joachim Deguara on a Geode that exhibited BZ 8027 behaviour (with
bad bogomips).

Signed-off-by: Chris Wright <chrisw@sous-sol.org>
Cc: Joachim Deguara <joachim.deguara@amd.com>
---
 arch/i386/kernel/i8253.c |   25 ++++---------------------
 1 file changed, 4 insertions(+), 21 deletions(-)

--- tglx.orig/arch/i386/kernel/i8253.c
+++ tglx/arch/i386/kernel/i8253.c
@@ -29,24 +29,6 @@ EXPORT_SYMBOL(i8253_lock);
  */
 struct clock_event_device *global_clock_event;
 
-/* Status of the PIT interrupt */
-static int pit_irq_disabled;
-
-/*
- * Control pit interrupt enable / disable
- */
-static void pit_control_irq(int disable)
-{
-	if (pit_irq_disabled == disable)
-		return;
-
-	pit_irq_disabled = disable;
-	if (disable)
-		disable_irq(0);
-	else
-		enable_irq(0);
-}
-
 /*
  * Initialize the PIT timer.
  *
@@ -65,17 +47,18 @@ static void init_pit_timer(enum clock_ev
 		outb_p(0x34, PIT_MODE);
 		outb_p(LATCH & 0xff , PIT_CH0);	/* LSB */
 		outb(LATCH >> 8 , PIT_CH0);	/* MSB */
-		pit_control_irq(0);
 		break;
 
 	case CLOCK_EVT_MODE_SHUTDOWN:
 	case CLOCK_EVT_MODE_UNUSED:
-		pit_control_irq(1);
+		outb_p(0x30, PIT_MODE);
+		outb_p(0, PIT_CH0);	/* LSB */
+		outb_p(0, PIT_CH0);	/* MSB */
 		break;
+
 	case CLOCK_EVT_MODE_ONESHOT:
 		/* One shot setup */
 		outb_p(0x38, PIT_MODE);
-		pit_control_irq(0);
 		break;
 
 	case CLOCK_EVT_MODE_RESUME:

  parent reply	other threads:[~2007-05-08  9:52 UTC|newest]

Thread overview: 53+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-06 20:58 [PATCH] x86-64 highres/dyntick support Thomas Gleixner
2007-05-07  9:16 ` Nicolas Mailhot
2007-05-07 15:28   ` Thomas Gleixner
2007-05-08 17:08     ` Nicolas Mailhot
2007-05-07 16:31 ` Chris Wright
2007-05-07 16:46   ` Thomas Gleixner
2007-05-07 17:18     ` Chris Wright
2007-05-08  9:39     ` Chris Wright
2007-05-08  9:42       ` [PATCH 1/5] x86_64: tsc compile fix Chris Wright
2007-05-08  9:47         ` Thomas Gleixner
2007-05-08  9:43       ` [PATCH 2/5] x86_64: __setup_APIC_LVTT whitespace fix Chris Wright
2007-05-08  9:48         ` Thomas Gleixner
2007-05-08  9:44       ` [PATCH 3/5] i386: hpet assumes boot cpu is 0 Chris Wright
2007-05-08  9:54         ` Thomas Gleixner
2007-05-08  9:46       ` Chris Wright [this message]
2007-05-08  9:53         ` [PATCH 4/5] i386: i8253 clockevent shutdown and unused using pit Thomas Gleixner
2007-05-08  9:47       ` [PATCH 5/5] x86_64: restore restore nohpet cmdline Chris Wright
2007-05-08  9:53         ` Thomas Gleixner
2007-05-08  9:51       ` [PATCH] x86-64 highres/dyntick support Thomas Gleixner
2007-05-08  9:51         ` Chris Wright
2007-05-08  9:58           ` Thomas Gleixner
2007-05-08 10:06             ` Chris Wright
2007-05-08 10:34               ` Thomas Gleixner
2007-05-08 13:15           ` Pallipadi, Venkatesh
2007-05-07 22:43 ` Venki Pallipadi
2007-05-07 23:15   ` Thomas Gleixner
2007-05-14  1:17 ` Alistair John Strachan
2007-05-14  6:33   ` Thomas Gleixner
2007-05-14 10:26   ` [PATCH] x86-64 highres/dyntick support 2.6.22-rc1-v1 Thomas Gleixner
2007-05-14 20:10     ` Valdis.Kletnieks
2007-05-14 20:23       ` Thomas Gleixner
2007-05-14 21:15     ` Alistair John Strachan
2007-05-14 22:05       ` Thomas Gleixner
2007-05-14 22:42         ` Alistair John Strachan
2007-05-15  8:18           ` [PATCH] x86-64 highres/dyntick support 2.6.22-rc1-v4 Thomas Gleixner
2007-05-15 14:06             ` Frank Sorenson
2007-05-15 21:53               ` Thomas Gleixner
2007-05-15 23:20                 ` Frank Sorenson
2007-05-16  5:02                   ` Frank Sorenson
2007-05-16  6:20                     ` Thomas Gleixner
2007-05-16  9:01                       ` Thomas Gleixner
2007-05-15 23:23             ` Alistair John Strachan
2007-05-16  5:54               ` Thomas Gleixner
2007-05-16 10:03 ` [PATCH] x86-64 highres/dyntick support 2.6.22-rc1-v5 Thomas Gleixner
2007-05-16 19:48   ` Frank Sorenson
2007-05-17  4:25     ` Frank Sorenson
2007-05-17 19:12       ` Frank Sorenson
2007-05-17 19:19         ` Christoph Lameter
2007-05-18  3:55           ` Frank Sorenson
2007-05-18 16:58             ` Christoph Lameter
2007-05-18 19:44             ` Christoph Lameter
2007-05-17 22:09 ` [PATCH] x86-64 highres/dyntick support 2.6.22-rc1-v7 Thomas Gleixner
2007-05-21  1:14   ` Valdis.Kletnieks

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070508094628.GW3505@sequoia.sous-sol.org \
    --to=chrisw@sous-sol.org \
    --cc=ak@suse.de \
    --cc=akpm@linux-foundation.org \
    --cc=arjan@infradead.org \
    --cc=joachim.deguara@amd.com \
    --cc=johnstul@us.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=rostedt@goodmis.org \
    --cc=tglx@linutronix.de \
    --cc=venkatesh.pallipadi@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome