From patchwork Tue Mar 15 20:18:48 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Douglas Goldstein X-Patchwork-Id: 8592341 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 632DAC0553 for ; Tue, 15 Mar 2016 20:23:12 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 7643F203C4 for ; Tue, 15 Mar 2016 20:23:11 +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 4A58E203B5 for ; Tue, 15 Mar 2016 20:23:09 +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 1afvSR-00038l-4j; Tue, 15 Mar 2016 20:20:47 +0000 Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1afvSQ-00038Y-1J for xen-devel@lists.xen.org; Tue, 15 Mar 2016 20:20:46 +0000 Received: from [85.158.137.68] by server-2.bemta-3.messagelabs.com id 3F/C5-03293-D9E68E65; Tue, 15 Mar 2016 20:20:45 +0000 X-Env-Sender: cardoe@cardoe.com X-Msg-Ref: server-14.tower-31.messagelabs.com!1458073243!29295846!1 X-Originating-IP: [209.85.161.171] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 8.11; banners=-,-,- X-VirusChecked: Checked Received: (qmail 8547 invoked from network); 15 Mar 2016 20:20:44 -0000 Received: from mail-yw0-f171.google.com (HELO mail-yw0-f171.google.com) (209.85.161.171) by server-14.tower-31.messagelabs.com with AES128-GCM-SHA256 encrypted SMTP; 15 Mar 2016 20:20:44 -0000 Received: by mail-yw0-f171.google.com with SMTP id h129so36104120ywb.1 for ; Tue, 15 Mar 2016 13:20:44 -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=3J5oaw99Brvc6SCg60tBXFegS3MX4T7/HZj8UbwNIt8=; b=LYov0sJsUARxPQHlOp8H56Vq3tocxUb8DRB8w26XfZdp7msl9/DYS8Ec2/Avr3KljL P4Z5nQzM8YKeFcKxLpOLeyRk+lm02tfDASu+gMBZwxCenzLFZIqLFEw94Rl3H5C7qVMv J3cSe3lofGlixycja2O8kcyb3thYf9IFUUrFo= 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=3J5oaw99Brvc6SCg60tBXFegS3MX4T7/HZj8UbwNIt8=; b=K6F6M0Xbv6dSyf6fq4ggaZcY4Q4sFEQxN1FMj30CJ2m1Q8A+zrhXsEVH1P9iVaCO18 0kkzeFrlKhrBTMBK3uVo2ia8D355QdsuU+vvaDQTaH34ggvP2/ckUSlDqXBYcD9dZL40 tQh7do+h1XnMS8IxUlluSLObtCdH/KatXjkvm9Zw2UhzmtNuc+fSPaUzeberYSrQOxcU EJPiGsKldsRoYpRMspqulAq9RgsO6c3yuERfyefWC0/68tF/IwFIQ2VPsHzxlUUebqgU NGlwg0EAw1uvVJMvq0cUcUM6lVHtPU+bLbx9Zariw/RzLqf9uvDISXAseHiMVNtxf0oX 0NzA== X-Gm-Message-State: AD7BkJKdt5Aen4hDwd7GMTBk3acslDr4kocgV2rhklIwSMFsVpSY9sGW7MwnTAKLOlIlDA== X-Received: by 10.37.41.66 with SMTP id p63mr15952495ybp.183.1458073243583; Tue, 15 Mar 2016 13:20:43 -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 v63sm18188276ywf.40.2016.03.15.13.20.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 15 Mar 2016 13:20:39 -0700 (PDT) From: Doug Goldstein To: xen-devel@lists.xen.org Date: Tue, 15 Mar 2016 15:18:48 -0500 Message-Id: <1458073130-5126-2-git-send-email-cardoe@cardoe.com> X-Mailer: git-send-email 2.4.10 In-Reply-To: <1458073130-5126-1-git-send-email-cardoe@cardoe.com> References: <1458073130-5126-1-git-send-email-cardoe@cardoe.com> Cc: Keir Fraser , Doug Goldstein , Jan Beulich , Andrew Cooper Subject: [Xen-devel] [PATCH v2 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=-0.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_BL_SPAMCOP_NET, 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 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 */