All of lore.kernel.org
 help / color / mirror / Atom feed
From: Doug Goldstein <cardoe@cardoe.com>
To: xen-devel@lists.xen.org
Cc: Keir Fraser <keir@xen.org>, Doug Goldstein <cardoe@cardoe.com>,
	Jan Beulich <jbeulich@suse.com>,
	Andrew Cooper <andrew.cooper3@citrix.com>
Subject: [PATCH 1/5] tmem: add tmem_disable() function
Date: Mon, 14 Mar 2016 15:29:21 -0500	[thread overview]
Message-ID: <1457987365-866-2-git-send-email-cardoe@cardoe.com> (raw)
In-Reply-To: <1457987365-866-1-git-send-email-cardoe@cardoe.com>

Instead of manipulating the opt_tmem variable directly utilize a wrapper
function.

Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
---
CC: Keir Fraser <keir@xen.org>
CC: Jan Beulich <jbeulich@suse.com>
CC: Andrew Cooper <andrew.cooper3@citrix.com>
CC: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
---
 xen/arch/x86/setup.c       | 4 ++--
 xen/include/xen/tmem_xen.h | 5 +++++
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/xen/arch/x86/setup.c b/xen/arch/x86/setup.c
index 8431f06..5485468 100644
--- a/xen/arch/x86/setup.c
+++ b/xen/arch/x86/setup.c
@@ -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>
@@ -1247,7 +1247,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 c770f3e..f516bbe 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
  */
-- 
2.4.10


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

  reply	other threads:[~2016-03-14 20:29 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-14 20:29 [PATCH 0/5] Allow tmem to be disabled via Kconfig Doug Goldstein
2016-03-14 20:29 ` Doug Goldstein [this message]
2016-03-15  8:12   ` [PATCH 1/5] tmem: add tmem_disable() function Jan Beulich
2016-03-14 20:29 ` [PATCH 2/5] tmem: drop direct usage of opt_tmem Doug Goldstein
2016-03-15  8:15   ` Jan Beulich
2016-03-14 20:29 ` [PATCH 3/5] tmem: make tmem_freeable_pages() check tmem status Doug Goldstein
2016-03-15  8:17   ` Jan Beulich
2016-03-14 20:29 ` [PATCH 4/5] tmem: don't assume stdbool.h is included Doug Goldstein
2016-03-15  8:23   ` Jan Beulich
2016-03-14 20:29 ` [PATCH 5/5] tmem: allow tmem to be disabled with Kconfig Doug Goldstein
2016-03-15  8:31   ` Jan Beulich
2016-03-15 18:28     ` Doug Goldstein
2016-03-15 19:04     ` Doug Goldstein
2016-03-16  8:36       ` Jan Beulich
2016-03-14 20:46 ` [PATCH 0/5] Allow tmem to be disabled via Kconfig Konrad Rzeszutek Wilk

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1457987365-866-2-git-send-email-cardoe@cardoe.com \
    --to=cardoe@cardoe.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=jbeulich@suse.com \
    --cc=keir@xen.org \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.