mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
tmem: add tmem_disable() function
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>
This commit is contained in:
1 parent
80c4b4c178
commit
dba8bfb94d
2 files changed
+7
-2
No files matched your search
@@ -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
|
||||
|
||||
@@ -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
|
||||
*/
|
||||
|
||||