From: Doug Goldstein Date: Wed, 16 Mar 2016 14:10:59 +0000 (-0500) Subject: tmem: add tmem_disable() function X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~1543 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=dba8bfb94dd3d51f7576dfbdd1d541aa75f90457;p=xen.git tmem: add tmem_disable() function Instead of manipulating the opt_tmem variable directly utilize a wrapper function. Signed-off-by: Doug Goldstein Acked-by: Jan Beulich Signed-off-by: Konrad Rzeszutek Wilk --- diff --git a/xen/arch/x86/setup.c b/xen/arch/x86/setup.c index a8bf2c9bb0..50119303ac 100644 --- a/xen/arch/x86/setup.c +++ b/xen/arch/x86/setup.c @@ -25,7 +25,7 @@ #include #include #include -#include /* for opt_tmem only */ +#include #include #include #include @@ -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 diff --git a/xen/include/xen/tmem_xen.h b/xen/include/xen/tmem_xen.h index c770f3e4d5..f516bbefc8 100644 --- a/xen/include/xen/tmem_xen.h +++ b/xen/include/xen/tmem_xen.h @@ -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 */