Skip to contentSkip to conversation

ACPI: Fix the irq0 assigning issue for AMILO PRO V2030 platform

PATCH In review Feng Tang 2 participants 6 messages May 29, 2012 – Jun 4, 2012

Subsystems (2)
lore
Share & tools
lore

Feng Tang

author
#0 lore raw

PATCH 1/1 ACPI: Fix the irq0 assigning issue for AMILO PRO V2030 platform

This is to fix the kernel bugzilla 40002: "IRQ 0 assigned to VGA"
https://bugzilla.kernel.org/show_bug.cgi?id=40002

The root cause is the buggy FW, whose ACPI tables assign the GSI 16 to 2 irqs 0 and 16(VGA), and the VGA is the right owner of GSI 16. So add a quirk to ignore the irq0 overriding GSI 16 for the FUJITSU SIEMENS AMILO PRO V2030 platform will solve this issue.

This also slightly modify the current irq0 override handling, as it only covered the irq0 overriding GSI 2 case.

---
 arch/x86/kernel/acpi/boot.c |   17 ++++++++++++++---
 1 files changed, 14 insertions(+), 3 deletions(-)
arch/x86/kernel/acpi/boot.c +14 -3
index 4558f0d..06c78c3 100644
@@ -416,12 +416,14 @@ acpi_parse_int_src_ovr(struct acpi_subtable_header * header,
 		return 0;
 	}
 
