From patchwork Wed Mar 16 14:10:59 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Douglas Goldstein X-Patchwork-Id: 8600901 Return-Path: X-Original-To: patchwork-xen-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id D50749F758 for ; Wed, 16 Mar 2016 14:13:53 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 0A11720361 for ; Wed, 16 Mar 2016 14:13:50 +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 5F6A2202FE for ; Wed, 16 Mar 2016 14:13:45 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1agCAQ-0000h2-R8; Wed, 16 Mar 2016 14:11:18 +0000 Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1agCAP-0000ga-Fx for xen-devel@lists.xen.org; Wed, 16 Mar 2016 14:11:17 +0000 Received: from [85.158.137.68] by server-4.bemta-3.messagelabs.com id 86/21-03606-48969E65; Wed, 16 Mar 2016 14:11:16 +0000 X-Env-Sender: cardoe@cardoe.com X-Msg-Ref: server-11.tower-31.messagelabs.com!1458137475!3297307!1 X-Originating-IP: [209.85.161.195] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 8.11; banners=-,-,- X-VirusChecked: Checked Received: (qmail 62865 invoked from network); 16 Mar 2016 14:11:15 -0000 Received: from mail-yw0-f195.google.com (HELO mail-yw0-f195.google.com) (209.85.161.195) by server-11.tower-31.messagelabs.com with AES128-GCM-SHA256 encrypted SMTP; 16 Mar 2016 14:11:15 -0000 Received: by mail-yw0-f195.google.com with SMTP id f6so3683634ywa.1 for ; Wed, 16 Mar 2016 07:11:15 -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=56vjZyg49Vr/lV7xjH+EO2RrBuUxYBtRevW6QUjcaHo=; b=SL020gzwhG4pon9vaKeH83JbZziM3fldZGGnmoymbu7TNmhZoELhsLXdRDUaSaA8g3 r5Ft7pVvbGufYVVE++Yp3oO/6yhCY+h1HJFvHlrLK20q2wKGp/+GpnimOnF8mhvfyBea IivvqKIY+b+E1GNXwfPZ5e33wb/V73/YgNkFI= 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=56vjZyg49Vr/lV7xjH+EO2RrBuUxYBtRevW6QUjcaHo=; b=NqYiyTGQkJ5G8cl3l3QKari4twxbrH+JCPwQkrK/9z69QxVF5sjDVuoNP8bLUN3sW3 zY+s266brWn5Ogw3rGcwUwgShFmU4HW+0/bvh8R5uC8rwlLCi5jg4HkDbsdnaSCZjY7W 4cQ2PGUGi+UZ6puEseQu2acrpjohM6HXSdkOrBflJfRj4s0meUuLGOXSrJVSDS7mnxPG nEqd1mr9YOc+w1YOV9mLLDErwR/Yf1YV1vFFaCS/IfSqj4RuVo1YbiGzs7ChSswhyUQj EW+d+jAoNAWhbeGVozSHOxZ/v83fEqw/HB/H12VQI+xZOvmymIMyCcQQOx073/bb0kV/ 5ZzA== X-Gm-Message-State: AD7BkJJK6Ac1Clyj/FQ1y8UGDnMkCZNaIXQMk25toZyNJ6B/Q0BMKhjD73QsfpSKv4EVOw== X-Received: by 10.129.73.132 with SMTP id w126mr1517412ywa.266.1458137474882; Wed, 16 Mar 2016 07:11:14 -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 a140sm1937862ywe.50.2016.03.16.07.11.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 16 Mar 2016 07:11:13 -0700 (PDT) From: Doug Goldstein To: xen-devel@lists.xen.org Date: Wed, 16 Mar 2016 09:10:59 -0500 Message-Id: <1458137461-3535-2-git-send-email-cardoe@cardoe.com> X-Mailer: git-send-email 2.4.10 In-Reply-To: <1458137461-3535-1-git-send-email-cardoe@cardoe.com> References: <1458137461-3535-1-git-send-email-cardoe@cardoe.com> Cc: Keir Fraser , Doug Goldstein , Jan Beulich , Andrew Cooper Subject: [Xen-devel] [PATCH v3 1/3] 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 change since v2: - none change since v1: - none --- 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 a8bf2c9..5011930 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 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 */