]> git.karo-electronics.de Git - linux-beck.git/blobdiff - arch/powerpc/platforms/pseries/eeh_event.c
[PATCH] powerpc/pseries: avoid crash in PCI code if mem system not up
[linux-beck.git] / arch / powerpc / platforms / pseries / eeh_event.c
index a1bda6f96fd1ff2c4a50f7d2221779e3b6629124..40020c65c89e4da0e2365fac47316593ee712c12 100644 (file)
@@ -118,7 +118,15 @@ int eeh_send_failure_event (struct device_node *dn,
 {
        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");