From patchwork Mon Mar 14 20:29:21 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Douglas Goldstein X-Patchwork-Id: 8583761 Return-Path: X-Original-To: patchwork-xen-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 4F1FFC0554 for ; Mon, 14 Mar 2016 20:32:41 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 669BA202A1 for ; Mon, 14 Mar 2016 20:32:40 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 72D2C201EC for ; Mon, 14 Mar 2016 20:32:39 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xen.org with esmtp (Exim 4.84) (envelope-from ) id 1afZ7W-0008Fu-2e; Mon, 14 Mar 2016 20:29:42 +0000 Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.84) (envelope-from ) id 1afZ7V-0008Fb-LF for xen-devel@lists.xen.org; Mon, 14 Mar 2016 20:29:41 +0000 Received: from [85.158.137.68] by server-7.bemta-3.messagelabs.com id E2/DC-04060-43F17E65; Mon, 14 Mar 2016 20:29:40 +0000 X-Env-Sender: cardoe@cardoe.com X-Msg-Ref: server-13.tower-31.messagelabs.com!1457987379!28470401!1 X-Originating-IP: [209.85.161.193] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 8.11; banners=-,-,- X-VirusChecked: Checked Received: (qmail 6176 invoked from network); 14 Mar 2016 20:29:40 -0000 Received: from mail-yw0-f193.google.com (HELO mail-yw0-f193.google.com) (209.85.161.193) by server-13.tower-31.messagelabs.com with AES128-GCM-SHA256 encrypted SMTP; 14 Mar 2016 20:29:40 -0000 Received: by mail-yw0-f193.google.com with SMTP id p65so12845813ywb.3 for ; Mon, 14 Mar 2016 13:29:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cardoe.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=egUNgrHUzsvl5x9QjKdYHHLSZJcEnxoRadcUI/2c8oA=; b=bqft/U29s+5x8G/SQIJtM2QCoMZB6obT815vdXudRY/eFu7zoeSQOxtdtK924zxyRf 2PaSXIkSE5uN46fq2JB/D0pRGm58uwGpxxMMB08FzJrtsPvvhGoiP3XmrpTmgly0HGUV 6cv/rlqoP8wDgbeSLCLfFxpuT8/hXqM2LvwWw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=egUNgrHUzsvl5x9QjKdYHHLSZJcEnxoRadcUI/2c8oA=; b=Ys506J+ysr57mQHYUG/ttNSCPHGAbkGcV0vQMaiTmqieCc5G0iQqYYsn/AsSTQ6TkJ y1/RGgyKrLDbU84RqEOurZfyhMifvAnwOT9z0XftjCGVkwC6Ragt+q8NZOXnxANCDi/8 1ymW1PQ4l3htaOeAphNiMzCsprc2vZxUhG5Yv03Um/KoO7GyFJ57kg/7PYltt1/X7OfG 0VieCN0o9zXgZEmm1UxSldrcF2jWGJVClGzQ0EdRdoClcrRL4SdZgkdq3gQj5ExjIcRW IArZ7tfXPrBc0J2Rh9OXxEoJYfHbjJwdppgjNG9jy9lkI2BP3z1wNUPaEs8EG9Z/NyOF fwhA== X-Gm-Message-State: AD7BkJIEP9/pPsZPkjomqOSKaLEI6v1jHgG9SPngyFaP5vnOd2oUIA3JbLH3X5CAvy/iPQ== X-Received: by 10.13.208.2 with SMTP id s2mr14829010ywd.86.1457987379069; Mon, 14 Mar 2016 13:29:39 -0700 (PDT) Received: from swanson.lan (c-68-46-196-185.hsd1.al.comcast.net. [68.46.196.185]) by smtp.gmail.com with ESMTPSA id v63sm15131124ywf.40.2016.03.14.13.29.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 14 Mar 2016 13:29:37 -0700 (PDT) From: Doug Goldstein To: xen-devel@lists.xen.org Date: Mon, 14 Mar 2016 15:29:21 -0500 Message-Id: <1457987365-866-2-git-send-email-cardoe@cardoe.com> X-Mailer: git-send-email 2.4.10 In-Reply-To: <1457987365-866-1-git-send-email-cardoe@cardoe.com> References: <1457987365-866-1-git-send-email-cardoe@cardoe.com> Cc: Keir Fraser , Doug Goldstein , Jan Beulich , Andrew Cooper Subject: [Xen-devel] [PATCH 1/5] tmem: add tmem_disable() function X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=no version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Instead of manipulating the opt_tmem variable directly utilize a wrapper function. Signed-off-by: Doug Goldstein Acked-by: Jan Beulich --- CC: Keir Fraser CC: Jan Beulich CC: Andrew Cooper CC: Konrad Rzeszutek Wilk --- 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 #include #include -#include /* for opt_tmem only */ +#include #include #include #include @@ -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 */