aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/edac/edac_pci.c
diff options
context:
space:
mode:
authorLai Jiangshan <laijs@cn.fujitsu.com>2011-05-26 19:25:58 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2011-05-26 20:12:37 -0400
commite2e77098764636456ba7092a8b3b3b34b2a8e8d8 (patch)
tree58e2b06e61326b05c8850bb196eaad071903df0b /drivers/edac/edac_pci.c
parent26498e89e83c62cffcb8836a2ac2c5b795d84258 (diff)
edac,rcu: use synchronize_rcu() instead of call_rcu()+rcu_barrier()
synchronize_rcu() does the stuff as needed. Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com> Cc: Doug Thompson <dougthompson@xmission.com> Cc: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> Cc: Mauro Carvalho Chehab <mchehab@infradead.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/edac/edac_pci.c')
-rw-r--r--drivers/edac/edac_pci.c21
1 files changed, 6 insertions, 15 deletions
diff --git a/drivers/edac/edac_pci.c b/drivers/edac/edac_pci.c
index efb5d565078..2b378207d57 100644
--- a/drivers/edac/edac_pci.c
+++ b/drivers/edac/edac_pci.c
@@ -164,19 +164,6 @@ fail1:
164} 164}
165 165
166/* 166/*
167 * complete_edac_pci_list_del
168 *
169 * RCU completion callback to indicate item is deleted
170 */
171static void complete_edac_pci_list_del(struct rcu_head *head)
172{
173 struct edac_pci_ctl_info *pci;
174
175 pci = container_of(head, struct edac_pci_ctl_info, rcu);
176 INIT_LIST_HEAD(&pci->link);
177}
178
179/*
180 * del_edac_pci_from_global_list 167 * del_edac_pci_from_global_list
181 * 168 *
182 * remove the PCI control struct from the global list 169 * remove the PCI control struct from the global list
@@ -184,8 +171,12 @@ static void complete_edac_pci_list_del(struct rcu_head *head)
184static void del_edac_pci_from_global_list(struct edac_pci_ctl_info *pci) 171static void del_edac_pci_from_global_list(struct edac_pci_ctl_info *pci)
185{ 172{
186 list_del_rcu(&pci->link); 173 list_del_rcu(&pci->link);
187 call_rcu(&pci->rcu, complete_edac_pci_list_del); 174
188 rcu_barrier(); 175 /* these are for safe removal of devices from global list while
176 * NMI handlers may be traversing list
177 */
178 synchronize_rcu();
179 INIT_LIST_HEAD(&pci->link);
189} 180}
190 181
191#if 0 182#if 0