Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 160528 Details for
Bug 250611
No Boot /Hang response for PCI-E errors on a QS21
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
simple patch to panic when SERR or PERR occurs on PCI-X
cell-axon-pci-error.diff (text/plain), 5.01 KB, created by
Robbie Williamson
on 2007-08-02 15:06:10 UTC
(
hide
)
Description:
simple patch to panic when SERR or PERR occurs on PCI-X
Filename:
MIME Type:
Creator:
Robbie Williamson
Created:
2007-08-02 15:06:10 UTC
Size:
5.01 KB
patch
obsolete
>Index: linux-2.6.22/arch/powerpc/platforms/cell/axon_pci-error.c >=================================================================== >--- /dev/null >+++ linux-2.6.22/arch/powerpc/platforms/cell/axon_pci-error.c >@@ -0,0 +1,160 @@ >+/* >+ * PCI error reporting handler for Axon >+ * >+ * (C) Copyright IBM Corp. 2007 >+ * >+ * Authors : Jens Osterkamp <Jens.Osterkamp@de.ibm.com> >+ * >+ * This program is free software; you can redistribute it and/or modify >+ * it under the terms of the GNU General Public License version 2 as >+ * published by the Free Software Foundation. >+ * >+ * This program is distributed in the hope that it will be useful, >+ * but WITHOUT ANY WARRANTY; without even the implied warranty of >+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the >+ * GNU General Public License for more details. >+ * >+ * You should have received a copy of the GNU General Public License >+ * along with this program; if not, write to the Free Software >+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. >+ */ >+ >+#include <linux/interrupt.h> >+#include <linux/irq.h> >+#include <linux/kernel.h> >+#include <linux/pci.h> >+#include <linux/msi.h> >+#include <linux/reboot.h> >+ >+#include <asm/machdep.h> >+#include <asm/prom.h> >+ >+ >+/* >+ * Axon PCI bridge registers >+ */ >+#define AXON_PCI_BRIDGE_OFFSET 0x0ec80000 >+ >+/* PCI status */ >+#define AXON_PCI_STATUS 0x04 >+ >+/* PCI error status */ >+#define AXON_PCI_ERROR_STATUS 0x54 >+ >+struct axon_pci { >+ struct device_node *dn; >+ void __iomem *base; >+ int virq; >+}; >+ >+static u32 axon_pci_read(struct axon_pci *axon_pci, unsigned int reg) >+{ >+ return in_be32(axon_pci->base + AXON_PCI_BRIDGE_OFFSET + reg); >+} >+ >+static void axon_pci_dump_registers(struct axon_pci *axon_pci) >+{ >+ printk("\naxon_pci: AXON_PCI_STATUS = 0x%08x\n", >+ axon_pci_read(axon_pci, AXON_PCI_STATUS)); >+ >+ printk("axon_pci: AXON_PCI_ERROR_STATUS = 0x%08x\n", >+ axon_pci_read(axon_pci, AXON_PCI_ERROR_STATUS)); >+} >+ >+static irqreturn_t axon_pci_interrupt(int irq, void *ptr) >+{ >+ struct axon_pci *axon_pci = (struct axon_pci *) ptr; >+ >+ axon_pci_dump_registers(axon_pci); >+ >+ panic("\naxon_pci: an unrecoverable error on PCI node %s occured !\n", >+ axon_pci->dn->full_name); >+ >+ /* should never happen */ >+ return IRQ_HANDLED; >+} >+ >+static int axon_pci_setup_one(struct device_node *dn) >+{ >+ int ret, virq; >+ unsigned int flags; >+ struct axon_pci *axon_pci; >+ const u32 *addr; >+ u64 ioaddr, size; >+ >+ pr_debug("axon_pci: setting up dn %s\n", dn->full_name); >+ >+ axon_pci = kzalloc(sizeof(struct axon_pci), GFP_KERNEL); >+ if (!axon_pci) { >+ printk(KERN_ERR "axon_pci: could not allocate axon_pci for %s\n", >+ dn->full_name); >+ goto out; >+ } >+ >+ axon_pci->dn = dn; >+ >+ addr = of_get_address(dn, 0, &size, &flags); >+ >+ if (addr == 0) { >+ printk(KERN_ERR "axon_pci: addr of resource is 0\n"); >+ goto out_free; >+ } >+ >+ if (size == 0) { >+ printk(KERN_ERR "axon_pci: length of resource is 0\n"); >+ goto out_free; >+ } >+ >+ ioaddr = of_translate_address(dn, addr); >+ >+ axon_pci->base = ioremap(ioaddr, size); >+ >+ if (axon_pci->base == NULL) { >+ printk(KERN_ERR "axon_pci: unable to ioremap io address\n"); >+ goto out_free; >+ } >+ >+ virq = irq_of_parse_and_map(dn, 0); >+ if (virq == NO_IRQ) { >+ printk(KERN_ERR "axon_pci: irq parse and map failed for %s\n", >+ dn->full_name); >+ goto out_free; >+ } >+ >+ ret = request_irq(virq, axon_pci_interrupt, >+ IRQF_DISABLED, "axon_pci", axon_pci); >+ if (ret) { >+ printk(KERN_ERR "axon_pci: request for irq %d on dn %s failed \n", >+ virq, dn->full_name); >+ goto out_free; >+ } >+ >+ pr_info("axon_pci: registered error handler on irq %d for %s\n", >+ virq, axon_pci->dn->full_name); >+ >+ return 0; >+ >+out_free: >+ kfree(axon_pci); >+out: >+ return -ENODEV; >+} >+ >+static int axon_pci_init(void) >+{ >+ struct device_node *dn; >+ int n=0; >+ >+ for_each_compatible_node(dn, NULL, "ibm,axon-pcix") { >+ if (axon_pci_setup_one(dn) == 0) >+ n++; >+ } >+ >+ if (n == 0) { >+ pr_info("No pcix nodes found\n"); >+ } >+ >+ return 0; >+} >+ >+subsys_initcall(axon_pci_init); >Index: linux-2.6.22/arch/powerpc/platforms/cell/Kconfig >=================================================================== >--- linux-2.6.22.orig/arch/powerpc/platforms/cell/Kconfig >+++ linux-2.6.22/arch/powerpc/platforms/cell/Kconfig >@@ -90,4 +90,11 @@ config CBE_AXON_UTL > The Axon chip delivers error conditions detected in the > PCIe root complex as interrupts. > >+config CBE_AXON_PCI >+ bool "CBE/Axon PCI error handling" >+ default n >+ help >+ The Axon chip delivers error conditions detected in the >+ PCI bridge as error interrupts. >+ > endmenu >Index: linux-2.6.22/arch/powerpc/platforms/cell/Makefile >=================================================================== >--- linux-2.6.22.orig/arch/powerpc/platforms/cell/Makefile >+++ linux-2.6.22/arch/powerpc/platforms/cell/Makefile >@@ -9,6 +9,7 @@ obj-$(CONFIG_CBE_CPUFREQ) += cbe-cpufre > cbe-cpufreq-y += cbe_cpufreq_pervasive.o cbe_cpufreq.o > > obj-$(CONFIG_CBE_AXON_UTL) += axon_utl.o >+obj-$(CONFIG_CBE_AXON_PCI) += axon_pci-error.o > > ifeq ($(CONFIG_SMP),y) > obj-$(CONFIG_PPC_CELL_NATIVE) += smp.o
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 250611
: 160528 |
160529