• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/components/opensource/linux/linux-2.6.36/drivers/edac/

Lines Matching defs:edac_dev

42 static void edac_device_dump_device(struct edac_device_ctl_info *edac_dev)
44 debugf3("\tedac_dev = %p dev_idx=%d \n", edac_dev, edac_dev->dev_idx);
45 debugf4("\tedac_dev->edac_check = %p\n", edac_dev->edac_check);
46 debugf3("\tdev = %p\n", edac_dev->dev);
48 edac_dev->mod_name, edac_dev->ctl_name);
49 debugf3("\tpvt_info = %p\n\n", edac_dev->pvt_info);
165 debugf4("%s() edac_dev=%p next after end=%p\n",
279 struct edac_device_ctl_info *edac_dev;
285 edac_dev = list_entry(item, struct edac_device_ctl_info, link);
287 if (edac_dev->dev == dev)
288 return edac_dev;
297 * assign a unique value to edac_dev->dev_idx.
305 static int add_edac_dev_to_global_list(struct edac_device_ctl_info *edac_dev)
313 rover = find_edac_device_by_dev(edac_dev->dev);
321 if (rover->dev_idx >= edac_dev->dev_idx) {
322 if (unlikely(rover->dev_idx == edac_dev->dev_idx))
330 list_add_tail_rcu(&edac_dev->link, insert_before);
355 struct edac_device_ctl_info *edac_dev;
357 edac_dev = container_of(head, struct edac_device_ctl_info, rcu);
358 INIT_LIST_HEAD(&edac_dev->link);
390 struct edac_device_ctl_info *edac_dev = to_edac_device_ctl_work(d_work);
395 if (edac_dev->op_state == OP_OFFLINE) {
401 if ((edac_dev->op_state == OP_RUNNING_POLL) &&
402 (edac_dev->edac_check != NULL)) {
403 edac_dev->edac_check(edac_dev);
413 if (edac_dev->poll_msec == 1000)
414 queue_delayed_work(edac_workqueue, &edac_dev->work,
415 round_jiffies_relative(edac_dev->delay));
417 queue_delayed_work(edac_workqueue, &edac_dev->work,
418 edac_dev->delay);
426 void edac_device_workq_setup(struct edac_device_ctl_info *edac_dev,
435 edac_dev->poll_msec = msec;
436 edac_dev->delay = msecs_to_jiffies(msec);
438 INIT_DELAYED_WORK(&edac_dev->work, edac_device_workq_function);
445 if (edac_dev->poll_msec == 1000)
446 queue_delayed_work(edac_workqueue, &edac_dev->work,
447 round_jiffies_relative(edac_dev->delay));
449 queue_delayed_work(edac_workqueue, &edac_dev->work,
450 edac_dev->delay);
455 * stop the workq processing on this edac_dev
457 void edac_device_workq_teardown(struct edac_device_ctl_info *edac_dev)
461 status = cancel_delayed_work(&edac_dev->work);
475 void edac_device_reset_delay_period(struct edac_device_ctl_info *edac_dev,
479 edac_device_workq_teardown(edac_dev);
485 edac_device_workq_setup(edac_dev, value);
505 * edac_device_add_device: Insert the 'edac_dev' structure into the
515 int edac_device_add_device(struct edac_device_ctl_info *edac_dev)
521 edac_device_dump_device(edac_dev);
525 if (add_edac_dev_to_global_list(edac_dev))
529 edac_dev->start_time = jiffies;
532 if (edac_device_create_sysfs(edac_dev)) {
533 edac_device_printk(edac_dev, KERN_WARNING,
539 if (edac_dev->edac_check != NULL) {
541 edac_dev->op_state = OP_RUNNING_POLL;
547 edac_device_workq_setup(edac_dev, 1000);
549 edac_dev->op_state = OP_RUNNING_INTERRUPT;
553 edac_device_printk(edac_dev, KERN_INFO,
556 edac_dev->mod_name,
557 edac_dev->ctl_name,
558 edac_dev_name(edac_dev),
559 edac_op_state_to_string(edac_dev->op_state));
566 del_edac_device_from_global_list(edac_dev);
589 struct edac_device_ctl_info *edac_dev;
596 edac_dev = find_edac_device_by_dev(dev);
597 if (edac_dev == NULL) {
603 edac_dev->op_state = OP_OFFLINE;
606 del_edac_device_from_global_list(edac_dev);
611 edac_device_workq_teardown(edac_dev);
614 edac_device_remove_sysfs(edac_dev);
618 edac_dev->dev_idx,
619 edac_dev->mod_name, edac_dev->ctl_name, edac_dev_name(edac_dev));
621 return edac_dev;
625 static inline int edac_device_get_log_ce(struct edac_device_ctl_info *edac_dev)
627 return edac_dev->log_ce;
630 static inline int edac_device_get_log_ue(struct edac_device_ctl_info *edac_dev)
632 return edac_dev->log_ue;
636 *edac_dev)
638 return edac_dev->panic_on_ue;
643 * perform a common output and handling of an 'edac_dev' CE event
645 void edac_device_handle_ce(struct edac_device_ctl_info *edac_dev,
651 if ((inst_nr >= edac_dev->nr_instances) || (inst_nr < 0)) {
652 edac_device_printk(edac_dev, KERN_ERR,
655 edac_dev->nr_instances);
659 instance = edac_dev->instances + inst_nr;
662 edac_device_printk(edac_dev, KERN_ERR,
677 edac_dev->counters.ce_count++;
679 if (edac_device_get_log_ce(edac_dev))
680 edac_device_printk(edac_dev, KERN_WARNING,
682 edac_dev->ctl_name, instance->name,
689 * perform a common output and handling of an 'edac_dev' UE event
691 void edac_device_handle_ue(struct edac_device_ctl_info *edac_dev,
697 if ((inst_nr >= edac_dev->nr_instances) || (inst_nr < 0)) {
698 edac_device_printk(edac_dev, KERN_ERR,
701 edac_dev->nr_instances);
705 instance = edac_dev->instances + inst_nr;
708 edac_device_printk(edac_dev, KERN_ERR,
723 edac_dev->counters.ue_count++;
725 if (edac_device_get_log_ue(edac_dev))
726 edac_device_printk(edac_dev, KERN_EMERG,
728 edac_dev->ctl_name, instance->name,
731 if (edac_device_get_panic_on_ue(edac_dev))
733 edac_dev->ctl_name, instance->name,