On Wed, Mar 02, 2005 at 11:28:01AM +0900, Hidetoshi Seto was heard to remark:[SNIPPED...]
Note that here is a difficulty: the MCA handler on some arch would run on
special context - MCA environment. In other words, since some MCA handler
^^^^^^^^^^^^^^^^^^
/**
* queue up a pci error event to be dispatched to all listeners
* of the pci error notifier call chain. This routine is safe to call
* within an interrupt context. The actual event delivery
* will be from a workque thread.
*/
void eeh_queue_failure(struct pci_dev *dev)
{
struct eeh_event *event;
event = kmalloc(sizeof(*event), GFP_ATOMIC);
if (event == NULL) {
printk (KERN_ERR "EEH: out of memory, event not handled\n");
return 1;
}
event->dev = dev;
event->reset_state = rets[0];
event->time_unavail = rets[2];
/* We may be called in an interrupt context */
spin_lock_irqsave(&eeh_eventlist_lock, flags);
list_add(&event->list, &eeh_eventlist);^^^^^^^^^^^^^^^^^^^^^
spin_unlock_irqrestore(&eeh_eventlist_lock, flags);