From patchwork Fri Sep 13 12:49:21 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 20041 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-vc0-f198.google.com (mail-vc0-f198.google.com [209.85.220.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 0B9CB28E9D for ; Fri, 13 Sep 2013 12:49:58 +0000 (UTC) Received: by mail-vc0-f198.google.com with SMTP id ht10sf1167353vcb.9 for ; Fri, 13 Sep 2013 05:49:58 -0700 (PDT) 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:in-reply-to:references:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=59d9Yde/VMzDj9sPGICwuhb+EZZZkd9trrXOebHZVzA=; b=DyO03r8q5MzX4irgyyRF13KizuS18reP0ep8smeVlrzaDHlhkhA37wVfpX8gKyZ3xj hisTR5nSGY+r86eW+qJwSMxme7BWFLsfBhzWGp1O2eHOQLT/KP5zj6JyDMsnCPqCYXOk agV+x3jR0o8c5oAKpdfBIqfxpGoiAmI/HDW1GT50ygE9KoZFXiqP4SPzjs4AUFY69Lln 2/sgYgOcreP+Pxdo784k6QzFkznCQAJEDvTFMOOpCHJ7/b3/jsOf9AG4V+IAto8xFUbe zcfRxnwP86+Ju1WYrx+KwOKtpQZw6st4+W1+sVtqVXCKxsV38OjIaJlCfeVjg6QTTBWF yB9w== X-Gm-Message-State: ALoCoQnjFvKbPxbNul/AtR5HG8FwnTjkZ5WzhHtgMFnorHa4GV5Mv2qs43diEIyCele0+sEPnwpL X-Received: by 10.236.198.197 with SMTP id v45mr5001886yhn.26.1379076598091; Fri, 13 Sep 2013 05:49:58 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.24.172 with SMTP id v12ls1179003qef.91.gmail; Fri, 13 Sep 2013 05:49:57 -0700 (PDT) X-Received: by 10.221.64.17 with SMTP id xg17mr11835371vcb.5.1379076597840; Fri, 13 Sep 2013 05:49:57 -0700 (PDT) Received: from mail-ve0-f177.google.com (mail-ve0-f177.google.com [209.85.128.177]) by mx.google.com with ESMTPS id gq10si3081758vdc.30.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 13 Sep 2013 05:49:57 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.128.177 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.177; Received: by mail-ve0-f177.google.com with SMTP id db12so892889veb.36 for ; Fri, 13 Sep 2013 05:49:57 -0700 (PDT) X-Received: by 10.58.171.4 with SMTP id aq4mr1514477vec.26.1379076597765; Fri, 13 Sep 2013 05:49:57 -0700 (PDT) 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 u4csp78780vcz; Fri, 13 Sep 2013 05:49:57 -0700 (PDT) X-Received: by 10.14.211.195 with SMTP id w43mr2850280eeo.57.1379076596229; Fri, 13 Sep 2013 05:49:56 -0700 (PDT) Received: from mail-ee0-f53.google.com (mail-ee0-f53.google.com [74.125.83.53]) by mx.google.com with ESMTPS id t9si3774646eeo.185.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 13 Sep 2013 05:49:56 -0700 (PDT) Received-SPF: neutral (google.com: 74.125.83.53 is neither permitted nor denied by best guess record for domain of julien.grall@linaro.org) client-ip=74.125.83.53; Received: by mail-ee0-f53.google.com with SMTP id b15so556526eek.40 for ; Fri, 13 Sep 2013 05:49:55 -0700 (PDT) X-Received: by 10.15.67.131 with SMTP id u3mr17991030eex.34.1379076595520; Fri, 13 Sep 2013 05:49:55 -0700 (PDT) Received: from belegaer.uk.xensource.com. ([185.25.64.249]) by mx.google.com with ESMTPSA id p5sm14678420eeg.5.1969.12.31.16.00.00 (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 13 Sep 2013 05:49:54 -0700 (PDT) From: Julien Grall To: xen-devel@lists.xen.org Cc: stefano.stabellini@eu.citrix.com, ian.campbell@citrix.com, patches@linaro.org, andre.przywara@linaro.org, Julien Grall Subject: [PATCH v4 14/27] xen/arm: Don't map disabled device in DOM0 Date: Fri, 13 Sep 2013 13:49:21 +0100 Message-Id: <1379076574-28316-15-git-send-email-julien.grall@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1379076574-28316-1-git-send-email-julien.grall@linaro.org> References: <1379076574-28316-1-git-send-email-julien.grall@linaro.org> 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.128.177 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: , Linux should cope with 'status = "disabled"' in the Device Tree. Signed-off-by: Julien Grall --- Changes in v3: - Remove the sentence about pass-through in the commit message Changes in v2: - Add a comment --- xen/arch/arm/domain_build.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c index fb4f172..70f48b6 100644 --- a/xen/arch/arm/domain_build.c +++ b/xen/arch/arm/domain_build.c @@ -429,9 +429,13 @@ static int handle_node(struct domain *d, struct kernel_info *kinfo, * - Device used by Xen: Obviously dom0 can't use them * - Memory: the guest will see a different view of memory. It will * be allocated later. + * - Disabled device: Linux is able to cope with status="disabled" + * property. Therefore these device doesn't need to be mapped. This + * solution can be use later for pass through. */ if ( dt_device_used_by(np) != DOMID_XEN && - !dt_device_type_is_equal(np, "memory") ) + !dt_device_type_is_equal(np, "memory") && + dt_device_is_available(np) ) { res = map_device(d, np);