Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fe699336 authored by Len Brown's avatar Len Brown Committed by Linus Torvalds
Browse files

[PATCH] ACPI: repair nvidia early quirk breakage on x86_64



x86_64 nvidia_bugs() broke when we bailed out on not finding the HPET.
However, the quirk works by checking for _not_ finding the HPET...

Delete the nvidia_hpet_detected flag and simply test for
not finding the HPET, which is simple to do now that
acpi_table_parse returns 1 on failure.

Signed-off-by: default avatarLen Brown <len.brown@intel.com>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent eb9c4f2e
Loading
Loading
Loading
Loading
+1 −6
Original line number Original line Diff line number Diff line
@@ -14,11 +14,8 @@


#ifdef CONFIG_ACPI
#ifdef CONFIG_ACPI


static int nvidia_hpet_detected __initdata;

static int __init nvidia_hpet_check(struct acpi_table_header *header)
static int __init nvidia_hpet_check(struct acpi_table_header *header)
{
{
	nvidia_hpet_detected = 1;
	return 0;
	return 0;
}
}
#endif
#endif
@@ -29,9 +26,7 @@ static int __init check_bridge(int vendor, int device)
	/* According to Nvidia all timer overrides are bogus unless HPET
	/* According to Nvidia all timer overrides are bogus unless HPET
	   is enabled. */
	   is enabled. */
	if (!acpi_use_timer_override && vendor == PCI_VENDOR_ID_NVIDIA) {
	if (!acpi_use_timer_override && vendor == PCI_VENDOR_ID_NVIDIA) {
		nvidia_hpet_detected = 0;
		if (acpi_table_parse(ACPI_SIG_HPET, nvidia_hpet_check) {
		acpi_table_parse(ACPI_SIG_HPET, nvidia_hpet_check);
		if (nvidia_hpet_detected == 0) {
			acpi_skip_timer_override = 1;
			acpi_skip_timer_override = 1;
			  printk(KERN_INFO "Nvidia board "
			  printk(KERN_INFO "Nvidia board "
                       "detected. Ignoring ACPI "
                       "detected. Ignoring ACPI "
+1 −8
Original line number Original line Diff line number Diff line
@@ -30,11 +30,8 @@ static void via_bugs(void)


#ifdef CONFIG_ACPI
#ifdef CONFIG_ACPI


static int nvidia_hpet_detected __initdata;

static int __init nvidia_hpet_check(struct acpi_table_header *header)
static int __init nvidia_hpet_check(struct acpi_table_header *header)
{
{
	nvidia_hpet_detected = 1;
	return 0;
	return 0;
}
}
#endif
#endif
@@ -52,11 +49,7 @@ static void nvidia_bugs(void)
	if (acpi_use_timer_override)
	if (acpi_use_timer_override)
		return;
		return;


	nvidia_hpet_detected = 0;
	if (acpi_table_parse(ACPI_SIG_HPET, nvidia_hpet_check)) {
	if (acpi_table_parse(ACPI_SIG_HPET, nvidia_hpet_check))
		return;

	if (nvidia_hpet_detected == 0) {
		acpi_skip_timer_override = 1;
		acpi_skip_timer_override = 1;
		printk(KERN_INFO "Nvidia board "
		printk(KERN_INFO "Nvidia board "
		       "detected. Ignoring ACPI "
		       "detected. Ignoring ACPI "