mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: john stultz <johnstul@us.ibm.com>
To: lkml <linux-kernel@vger.kernel.org>, Andrew Morton <akpm@osdl.org>
Cc: Tim Schmielau <tim@physik3.uni-rostock.de>,
	George Anzinger <george@mvista.com>,
	albert@users.sourceforge.net,
	Ulrich Windl <ulrich.windl@rz.uni-regensburg.de>,
	Christoph Lameter <clameter@sgi.com>,
	Dominik Brodowski <linux@dominikbrodowski.de>,
	David Mosberger <davidm@hpl.hp.com>, Andi Kleen <ak@suse.de>,
	paulus@samba.org, schwidefsky@de.ibm.com,
	keith maanthey <kmannth@us.ibm.com>,
	Chris McDermott <lcm@us.ibm.com>, Max Asbock <masbock@us.ibm.com>,
	mahuja@us.ibm.com, Nishanth Aravamudan <nacc@us.ibm.com>,
	Darren Hart <darren@dvhart.com>,
	"Darrick J. Wong" <djwong@us.ibm.com>,
	Anton Blanchard <anton@samba.org>,
	donf@us.ibm.com, mpm@selenic.com, benh@kernel.crashing.org,
	kernel-stuff@comcast.net, frank@tuxrocks.com
Subject: [PATCH 2/6] new timeofday i386 arch specific changes, part 1 for -mm (v.B3)
Date: Fri, 17 Jun 2005 19:58:04 -0700	[thread overview]
Message-ID: <1119063484.9663.4.camel@cog.beaverton.ibm.com> (raw)
In-Reply-To: <1119063400.9663.2.camel@cog.beaverton.ibm.com>

Andrew, All,
	To hopefully improve the review-ability of my changes, I've split up my
arch-i386 patch into four chunks. This patch is just a simple cleanup
for the i386 arch in preparation of moving the the new timeofday
infrastructure. It simply moves some code from timer_pit.c to i8259.c.
	
It applies on top of my timeofday-core_B3 patch. This patch is part the
timeofday-arch-i386 patchset, so without the following parts it is not
expected to compile (although just this one should).
	
Andrew, please consider for inclusion for testing into your tree.

thanks
-john

Signed-off-by: John Stultz <johnstul@us.ibm.com>

linux-2.6.12-rc6-mm1_timeofday-arch-i386-part1_B3.patch
=======================================================
diff -ruN linux-2.6.12-rc6-mm1/arch/i386/kernel/i8259.c linux-2.6.12-rc6-mm1-tod/arch/i386/kernel/i8259.c
--- linux-2.6.12-rc6-mm1/arch/i386/kernel/i8259.c	2005-06-17 15:56:27.000000000 -0700
+++ linux-2.6.12-rc6-mm1-tod/arch/i386/kernel/i8259.c	2005-06-17 18:28:05.576479704 -0700
@@ -400,6 +400,46 @@
 	}
 }
 
+void setup_pit_timer(void)
+{
+	extern spinlock_t i8253_lock;
+	unsigned long flags;
+
+	spin_lock_irqsave(&i8253_lock, flags);
+	outb_p(0x34,PIT_MODE);		/* binary, mode 2, LSB/MSB, ch 0 */
+	udelay(10);
+	outb_p(LATCH & 0xff , PIT_CH0);	/* LSB */
+	udelay(10);
+	outb(LATCH >> 8 , PIT_CH0);	/* MSB */
+	spin_unlock_irqrestore(&i8253_lock, flags);
+}
+
+static int timer_resume(struct sys_device *dev)
+{
+	setup_pit_timer();
+	return 0;
+}
+
+static struct sysdev_class timer_sysclass = {
+	set_kset_name("timer_pit"),
+	.resume	= timer_resume,
+};
+
+static struct sys_device device_timer = {
+	.id	= 0,
+	.cls	= &timer_sysclass,
+};
+
+static int __init init_timer_sysfs(void)
+{
+	int error = sysdev_class_register(&timer_sysclass);
+	if (!error)
+		error = sysdev_register(&device_timer);
+	return error;
+}
+
+device_initcall(init_timer_sysfs);
+
 void __init init_IRQ(void)
 {
 	int i;
diff -ruN linux-2.6.12-rc6-mm1/arch/i386/kernel/timers/timer_pit.c linux-2.6.12-rc6-mm1-tod/arch/i386/kernel/timers/timer_pit.c
--- linux-2.6.12-rc6-mm1/arch/i386/kernel/timers/timer_pit.c	2005-06-17 15:56:27.000000000 -0700
+++ linux-2.6.12-rc6-mm1-tod/arch/i386/kernel/timers/timer_pit.c	2005-06-17 18:28:05.586478462 -0700
@@ -163,44 +163,3 @@
 	.init = init_pit, 
 	.opts = &timer_pit,
 };
