]> xenbits.xensource.com Git - xen.git/commitdiff
x86/mm: drop redundant smp_wmb() from _put_final_page_type()
authorJan Beulich <jbeulich@suse.com>
Fri, 27 Dec 2019 09:02:48 +0000 (10:02 +0100)
committerJan Beulich <jbeulich@suse.com>
Fri, 27 Dec 2019 09:02:48 +0000 (10:02 +0100)
get_page_light()'s use of cmpxchg() is a full barrier already anyway.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/arch/x86/mm.c

index b48777cc197708821a22681e7214cb70ed555c8e..cc0d71996c6189faddbb8a3bd8182a77cd1bc719 100644 (file)
@@ -2571,6 +2571,8 @@ int get_page(struct page_info *page, struct domain *domain)
  * - it will not be called more than once without dropping the thus
  *   acquired reference again.
  * Due to get_page() reserving one reference, this call cannot fail.
+ *
+ * Note that some callers rely on this being a full memory barrier.
  */
 static void get_page_light(struct page_info *page)
 {
@@ -2755,7 +2757,7 @@ static int _put_final_page_type(struct page_info *page, unsigned long type,
     else
     {
         BUG_ON(rc != -ERESTART);
-        smp_wmb();
+        /* get_page_light() includes a full barrier. */
         get_page_light(page);
         page->u.inuse.type_info |= PGT_partial;
     }