Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 330285
b: refs/heads/master
c: c533b46
h: refs/heads/master
i:
  330283: bc0e9b3
v: v3
  • Loading branch information
Gavin Shan authored and Benjamin Herrenschmidt committed Sep 9, 2012
1 parent 8997571 commit 4868846
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 24 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 82e8882f7f430806bd6bfd203aa4c3f41e3812e9
refs/heads/master: c533b46cc7da58e5ccbd20ac2f607ff60d24eb4e
4 changes: 2 additions & 2 deletions trunk/arch/powerpc/include/asm/eeh_event.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@
*/
struct eeh_event {
struct list_head list; /* to form event queue */
struct eeh_dev *edev; /* EEH device */
struct eeh_pe *pe; /* EEH PE */
};

int eeh_send_failure_event(struct eeh_dev *edev);
int eeh_send_failure_event(struct eeh_pe *pe);
struct eeh_dev *handle_eeh_events(struct eeh_event *);

#endif /* __KERNEL__ */
Expand Down
29 changes: 8 additions & 21 deletions trunk/arch/powerpc/platforms/pseries/eeh_event.c
Original file line number Diff line number Diff line change
Expand Up @@ -119,36 +119,23 @@ static void eeh_thread_launcher(struct work_struct *dummy)

/**
* eeh_send_failure_event - Generate a PCI error event
* @edev: EEH device
* @pe: EEH PE
*
* This routine can be called within an interrupt context;
* the actual event will be delivered in a normal context
* (from a workqueue).
*/
int eeh_send_failure_event(struct eeh_dev *edev)
int eeh_send_failure_event(struct eeh_pe *pe)
{
unsigned long flags;
struct eeh_event *event;
struct device_node *dn = eeh_dev_to_of_node(edev);
const char *location;

if (!mem_init_done) {
printk(KERN_ERR "EEH: event during early boot not handled\n");
location = of_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 = kzalloc(sizeof(*event), GFP_ATOMIC);
if (event == NULL) {
printk(KERN_ERR "EEH: out of memory, event not handled\n");
return 1;
}

if (edev->pdev)
pci_dev_get(edev->pdev);

event->edev = edev;
event = kzalloc(sizeof(*event), GFP_ATOMIC);
if (!event) {
pr_err("EEH: out of memory, event not handled\n");
return -ENOMEM;
}
event->pe = pe;

/* We may or may not be called in an interrupt context */
spin_lock_irqsave(&eeh_eventlist_lock, flags);
Expand Down

0 comments on commit 4868846

Please sign in to comment.