.. | .. |
---|
555 | 555 | return edac_dev->panic_on_ue; |
---|
556 | 556 | } |
---|
557 | 557 | |
---|
558 | | -void edac_device_handle_ce(struct edac_device_ctl_info *edac_dev, |
---|
559 | | - int inst_nr, int block_nr, const char *msg) |
---|
| 558 | +void edac_device_handle_ce_count(struct edac_device_ctl_info *edac_dev, |
---|
| 559 | + unsigned int count, int inst_nr, int block_nr, |
---|
| 560 | + const char *msg) |
---|
560 | 561 | { |
---|
561 | 562 | struct edac_device_instance *instance; |
---|
562 | 563 | struct edac_device_block *block = NULL; |
---|
| 564 | + |
---|
| 565 | + if (!count) |
---|
| 566 | + return; |
---|
563 | 567 | |
---|
564 | 568 | if ((inst_nr >= edac_dev->nr_instances) || (inst_nr < 0)) { |
---|
565 | 569 | edac_device_printk(edac_dev, KERN_ERR, |
---|
.. | .. |
---|
582 | 586 | |
---|
583 | 587 | if (instance->nr_blocks > 0) { |
---|
584 | 588 | block = instance->blocks + block_nr; |
---|
585 | | - block->counters.ce_count++; |
---|
| 589 | + block->counters.ce_count += count; |
---|
586 | 590 | } |
---|
587 | 591 | |
---|
588 | 592 | /* Propagate the count up the 'totals' tree */ |
---|
589 | | - instance->counters.ce_count++; |
---|
590 | | - edac_dev->counters.ce_count++; |
---|
| 593 | + instance->counters.ce_count += count; |
---|
| 594 | + edac_dev->counters.ce_count += count; |
---|
591 | 595 | |
---|
592 | 596 | if (edac_device_get_log_ce(edac_dev)) |
---|
593 | 597 | edac_device_printk(edac_dev, KERN_WARNING, |
---|
594 | | - "CE: %s instance: %s block: %s '%s'\n", |
---|
595 | | - edac_dev->ctl_name, instance->name, |
---|
596 | | - block ? block->name : "N/A", msg); |
---|
| 598 | + "CE: %s instance: %s block: %s count: %d '%s'\n", |
---|
| 599 | + edac_dev->ctl_name, instance->name, |
---|
| 600 | + block ? block->name : "N/A", count, msg); |
---|
597 | 601 | } |
---|
598 | | -EXPORT_SYMBOL_GPL(edac_device_handle_ce); |
---|
| 602 | +EXPORT_SYMBOL_GPL(edac_device_handle_ce_count); |
---|
599 | 603 | |
---|
600 | | -void edac_device_handle_ue(struct edac_device_ctl_info *edac_dev, |
---|
601 | | - int inst_nr, int block_nr, const char *msg) |
---|
| 604 | +void edac_device_handle_ue_count(struct edac_device_ctl_info *edac_dev, |
---|
| 605 | + unsigned int count, int inst_nr, int block_nr, |
---|
| 606 | + const char *msg) |
---|
602 | 607 | { |
---|
603 | 608 | struct edac_device_instance *instance; |
---|
604 | 609 | struct edac_device_block *block = NULL; |
---|
| 610 | + |
---|
| 611 | + if (!count) |
---|
| 612 | + return; |
---|
605 | 613 | |
---|
606 | 614 | if ((inst_nr >= edac_dev->nr_instances) || (inst_nr < 0)) { |
---|
607 | 615 | edac_device_printk(edac_dev, KERN_ERR, |
---|
.. | .. |
---|
624 | 632 | |
---|
625 | 633 | if (instance->nr_blocks > 0) { |
---|
626 | 634 | block = instance->blocks + block_nr; |
---|
627 | | - block->counters.ue_count++; |
---|
| 635 | + block->counters.ue_count += count; |
---|
628 | 636 | } |
---|
629 | 637 | |
---|
630 | 638 | /* Propagate the count up the 'totals' tree */ |
---|
631 | | - instance->counters.ue_count++; |
---|
632 | | - edac_dev->counters.ue_count++; |
---|
| 639 | + instance->counters.ue_count += count; |
---|
| 640 | + edac_dev->counters.ue_count += count; |
---|
633 | 641 | |
---|
634 | 642 | if (edac_device_get_log_ue(edac_dev)) |
---|
635 | 643 | edac_device_printk(edac_dev, KERN_EMERG, |
---|
636 | | - "UE: %s instance: %s block: %s '%s'\n", |
---|
637 | | - edac_dev->ctl_name, instance->name, |
---|
638 | | - block ? block->name : "N/A", msg); |
---|
| 644 | + "UE: %s instance: %s block: %s count: %d '%s'\n", |
---|
| 645 | + edac_dev->ctl_name, instance->name, |
---|
| 646 | + block ? block->name : "N/A", count, msg); |
---|
639 | 647 | |
---|
640 | 648 | if (edac_device_get_panic_on_ue(edac_dev)) |
---|
641 | | - panic("EDAC %s: UE instance: %s block %s '%s'\n", |
---|
642 | | - edac_dev->ctl_name, instance->name, |
---|
643 | | - block ? block->name : "N/A", msg); |
---|
| 649 | + panic("EDAC %s: UE instance: %s block %s count: %d '%s'\n", |
---|
| 650 | + edac_dev->ctl_name, instance->name, |
---|
| 651 | + block ? block->name : "N/A", count, msg); |
---|
644 | 652 | } |
---|
645 | | -EXPORT_SYMBOL_GPL(edac_device_handle_ue); |
---|
| 653 | +EXPORT_SYMBOL_GPL(edac_device_handle_ue_count); |
---|