-
-void setup_pit_timer(void)
-{
-	extern spinlock_t i8253_lock;
-	unsigned long flags;
-
-	spin_lock_irqsave(&i8253_lock, flags);
-	outb_p(0x34,PIT_MODE);		/* binary, mode 2, LSB/MSB, ch 0 */
-	udelay(10);
-	outb_p(LATCH & 0xff , PIT_CH0);	/* LSB */
-	udelay(10);
-	outb(LATCH >> 8 , PIT_CH0);	/* MSB */
-	spin_unlock_irqrestore(&i8253_lock, flags);
-}
-
-static int timer_resume(struct sys_device *dev)
-{
-	setup_pit_timer();
-	return 0;
-}
-
-static struct sysdev_class timer_sysclass = {
-	set_kset_name("timer_pit"),
-	.resume	= timer_resume,
-};
-
-static struct sys_device device_timer = {
-	.id	= 0,
-	.cls	= &timer_sysclass,
-};
-
-static int __init init_timer_sysfs(void)
-{
-	int error = sysdev_class_register(&timer_sysclass);
-	if (!error)
-		error = sysdev_register(&device_timer);
-	return error;
-}
-
-device_initcall(init_timer_sysfs);
-



  reply	other threads:[~2005-06-18  3:00 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-06-18  2:56 [PATCH 1/6] new timeofday core subsystem " john stultz
2005-06-18  2:58 ` john stultz [this message]
2005-06-18  2:59   ` [PATCH 3/6] new timeofday i386 arch specific changes, part 2 " john stultz
2005-06-18  3:01     ` [PATCH 4/6] new timeofday i386 arch specific changes, part 3 " john stultz
2005-06-18  3:02       ` [PATCH 5/6] new timeofday i386 arch specific changes, part 4 " john stultz
2005-06-18  3:04         ` [PATCH 6/6] new timeofday i386 specific timesources " john stultz
2005-06-18 12:02 ` [PATCH 1/6] new timeofday core subsystem " Roman Zippel
2005-06-20  7:01   ` Ulrich Windl
2005-06-20 10:22     ` Roman Zippel
2005-06-20 10:31       ` Ulrich Windl
2005-06-20 10:54         ` Roman Zippel
2005-06-20 11:04         ` Christoph Hellwig
2005-06-20 17:09   ` john stultz
2005-06-20 18:10     ` Lee Revell
2005-06-20 21:53       ` john stultz
2005-06-20 23:44         ` Lee Revell
2005-06-21 14:55           ` Chris Friesen
2005-06-21 17:20             ` john stultz
2005-06-21  6:26       ` Ulrich Windl
2005-06-20 22:05     ` Roman Zippel
2005-06-20 23:40       ` Lee Revell
2005-06-20 23:55       ` john stultz
2005-06-21 15:08         ` Roman Zippel
2005-06-22  0:57           ` john stultz
2005-06-22  2:39             ` john stultz
2005-06-22 19:45             ` Roman Zippel
2005-06-23  0:29               ` john stultz
2005-06-23 21:59                 ` Roman Zippel
2005-06-24  0:33                   ` john stultz
2005-06-24 10:58                     ` Roman Zippel
2005-06-21  6:42       ` Ulrich Windl
2005-06-21 15:13         ` Roman Zippel

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=1119063484.9663.4.camel@cog.beaverton.ibm.com \
    --to=johnstul@us.ibm.com \
    --cc=ak@suse.de \
    --cc=akpm@osdl.org \
    --cc=albert@users.sourceforge.net \
    --cc=anton@samba.org \
    --cc=benh@kernel.crashing.org \
    --cc=clameter@sgi.com \
    --cc=darren@dvhart.com \
    --cc=davidm@hpl.hp.com \
    --cc=djwong@us.ibm.com \
    --cc=donf@us.ibm.com \
    --cc=frank@tuxrocks.com \
    --cc=george@mvista.com \
    --cc=kernel-stuff@comcast.net \
    --cc=kmannth@us.ibm.com \
    --cc=lcm@us.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@dominikbrodowski.de \
    --cc=mahuja@us.ibm.com \
    --cc=masbock@us.ibm.com \
    --cc=mpm@selenic.com \
    --cc=nacc@us.ibm.com \
    --cc=paulus@samba.org \
    --cc=schwidefsky@de.ibm.com \
    --cc=tim@physik3.uni-rostock.de \
    --cc=ulrich.windl@rz.uni-regensburg.de \
    /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

all inboxes | Powered by JetHome®