]> xenbits.xensource.com Git - xen.git/commitdiff
tmem: add tmem_disable() function
authorDoug Goldstein <cardoe@cardoe.com>
Wed, 16 Mar 2016 14:10:59 +0000 (09:10 -0500)
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Wed, 16 Mar 2016 14:54:05 +0000 (10:54 -0400)
Instead of manipulating the opt_tmem variable directly utilize a wrapper
function.

Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
xen/arch/x86/setup.c
xen/include/xen/tmem_xen.h

index a8bf2c9bb029b66c4229516deab37c8d81adcab6..50119303ac23c435ae6f91504587594e2c1b0036 100644 (file)
@@ -25,7 +25,7 @@
 #include <xen/dmi.h>
 #include <xen/pfn.h>
 #include <xen/nodemask.h>
-#include <xen/tmem_xen.h> /* for opt_tmem only */
+#include <xen/tmem_xen.h>
 #include <xen/watchdog.h>
 #include <public/version.h>
 #include <compat/platform.h>
@@ -1276,7 +1276,7 @@ void __init noreturn __start_xen(unsigned long mbi_p)
         {
            printk(XENLOG_WARNING
                   "TMEM physical RAM limit exceeded, disabling TMEM\n");
-           opt_tmem = 0;
+           tmem_disable();
         }
     }
     else
index c770f3e4d5f5a337f989a5186e7d79bda6532d8b..f516bbefc81d18a3595f6d146e4240139e70a427 100644 (file)
@@ -69,6 +69,11 @@ static inline bool_t tmem_enabled(void)
     return opt_tmem;
 }
 
+static inline void tmem_disable(void)
+{
+    opt_tmem = 0;
+}
+
 /*
  * Memory free page list management
  */