+ powerpc-pseries-avoid-crash-in-pci-code-if-mem-system-not-up.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled

     powerpc/pseries: avoid crash in PCI code if mem system not up

has been added to the -mm tree.  Its filename is

     powerpc-pseries-avoid-crash-in-pci-code-if-mem-system-not-up.patch

See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this


From: Linas Vepstas <linas@xxxxxxxxxxxxxx>

The powerpc code is currently performing PCI setup before memory
initialization.  PCI setup touches PCI config space registers.  If the PCI
card is bad, this will evoke an error, which currrently can't be handled,
as the PCI error recovery code expects kmalloc() to be functional.  This
patch will cause the system to punt instead of crashing with

cpu 0x0: Vector: 300 (Data Access) at [c0000000004434d0]
    pc: c0000000000c06b4: .kmem_cache_alloc+0x8c/0xf4
    lr: c00000000004ad6c: .eeh_send_failure_event+0x48/0xfc

This patch will also print name of the offending pci device.

Signed-off-by: Linas Vepstas <linas@xxxxxxxxxxxxxx>
Cc: Paul Mackerras <paulus@xxxxxxxxx>
Cc: Benjamin Herrenschmidt <benh@xxxxxxxxxxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

 arch/powerpc/platforms/pseries/eeh_event.c |    9 +++++++++
 1 files changed, 9 insertions(+)

diff -puN arch/powerpc/platforms/pseries/eeh_event.c~powerpc-pseries-avoid-crash-in-pci-code-if-mem-system-not-up arch/powerpc/platforms/pseries/eeh_event.c
--- 25/arch/powerpc/platforms/pseries/eeh_event.c~powerpc-pseries-avoid-crash-in-pci-code-if-mem-system-not-up	Fri Apr 21 13:57:55 2006
+++ 25-akpm/arch/powerpc/platforms/pseries/eeh_event.c	Fri Apr 21 13:57:55 2006
@@ -124,7 +124,16 @@ int eeh_send_failure_event (struct devic
 {
 	unsigned long flags;
 	struct eeh_event *event;
+	char *location;
 
+	if (!mem_init_done)
+	{
+		printk(KERN_ERR "EEH: event during early boot not handled\n");
+		location = (char *) get_property(dn, "ibm,loc-code", NULL);
+		printk(KERN_ERR "EEH: device node = %s\n", dn->full_name);
+		printk(KERN_ERR "EEH: PCI location = %s\n", location);
+		return 1;
+	}
 	event = kmalloc(sizeof(*event), GFP_ATOMIC);
 	if (event == NULL) {
 		printk (KERN_ERR "EEH: out of memory, event not handled\n");
_

Patches currently in -mm which might be from linas@xxxxxxxxxxxxxx are

pci-error-recovery-e100-network-device-driver.patch
e1000-prevent-statistics-from-getting-garbled-during-reset.patch
powerpc-pseries-clear-pci-failure-counter-if-no-new-failures.patch
powerpc-pseries-avoid-crash-in-pci-code-if-mem-system-not-up.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux