x86: print info about available HPET quirk
We have a lot of HPET quirks available which might force enable HPET even when the BIOS does not enable it. Some of those quirks depend on the command line option "hpet=force". Andrew pointed out that hoping that the user will find out about this boot option is not really helpful. Emit a kernel info which informs the user about the "hpet=force" boot option when we enter a quirk which depends on this option and the user did not provide it. Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
This commit is contained in:
committed by
Ingo Molnar
parent
e8aa4667ba
commit
7c4728f4a8
@@ -175,6 +175,12 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH9_7,
|
|||||||
|
|
||||||
static struct pci_dev *cached_dev;
|
static struct pci_dev *cached_dev;
|
||||||
|
|
||||||
|
static void hpet_print_force_info(void)
|
||||||
|
{
|
||||||
|
printk(KERN_INFO "HPET not enabled in BIOS. "
|
||||||
|
"You might try hpet=force boot option\n");
|
||||||
|
}
|
||||||
|
|
||||||
static void old_ich_force_hpet_resume(void)
|
static void old_ich_force_hpet_resume(void)
|
||||||
{
|
{
|
||||||
u32 val;
|
u32 val;
|
||||||
@@ -254,6 +260,8 @@ static void old_ich_force_enable_hpet_user(struct pci_dev *dev)
|
|||||||
{
|
{
|
||||||
if (hpet_force_user)
|
if (hpet_force_user)
|
||||||
old_ich_force_enable_hpet(dev);
|
old_ich_force_enable_hpet(dev);
|
||||||
|
else
|
||||||
|
hpet_print_force_info();
|
||||||
}
|
}
|
||||||
|
|
||||||
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801CA_0,
|
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801CA_0,
|
||||||
@@ -291,9 +299,14 @@ static void vt8237_force_enable_hpet(struct pci_dev *dev)
|
|||||||
{
|
{
|
||||||
u32 uninitialized_var(val);
|
u32 uninitialized_var(val);
|
||||||
|
|
||||||
if (!hpet_force_user || hpet_address || force_hpet_address)
|
if (hpet_address || force_hpet_address)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if (!hpet_force_user) {
|
||||||
|
hpet_print_force_info();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
pci_read_config_dword(dev, 0x68, &val);
|
pci_read_config_dword(dev, 0x68, &val);
|
||||||
/*
|
/*
|
||||||
* Bit 7 is HPET enable bit.
|
* Bit 7 is HPET enable bit.
|
||||||
@@ -341,9 +354,14 @@ static void ati_force_enable_hpet(struct pci_dev *dev)
|
|||||||
{
|
{
|
||||||
u32 uninitialized_var(val);
|
u32 uninitialized_var(val);
|
||||||
|
|
||||||
if (!hpet_force_user || hpet_address || force_hpet_address)
|
if (hpet_address || force_hpet_address)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if (!hpet_force_user) {
|
||||||
|
hpet_print_force_info();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
pci_write_config_dword(dev, 0x14, 0xfed00000);
|
pci_write_config_dword(dev, 0x14, 0xfed00000);
|
||||||
pci_read_config_dword(dev, 0x14, &val);
|
pci_read_config_dword(dev, 0x14, &val);
|
||||||
force_hpet_address = val;
|
force_hpet_address = val;
|
||||||
@@ -369,9 +387,14 @@ static void nvidia_force_enable_hpet(struct pci_dev *dev)
|
|||||||
{
|
{
|
||||||
u32 uninitialized_var(val);
|
u32 uninitialized_var(val);
|
||||||
|
|
||||||
if (!hpet_force_user || hpet_address || force_hpet_address)
|
if (hpet_address || force_hpet_address)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if (!hpet_force_user) {
|
||||||
|
hpet_print_force_info();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
pci_write_config_dword(dev, 0x44, 0xfed00001);
|
pci_write_config_dword(dev, 0x44, 0xfed00001);
|
||||||
pci_read_config_dword(dev, 0x44, &val);
|
pci_read_config_dword(dev, 0x44, &val);
|
||||||
force_hpet_address = val & 0xfffffffe;
|
force_hpet_address = val & 0xfffffffe;
|
||||||
|
Reference in New Issue
Block a user