lkml.org 
[lkml]   [2014]   [Jul]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH 3/6] x86-mce: Clear CMCI enable on all claimed CMCI banks before reboot.
Date
+	if (!xchg(&reboot_notifier_registered, true))
+ register_reboot_notifier(&cmci_reboot_notifier);

This is super-safe ... but isn't the xchg() overkill? I thought we serialized bringup
of other cpus.

Has this "do it once" caught on elsewhere in the kernel ... I suppose it is more concise than

if (!reboot_notifier_registered) {
reboot_notifier_registered = 1;
register_reboot_notifier(&cmci_reboot_notifier);
}

-Tony


\
 
 \ /
  Last update: 2014-07-09 23:21    [W:0.253 / U:22.908 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site