Skip to contentSkip to conversation

Update MCP55 quirk to not affect non HyperTransport variants

PATCH Applied Neil Horman 5 participants 6 messages Dec 8, 2010 – Dec 10, 2010

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Update MCP55 quirk to not affect non HyperTransport variants

I wrote this quirk awhile ago to properly setup MCP55 chips on hypertransport busses so that interrupts reached whatever cpu happend to boot the kdump kernel. while that works well, it was recently shown to me that a a non-hypertransport variant of the MCP55 exists, and on those system the register that this quirk manipulates causes hangs if you write to it. Since the quirk was only meant to handle errors found on MCP55 chips that have a HT interface, this patch adds a filter to make sure the chip is an HT capable before making the needed register adjustment. This lets the broken MCP55s work with kdump while not breaking the non-HT variants.

Resolves https://bugzilla.kernel.org/show_bug.cgi?id=23952

Tested successfully by the reporter and myself.

---
 drivers/pci/quirks.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
drivers/pci/quirks.c +3 -0
index 6f9350c..313c0bd 100644
@@ -2329,6 +2329,9 @@ static void __devinit nvbridge_check_legacy_irq_routing(struct pci_dev *dev)
 {
 	u32 cfg;
 
+	if (!pci_find_capability(dev, PCI_CAP_ID_HT))
+		return;
+
 	pci_read_config_dword(dev, 0x74, &cfg);
 
 	if (cfg & ((1 << 2) | (1 << 15))) {
Signature · 1 line
1.7.2.3
Acked-by on v1 1/1
#1 lore raw
Quoted 10 lines · Neil Horman

I wrote this quirk awhile ago to properly setup MCP55 chips on hypertransport busses so that interrupts reached whatever cpu happend to boot the kdump kernel. while that works well, it was recently shown to me that a a non-hypertransport variant of the MCP55 exists, and on those system the register that this quirk manipulates causes hangs if you write to it. Since the quirk was only meant to handle errors found on MCP55 chips that have a HT interface, this patch adds a filter to make sure the chip is an HT capable before making the needed register adjustment. This lets the broken MCP55s work with kdump while not breaking the non-HT variants.

So Neil, with non hypertransport MCP55s, interrupts are delivered to all the cpus and seond kernel still boots?

Thanks
Vivek

Quoted 30 lines

Resolves https://bugzilla.kernel.org/show_bug.cgi?id=23952

Tested successfully by the reporter and myself.

---
 drivers/pci/quirks.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
drivers/pci/quirks.c +3 -0
index 6f9350c..313c0bd 100644
@@ -2329,6 +2329,9 @@ static void __devinit nvbridge_check_legacy_irq_routing(struct pci_dev *dev)
 {
 	u32 cfg;
 
+	if (!pci_find_capability(dev, PCI_CAP_ID_HT))
+		return;
+
 	pci_read_config_dword(dev, 0x74, &cfg);
 
 	if (cfg & ((1 << 2) | (1 << 15))) {
Signature · 1 line
1.7.2.3

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec

#2 lore raw
Quoted 12 lines · Vivek Goyal
Quoted 10 lines · Neil Horman

I wrote this quirk awhile ago to properly setup MCP55 chips on hypertransport busses so that interrupts reached whatever cpu happend to boot the kdump kernel. while that works well, it was recently shown to me that a a non-hypertransport variant of the MCP55 exists, and on those system the register that this quirk manipulates causes hangs if you write to it. Since the quirk was only meant to handle errors found on MCP55 chips that have a HT interface, this patch adds a filter to make sure the chip is an HT capable before making the needed register adjustment. This lets the broken MCP55s work with kdump while not breaking the non-HT variants.

Quoted 3 lines

So Neil, with non hypertransport MCP55s, interrupts are delivered to all the cpus and seond kernel still boots?

I cannot guarantee that. All that I can guarantee is that, on MCP55 chips without hypertransport capability, the register which is used to configure interrupt delivery is either non-existant, or different in such a way that writing to it results in a hang on the boot of the initial kernel. So this quirk has no effect on kdumps behavior regardless of the interrupt delivery behavior on such variants of the chip. I would presume however, given that this register is so different that interrupts would be delivered to all cpus, as one would expect. Mathieu, since you have the affected hardware, could you attempt to preform a kexec operation and tell us for certain? Thanks!
Neil

Quoted 32 lines

Thanks
Vivek

Quoted 27 lines

Resolves https://bugzilla.kernel.org/show_bug.cgi?id=23952

Tested successfully by the reporter and myself.

---
 drivers/pci/quirks.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
drivers/pci/quirks.c +3 -0
index 6f9350c..313c0bd 100644
@@ -2329,6 +2329,9 @@ static void __devinit nvbridge_check_legacy_irq_routing(struct pci_dev *dev)
 {
 	u32 cfg;
 
+	if (!pci_find_capability(dev, PCI_CAP_ID_HT))
+		return;
+
 	pci_read_config_dword(dev, 0x74, &cfg);
 
Quoted 8 lines
Quoted 3 lines
drivers/pci/quirks.c +0 -0
 	if (cfg & ((1 << 2) | (1 << 15))) {
Signature · 1 line
1.7.2.3

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec

#3 lore raw
In reply to Neil Horman
Quoted 12 lines · On Wed, 8 Dec 2010 09:47:48 -0500 Neil Horman <[email protected]> wrote:

I wrote this quirk awhile ago to properly setup MCP55 chips on hypertransport busses so that interrupts reached whatever cpu happend to boot the kdump kernel. while that works well, it was recently shown to me that a a non-hypertransport variant of the MCP55 exists, and on those system the register that this quirk manipulates causes hangs if you write to it. Since the quirk was only meant to handle errors found on MCP55 chips that have a HT interface, this patch adds a filter to make sure the chip is an HT capable before making the needed register adjustment. This lets the broken MCP55s work with kdump while not breaking the non-HT variants.

Resolves https://bugzilla.kernel.org/show_bug.cgi?id=23952

Quoted 8 lines

Tested successfully by the reporter and myself.

That needed a Cc:<[email protected]> as well. Please don't forget to remember -stable.

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec

#4 lore raw
Quoted 24 lines · Andrew Morton
Quoted 12 lines · On Wed, 8 Dec 2010 09:47:48 -0500 Neil Horman <[email protected]> wrote:

I wrote this quirk awhile ago to properly setup MCP55 chips on hypertransport busses so that interrupts reached whatever cpu happend to boot the kdump kernel. while that works well, it was recently shown to me that a a non-hypertransport variant of the MCP55 exists, and on those system the register that this quirk manipulates causes hangs if you write to it. Since the quirk was only meant to handle errors found on MCP55 chips that have a HT interface, this patch adds a filter to make sure the chip is an HT capable before making the needed register adjustment. This lets the broken MCP55s work with kdump while not breaking the non-HT variants.

Resolves https://bugzilla.kernel.org/show_bug.cgi?id=23952

Quoted 8 lines

Tested successfully by the reporter and myself.

Quoted 2 lines

That needed a Cc:<[email protected]> as well. Please don't forget to remember -stable.

Thanks, Cc'ing stable on the thread

Quoted 6 lines

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

Applied
#5 lore raw
In reply to Neil Horman
Quoted 10 lines · On Wed, 8 Dec 2010 09:47:48 -0500 Neil Horman <[email protected]> wrote:

I wrote this quirk awhile ago to properly setup MCP55 chips on hypertransport busses so that interrupts reached whatever cpu happend to boot the kdump kernel. while that works well, it was recently shown to me that a a non-hypertransport variant of the MCP55 exists, and on those system the register that this quirk manipulates causes hangs if you write to it. Since the quirk was only meant to handle errors found on MCP55 chips that have a HT interface, this patch adds a filter to make sure the chip is an HT capable before making the needed register adjustment. This lets the broken MCP55s work with kdump while not breaking the non-HT variants.

Quoted 3 lines

Resolves https://bugzilla.kernel.org/show_bug.cgi?id=23952

Tested successfully by the reporter and myself.

Applied to my for-linus branch, thanks.

Signature · 1 line
Jesse Barnes, Intel Open Source Technology Center