From: Venki Pallipadi <venkatesh.pallipadi@intel.com>
To: linux-kernel <linux-kernel@vger.kernel.org>
Cc: Andrew Morton <akpm@osdl.org>,
Thomas Gleixner <tglx@linutronix.de>, Andi Kleen <ak@suse.de>,
Ingo Molnar <mingo@elte.hu>, Chris Wright <chrisw@sous-sol.org>
Subject: [PATCH 5/8] Late init of HPET after PCI quirk detection
Date: Mon, 7 May 2007 13:32:17 -0700 [thread overview]
Message-ID: <20070507203217.GE3926@linux-os.sc.intel.com> (raw)
Enable HPET later during boot, after the force detect in PCI quirks.
Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Index: linux-2.6.21-rc-mm-hpet/include/asm-i386/hpet.h
===================================================================
--- linux-2.6.21-rc-mm-hpet.orig/include/asm-i386/hpet.h 2007-04-17 14:09:06.000000000 -0700
+++ linux-2.6.21-rc-mm-hpet/include/asm-i386/hpet.h 2007-04-18 10:03:47.000000000 -0700
@@ -91,6 +91,7 @@
#define HPET_TICK_RATE (HZ * 100000UL)
extern unsigned long hpet_address; /* hpet memory map physical address */
+extern unsigned long force_hpet_address;/* hpet address as detected by quirks */
extern int is_hpet_enabled(void);
#ifdef CONFIG_X86_64
Index: linux-2.6.21-rc-mm-hpet/arch/i386/kernel/hpet.c
===================================================================
--- linux-2.6.21-rc-mm-hpet.orig/arch/i386/kernel/hpet.c 2007-04-17 15:51:34.000000000 -0700
+++ linux-2.6.21-rc-mm-hpet/arch/i386/kernel/hpet.c 2007-04-18 10:00:20.000000000 -0700
@@ -125,6 +125,7 @@
.set_next_event = hpet_legacy_next_event,
.shift = 32,
.irq = 0,
+ .rating = 50,
};
static void hpet_start_counter(void)
@@ -285,6 +286,9 @@
{
unsigned long id;
+ if (hpet_virt_address)
+ return 0;
+
if (!is_hpet_capable())
return 0;
@@ -329,6 +333,26 @@
}
+static int __init hpet_late_init(void)
+{
+ if (boot_hpet_disable)
+ return -ENODEV;
+
+ if (!hpet_address) {
+ if (!force_hpet_address)
+ return -ENODEV;
+
+ hpet_address = force_hpet_address;
+ hpet_enable();
+ if (!hpet_virt_address)
+ return -ENODEV;
+ }
+
+ return 0;
+}
+module_init(hpet_late_init);
+
+
#ifdef CONFIG_HPET_EMULATE_RTC
/* HPET in LegacyReplacement Mode eats up RTC interrupt line. When, HPET
reply other threads:[~2007-05-07 20:34 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20070507203217.GE3926@linux-os.sc.intel.com \
--to=venkatesh.pallipadi@intel.com \
--cc=ak@suse.de \
--cc=akpm@osdl.org \
--cc=chrisw@sous-sol.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=tglx@linutronix.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