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>
#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>
{
printk(XENLOG_WARNING
"TMEM physical RAM limit exceeded, disabling TMEM\n");
- opt_tmem = 0;
+ tmem_disable();
}
}
else
return opt_tmem;
}
+static inline void tmem_disable(void)
+{
+ opt_tmem = 0;
+}
+
/*
* Memory free page list management
*/