From patchwork Tue Nov 12 21:42:55 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 21469 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pb0-f69.google.com (mail-pb0-f69.google.com [209.85.160.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id E2B1323FBE for ; Tue, 12 Nov 2013 21:43:01 +0000 (UTC) Received: by mail-pb0-f69.google.com with SMTP id md4sf13524138pbc.0 for ; Tue, 12 Nov 2013 13:43:00 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=enogP/cIZ6fjOW07Erw6TVY5agRIRL7Du/BH+46ZtbA=; b=H+rz8jgqiDPcOIX/hKh3GF5/XYM3QeQAsYQF/Sf6AMNL3UoTpKsoQ3cFf1q/G438XX uNT5cg8IJWqB8O+6Q+0tWbuskLFHCCGWblY7v/5SQgzqttTTvtCooinuBHh7CgJdTi3g ljApMD5+S2CmD78T8mq7i8/QfXgOPOLCQ2mxxlzL7RYqam+U4dg+Vrodd723FEtQJ0BG Noc/ol5xklvpkQFf+ND8NzuLsH7IWtaQcT96s/EVXd7rli/SBOmS9Cw5AkxEVnSsj0X1 5QKlZOY4ElU4wCs+mQWNt4sydHxiYTLgqs+HGXjxCrGZ21BtggkVzKNuxmqf9Sdh9q/p 0OEA== X-Gm-Message-State: ALoCoQl+SogN//5DyDk9oPMC1NWcXQozTJpmwAmDifvWhSXI+flsaCFMk/XnClzSY0LIKGBR04D+ X-Received: by 10.66.188.37 with SMTP id fx5mr843767pac.45.1384292580813; Tue, 12 Nov 2013 13:43:00 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.105.34 with SMTP id gj2ls295331qeb.52.gmail; Tue, 12 Nov 2013 13:43:00 -0800 (PST) X-Received: by 10.58.67.9 with SMTP id j9mr30759280vet.3.1384292580602; Tue, 12 Nov 2013 13:43:00 -0800 (PST) Received: from mail-vb0-f42.google.com (mail-vb0-f42.google.com [209.85.212.42]) by mx.google.com with ESMTPS id cx4si9500200vcb.5.2013.11.12.13.43.00 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 12 Nov 2013 13:43:00 -0800 (PST) Received-SPF: neutral (google.com: 209.85.212.42 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.212.42; Received: by mail-vb0-f42.google.com with SMTP id i3so10072vbh.15 for ; Tue, 12 Nov 2013 13:43:00 -0800 (PST) X-Received: by 10.58.67.168 with SMTP id o8mr11154133vet.22.1384292580491; Tue, 12 Nov 2013 13:43:00 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.174.196 with SMTP id u4csp192086vcz; Tue, 12 Nov 2013 13:43:00 -0800 (PST) X-Received: by 10.180.73.40 with SMTP id i8mr77033wiv.41.1384292579652; Tue, 12 Nov 2013 13:42:59 -0800 (PST) Received: from mail-wi0-f169.google.com (mail-wi0-f169.google.com [209.85.212.169]) by mx.google.com with ESMTPS id gi5si12562825wjd.171.2013.11.12.13.42.59 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 12 Nov 2013 13:42:59 -0800 (PST) Received-SPF: neutral (google.com: 209.85.212.169 is neither permitted nor denied by best guess record for domain of julien.grall@linaro.org) client-ip=209.85.212.169; Received: by mail-wi0-f169.google.com with SMTP id cb5so4362914wib.2 for ; Tue, 12 Nov 2013 13:42:59 -0800 (PST) X-Received: by 10.180.188.164 with SMTP id gb4mr17960634wic.52.1384292579109; Tue, 12 Nov 2013 13:42:59 -0800 (PST) Received: from localhost.localdomain (cpc8-cmbg15-2-0-cust169.5-4.cable.virginm.net. [86.30.140.170]) by mx.google.com with ESMTPSA id ey4sm48804089wic.11.2013.11.12.13.42.57 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 12 Nov 2013 13:42:58 -0800 (PST) From: Julien Grall To: xen-devel@lists.xenproject.org Cc: ian.campbell@citrix.com, tim@xen.org, patches@linaro.org, stefano.stabellini@eu.citrix.com, Julien Grall Subject: [PATCH] xen/arm: Don't call init_domheap_page with an empty range Date: Tue, 12 Nov 2013 21:42:55 +0000 Message-Id: <1384292575-2094-1-git-send-email-julien.grall@linaro.org> X-Mailer: git-send-email 1.8.3.1 X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: julien.grall@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.212.42 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , When an initrd is given to xen by U-boot, it will reserve the memory in the device tree. In this case, when xen decides to free unused memory, dt_unreserved_regions will call init_domheap_page with the start and the end of range equals. But the latter assumes that (start > end), if not Xen will hang because the number of pages is equals to (unsigned)-1. Signed-off-by: Julien Grall --- xen/arch/arm/setup.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/xen/arch/arm/setup.c b/xen/arch/arm/setup.c index 1081b43..5794a03 100644 --- a/xen/arch/arm/setup.c +++ b/xen/arch/arm/setup.c @@ -173,7 +173,8 @@ static void dt_unreserved_regions(paddr_t s, paddr_t e, } } - cb(s, e); + if ( s != e ) + cb(s, e); } void __init discard_initial_modules(void)