diff options
author | Glenn Elliott <gelliott@cs.unc.edu> | 2012-03-04 19:47:13 -0500 |
---|---|---|
committer | Glenn Elliott <gelliott@cs.unc.edu> | 2012-03-04 19:47:13 -0500 |
commit | c71c03bda1e86c9d5198c5d83f712e695c4f2a1e (patch) | |
tree | ecb166cb3e2b7e2adb3b5e292245fefd23381ac8 /drivers/edac/edac_device.c | |
parent | ea53c912f8a86a8567697115b6a0d8152beee5c8 (diff) | |
parent | 6a00f206debf8a5c8899055726ad127dbeeed098 (diff) |
Merge branch 'mpi-master' into wip-k-fmlpwip-k-fmlp
Conflicts:
litmus/sched_cedf.c
Diffstat (limited to 'drivers/edac/edac_device.c')
-rw-r--r-- | drivers/edac/edac_device.c | 28 |
1 files changed, 8 insertions, 20 deletions
diff --git a/drivers/edac/edac_device.c b/drivers/edac/edac_device.c index d5e13c94714f..c3f67437afb6 100644 --- a/drivers/edac/edac_device.c +++ b/drivers/edac/edac_device.c | |||
@@ -346,30 +346,18 @@ fail1: | |||
346 | } | 346 | } |
347 | 347 | ||
348 | /* | 348 | /* |
349 | * complete_edac_device_list_del | ||
350 | * | ||
351 | * callback function when reference count is zero | ||
352 | */ | ||
353 | static void complete_edac_device_list_del(struct rcu_head *head) | ||
354 | { | ||
355 | struct edac_device_ctl_info *edac_dev; | ||
356 | |||
357 | edac_dev = container_of(head, struct edac_device_ctl_info, rcu); | ||
358 | INIT_LIST_HEAD(&edac_dev->link); | ||
359 | } | ||
360 | |||
361 | /* | ||
362 | * del_edac_device_from_global_list | 349 | * del_edac_device_from_global_list |
363 | * | ||
364 | * remove the RCU, setup for a callback call, | ||
365 | * then wait for the callback to occur | ||
366 | */ | 350 | */ |
367 | static void del_edac_device_from_global_list(struct edac_device_ctl_info | 351 | static void del_edac_device_from_global_list(struct edac_device_ctl_info |
368 | *edac_device) | 352 | *edac_device) |
369 | { | 353 | { |
370 | list_del_rcu(&edac_device->link); | 354 | list_del_rcu(&edac_device->link); |
371 | call_rcu(&edac_device->rcu, complete_edac_device_list_del); | 355 | |
372 | rcu_barrier(); | 356 | /* these are for safe removal of devices from global list while |
357 | * NMI handlers may be traversing list | ||
358 | */ | ||
359 | synchronize_rcu(); | ||
360 | INIT_LIST_HEAD(&edac_device->link); | ||
373 | } | 361 | } |
374 | 362 | ||
375 | /* | 363 | /* |
@@ -672,7 +660,7 @@ void edac_device_handle_ce(struct edac_device_ctl_info *edac_dev, | |||
672 | block->counters.ce_count++; | 660 | block->counters.ce_count++; |
673 | } | 661 | } |
674 | 662 | ||
675 | /* Propogate the count up the 'totals' tree */ | 663 | /* Propagate the count up the 'totals' tree */ |
676 | instance->counters.ce_count++; | 664 | instance->counters.ce_count++; |
677 | edac_dev->counters.ce_count++; | 665 | edac_dev->counters.ce_count++; |
678 | 666 | ||
@@ -718,7 +706,7 @@ void edac_device_handle_ue(struct edac_device_ctl_info *edac_dev, | |||
718 | block->counters.ue_count++; | 706 | block->counters.ue_count++; |
719 | } | 707 | } |
720 | 708 | ||
721 | /* Propogate the count up the 'totals' tree */ | 709 | /* Propagate the count up the 'totals' tree */ |
722 | instance->counters.ue_count++; | 710 | instance->counters.ue_count++; |
723 | edac_dev->counters.ue_count++; | 711 | edac_dev->counters.ue_count++; |
724 | 712 | ||