-	if (intsrc->source_irq == 0 && intsrc->global_irq == 2) {
+	if (intsrc->source_irq == 0) {
 		if (acpi_skip_timer_override) {
-			printk(PREFIX "BIOS IRQ0 pin2 override ignored.\n");
+			printk(PREFIX "BIOS IRQ0 override ignored.\n");
 			return 0;
 		}
-		if (acpi_fix_pin2_polarity && (intsrc->inti_flags & ACPI_MADT_POLARITY_MASK)) {
+
+		if ((intsrc->global_irq == 2) && acpi_fix_pin2_polarity
+			&& (intsrc->inti_flags & ACPI_MADT_POLARITY_MASK)) {
 			intsrc->inti_flags &= ~ACPI_MADT_POLARITY_MASK;
 			printk(PREFIX "BIOS IRQ0 pin2 override: forcing polarity to high active.\n");
 		}
@@ -1466,6 +1468,15 @@ static struct dmi_system_id __initdata acpi_dmi_table_late[] = {
 		     DMI_MATCH(DMI_PRODUCT_NAME, "HP Compaq 6715b"),
 		     },
 	 },
+	{
+	 .callback = dmi_ignore_irq0_timer_override,
+	 .ident = "FUJITSU SIEMENS",
+	 .matches = {
+		     DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU SIEMENS"),
+		     DMI_MATCH(DMI_PRODUCT_NAME, "AMILO PRO V2030"),
+		     },
+	 },
+
 	{}
 };
 
Signature · 1 line
1.7.9
reviewer
#1 lore raw

Hello Tang-Feng,

This looks good, but especially w/ interrupt patches, it is important to take logically independent baby steps. So please break this patch into two, and add another small bit in a 3 patch series:

1. allow the workaround to apply to non global_irq 2
2. delete the WARN from dmi_ignore_irq0_timer_override as it causes alarm, but gives no benefit
3. add the DMI to invoke the workaround for this platform

thanks,
-Len Brown, Intel Open Source Technology Center

Quoted 56 lines · Feng Tang

This is to fix the kernel bugzilla 40002: "IRQ 0 assigned to VGA"
https://bugzilla.kernel.org/show_bug.cgi?id=40002

The root cause is the buggy FW, whose ACPI tables assign the GSI 16 to 2 irqs 0 and 16(VGA), and the VGA is the right owner of GSI 16. So add a quirk to ignore the irq0 overriding GSI 16 for the FUJITSU SIEMENS AMILO PRO V2030 platform will solve this issue.

This also slightly modify the current irq0 override handling, as it only covered the irq0 overriding GSI 2 case.

---
 arch/x86/kernel/acpi/boot.c |   17 ++++++++++++++---
 1 files changed, 14 insertions(+), 3 deletions(-)
arch/x86/kernel/acpi/boot.c +14 -3
index 4558f0d..06c78c3 100644
@@ -416,12 +416,14 @@ acpi_parse_int_src_ovr(struct acpi_subtable_header * header,
 		return 0;
 	}
 
-	if (intsrc->source_irq == 0 && intsrc->global_irq == 2) {
+	if (intsrc->source_irq == 0) {
 		if (acpi_skip_timer_override) {
-			printk(PREFIX "BIOS IRQ0 pin2 override ignored.\n");
+			printk(PREFIX "BIOS IRQ0 override ignored.\n");
 			return 0;
 		}
-		if (acpi_fix_pin2_polarity && (intsrc->inti_flags & ACPI_MADT_POLARITY_MASK)) {
+
+		if ((intsrc->global_irq == 2) && acpi_fix_pin2_polarity
+			&& (intsrc->inti_flags & ACPI_MADT_POLARITY_MASK)) {
 			intsrc->inti_flags &= ~ACPI_MADT_POLARITY_MASK;
 			printk(PREFIX "BIOS IRQ0 pin2 override: forcing polarity to high active.\n");
 		}
@@ -1466,6 +1468,15 @@ static struct dmi_system_id __initdata acpi_dmi_table_late[] = {
 		     DMI_MATCH(DMI_PRODUCT_NAME, "HP Compaq 6715b"),
 		     },
 	 },
+	{
+	 .callback = dmi_ignore_irq0_timer_override,
+	 .ident = "FUJITSU SIEMENS",
+	 .matches = {
+		     DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU SIEMENS"),
+		     DMI_MATCH(DMI_PRODUCT_NAME, "AMILO PRO V2030"),
+		     },
+	 },
+
 	{}
 };
 
author
#2 lore raw

Hi Len,

Quoted 11 lines · On Fri, 1 Jun 2012 12:53:00 -0400 Len Brown <[email protected]> wrote:

Hello Tang-Feng,

This looks good, but especially w/ interrupt patches, it is important to take logically independent baby steps. So please break this patch into two, and add another small bit in a 3 patch series:

1. allow the workaround to apply to non global_irq 2
2. delete the WARN from dmi_ignore_irq0_timer_override as it causes alarm, but gives no benefit
3. add the DMI to invoke the workaround for this platform

Thanks for the review, will make it 3 patches as you suggested.

- Feng

Quoted 65 lines

thanks,
-Len Brown, Intel Open Source Technology Center

Quoted 57 lines · Feng Tang

This is to fix the kernel bugzilla 40002: "IRQ 0 assigned to VGA"
https://bugzilla.kernel.org/show_bug.cgi?id=40002

The root cause is the buggy FW, whose ACPI tables assign the GSI 16 to 2 irqs 0 and 16(VGA), and the VGA is the right owner of GSI 16. So add a quirk to ignore the irq0 overriding GSI 16 for the FUJITSU SIEMENS AMILO PRO V2030 platform will solve this issue.

This also slightly modify the current irq0 override handling, as it only covered the irq0 overriding GSI 2 case.

---
 arch/x86/kernel/acpi/boot.c |   17 ++++++++++++++---
 1 files changed, 14 insertions(+), 3 deletions(-)
arch/x86/kernel/acpi/boot.c +2 -3
index 4558f0d..06c78c3 100644
@@ -416,12 +416,14 @@ acpi_parse_int_src_ovr(struct acpi_subtable_header *
 header, return 0;
 	}
 
-	if (intsrc->source_irq == 0 && intsrc->global_irq == 2) {
+	if (intsrc->source_irq == 0) {
 		if (acpi_skip_timer_override) {
-			printk(PREFIX "BIOS IRQ0 pin2 override
 ignored.\n");
+			printk(PREFIX "BIOS IRQ0 override ignored.\n");
 			return 0;
 		}
-		if (acpi_fix_pin2_polarity && (intsrc->inti_flags &

ACPI_MADT_POLARITY_MASK)) { +

arch/x86/kernel/acpi/boot.c +2 -0
+		if ((intsrc->global_irq == 2) && acpi_fix_pin2_polarity
+			&& (intsrc->inti_flags & ACPI_MADT_POLARITY_MASK))

{ intsrc->inti_flags &= ~ACPI_MADT_POLARITY_MASK;
printk(PREFIX "BIOS IRQ0 pin2 override: forcing
polarity to high active.\n"); }

arch/x86/kernel/acpi/boot.c +9 -0
@@ -1466,6 +1468,15 @@ static struct dmi_system_id __initdata
 acpi_dmi_table_late[] = { DMI_MATCH(DMI_PRODUCT_NAME, "HP Compaq 6715b"),
 		     },
 	 },
+	{
+	 .callback = dmi_ignore_irq0_timer_override,
+	 .ident = "FUJITSU SIEMENS",
+	 .matches = {
+		     DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU SIEMENS"),
+		     DMI_MATCH(DMI_PRODUCT_NAME, "AMILO PRO V2030"),
+		     },
+	 },
+
 	{}
 };
 
author
#3 lore raw

PATCH 1/3 ACPI: Make acpi_skip_timer_override cover all source_irq==0 cases

In reply to Len Brown
Quoted 1 line

From b10f528c1973e89bf6a4da8f91d62228c259acba Mon Sep 17 00:00:00 2001

From: Feng Tang <[email protected]>
Date: Mon, 4 Jun 2012 10:40:26 +0800
Subject: [PATCH 1/3] ACPI: Make acpi_skip_timer_override cover all
source_irq==0 cases

Currently when acpi_skip_timer_override is set, it only cover the (source_irq == 0 && global_irq == 2) cases. While there is also platform which need use this option and its global_irq is not 2. This patch will extend acpi_skip_timer_override to cover all timer overriding cases as long as the source irq is 0.

This is the first part of a fix to kernel bug bugzilla 40002:
"IRQ 0 assigned to VGA"
https://bugzilla.kernel.org/show_bug.cgi?id=40002

---
 arch/x86/kernel/acpi/boot.c |   14 ++++++++------
 1 files changed, 8 insertions(+), 6 deletions(-)
arch/x86/kernel/acpi/boot.c +8 -6
index 8afb693..e7c698e 100644
@@ -422,12 +422,14 @@ acpi_parse_int_src_ovr(struct acpi_subtable_header * header,
 		return 0;
 	}
 
-	if (intsrc->source_irq == 0 && intsrc->global_irq == 2) {
+	if (intsrc->source_irq == 0) {
 		if (acpi_skip_timer_override) {
-			printk(PREFIX "BIOS IRQ0 pin2 override ignored.\n");
+			printk(PREFIX "BIOS IRQ0 override ignored.\n");
 			return 0;
 		}
-		if (acpi_fix_pin2_polarity && (intsrc->inti_flags & ACPI_MADT_POLARITY_MASK)) {
+
+		if ((intsrc->global_irq == 2) && acpi_fix_pin2_polarity
+			&& (intsrc->inti_flags & ACPI_MADT_POLARITY_MASK)) {
 			intsrc->inti_flags &= ~ACPI_MADT_POLARITY_MASK;
 			printk(PREFIX "BIOS IRQ0 pin2 override: forcing polarity to high active.\n");
 		}
@@ -1334,7 +1336,7 @@ static int __init dmi_disable_acpi(const struct dmi_system_id *d)
 }
 
 /*
- * Force ignoring BIOS IRQ0 pin2 override
+ * Force ignoring BIOS IRQ0 override
  */
 static int __init dmi_ignore_irq0_timer_override(const struct dmi_system_id *d)
 {
@@ -1344,7 +1346,7 @@ static int __init dmi_ignore_irq0_timer_override(const struct dmi_system_id *d)
 	 */
 	if (!acpi_skip_timer_override) {
 		WARN(1, KERN_ERR "ati_ixp4x0 quirk not complete.\n");
-		pr_notice("%s detected: Ignoring BIOS IRQ0 pin2 override\n",
+		pr_notice("%s detected: Ignoring BIOS IRQ0 override\n",
 			d->ident);
 		acpi_skip_timer_override = 1;
 	}
@@ -1438,7 +1440,7 @@ static struct dmi_system_id __initdata acpi_dmi_table_late[] = {
 	 * is enabled.  This input is incorrectly designated the
 	 * ISA IRQ 0 via an interrupt source override even though
 	 * it is wired to the output of the master 8259A and INTIN0
-	 * is not connected at all.  Force ignoring BIOS IRQ0 pin2
+	 * is not connected at all.  Force ignoring BIOS IRQ0
 	 * override in that cases.
 	 */
 	{
Signature · 1 line
1.7.9
author
#4 lore raw

PATCH 2/3 ACPI: Remove one board specific WARN when ignoring timer overriding

In reply to Len Brown
Quoted 1 line

From 54e631547eb5150417370fc04a89d7eac6d627e6 Mon Sep 17 00:00:00 2001

From: Feng Tang <[email protected]>
Date: Mon, 4 Jun 2012 11:02:24 +0800
Subject: [PATCH 2/3] ACPI: Remove one board specific WARN when ignoring timer
overriding

Current WARN msg is only for the ati_ixp4x0 board, while this function is used by mulitple platforms. So this one board specific warning is not appropriate any more.

---
 arch/x86/kernel/acpi/boot.c |    5 -----
 1 files changed, 0 insertions(+), 5 deletions(-)
arch/x86/kernel/acpi/boot.c +0 -5
index e7c698e..3a6afba 100644
@@ -1340,12 +1340,7 @@ static int __init dmi_disable_acpi(const struct dmi_system_id *d)
  */
 static int __init dmi_ignore_irq0_timer_override(const struct dmi_system_id *d)
 {
-	/*
-	 * The ati_ixp4x0_rev() early PCI quirk should have set
-	 * the acpi_skip_timer_override flag already:
-	 */
 	if (!acpi_skip_timer_override) {
-		WARN(1, KERN_ERR "ati_ixp4x0 quirk not complete.\n");
 		pr_notice("%s detected: Ignoring BIOS IRQ0 override\n",
 			d->ident);
 		acpi_skip_timer_override = 1;
Signature · 1 line
1.7.9
author
#5 lore raw

PATCH 3/3 ACPI: Add a quirk for "AMILO PRO V2030" to ignore the timer overriding

In reply to Len Brown
Quoted 1 line

From cfca8634132c1b2f89c39f681ae2aa1fe227c9f5 Mon Sep 17 00:00:00 2001

From: Feng Tang <[email protected]>
Date: Mon, 4 Jun 2012 11:06:35 +0800
Subject: [PATCH 3/3] ACPI: Add a quirk for "AMILO PRO V2030" to ignore the
timer overriding

This is the 2nd part of fix for kernel bugzilla 40002:
"IRQ 0 assigned to VGA"
https://bugzilla.kernel.org/show_bug.cgi?id=40002

The root cause is the buggy FW, whose ACPI tables assign the GSI 16 to 2 irqs 0 and 16(VGA), and the VGA is the right owner of GSI 16. So add a quirk to ignore the irq0 overriding GSI 16 for the FUJITSU SIEMENS AMILO PRO V2030 platform will solve this issue.

---
 arch/x86/kernel/acpi/boot.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)
arch/x86/kernel/acpi/boot.c +8 -0
index 3a6afba..b2297e5 100644
@@ -1470,6 +1470,14 @@ static struct dmi_system_id __initdata acpi_dmi_table_late[] = {
 		     DMI_MATCH(DMI_PRODUCT_NAME, "HP Compaq 6715b"),
 		     },
 	 },
+	{
+	 .callback = dmi_ignore_irq0_timer_override,
+	 .ident = "FUJITSU SIEMENS",
+	 .matches = {
+		     DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU SIEMENS"),
+		     DMI_MATCH(DMI_PRODUCT_NAME, "AMILO PRO V2030"),
+		     },
+	 },
 	{}
 };
 
Signature · 1 line
1.7.9