From: Carlos Corbacho <cathectic@slackadelic.com>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-kernel@vger.kernel.org,
Mikko Tiihonen <mikko.tiihonen@iki.fi>,
Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Subject: Re: nVidia HPET force enable - merge requirements? (resend)
Date: Fri, 19 Oct 2007 16:29:10 +0100 [thread overview]
Message-ID: <200710191629.11526.cathectic@slackadelic.com> (raw)
In-Reply-To: <alpine.LFD.0.9999.0710190847500.22770@localhost.localdomain>
Thomas,
On Friday 19 October 2007 07:50:08 Thomas Gleixner wrote:
> So if there are working quirks, please refactor them analogous to the
> existing ones in quirks.c.
>
> All undocumented chipset poking needs to be protected by the
> hpet=force boot option, so the default is not to do scan for it.
Would the following patch be more acceptable then? I've limited the device
id's to just the nForce 4 chipset, because that's the only one I have here
to test with at the moment - it appears to work fine:
hpet clockevent registered
hpet0: at MMIO 0xfefff000, IRQs 2, 8, 31
hpet0: 3 32-bit timers, 25000000 Hz
Time: hpet clocksource has been installed.
Switched to high resolution mode on CPU 0
Switched to high resolution mode on CPU 1
At the moment, I'm not clear on how to detect if the HPET has not been
enabled by the BIOS (but given that this is hidden behind hpet=force,
would this be acceptable, since the user would have to explicitly call
hpet=force, and then it either works or doesn't?)
-Carlos
diff --git a/arch/x86/kernel/quirks.c b/arch/x86/kernel/quirks.c
index a4ce191..7c772bf 100644
--- a/arch/x86/kernel/quirks.c
+++ b/arch/x86/kernel/quirks.c
@@ -321,6 +321,26 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8235,
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8237,
vt8237_force_enable_hpet);
+static void nvidia_force_enable_hpet(struct pci_dev *dev)
+{
+ u32 uninitialized_var(val);
+
+ if (!hpet_force_user || hpet_address || force_hpet_address)
+ return;
+
+ pci_read_config_dword(dev, 0x44, &val);
+ force_hpet_address = val;
+ printk(KERN_DEBUG "Force enabled HPET at base address 0x%lx\n",
+ force_hpet_address);
+ cached_dev = dev;
+ return;
+}
+
+/* ISA Bridge */
+DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_NVIDIA, 0x0050,
+ nvidia_force_enable_hpet);
+DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_NVIDIA, 0x0051,
+ nvidia_force_enable_hpet);
void force_hpet_resume(void)
{
next prev parent reply other threads:[~2007-10-19 15:28 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-19 3:23 Carlos Corbacho
2007-10-19 6:50 ` Thomas Gleixner
2007-10-19 15:29 ` Carlos Corbacho [this message]
2007-10-19 16:19 ` Thomas Gleixner
2007-10-19 17:51 ` [PATCH] x86: Force enable HPET for CK804 (nForce 4) chipsets Carlos Corbacho
2007-10-19 17:58 ` Thomas Gleixner
2007-10-19 18:07 ` [PATCH] x86: Fix resume for nVidia and force_hpet Carlos Corbacho
2007-10-19 18:15 ` Thomas Gleixner
2007-10-19 18:34 ` x86: Add HPET force support for MCP55 (nForce 5) chipsets Carlos Corbacho
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=200710191629.11526.cathectic@slackadelic.com \
--to=cathectic@slackadelic.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mikko.tiihonen@iki.fi \
--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