From patchwork Tue Sep 10 14:49:02 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 19916 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-vc0-f199.google.com (mail-vc0-f199.google.com [209.85.220.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 8143625E85 for ; Tue, 10 Sep 2013 14:49:42 +0000 (UTC) Received: by mail-vc0-f199.google.com with SMTP id gf11sf8899722vcb.6 for ; Tue, 10 Sep 2013 07:49:42 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=mime-version:x-gm-message-state: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=hlf0En0pZTUZoz6tcO1qnWAD0ht3jI++sLch1priMFo=; b=PsRFY8bHd/GRgKifguCfg3g0CSe2cZoeFJK8AawvXE1cMbvj+BzTnEnitUZM3KJP8Y nNDVMHg410x7EzGd1zx8ccW30rCLj4ovPfjv4It6uktOxsI9uwCCiP6r/3bPNiB9a3Rh uT5q9d1WFS9gZBDLHMd7SLnLTsDyMaX56Q8/ZjAgKDygbMZB3wSwK/B3X03W70Qq5F1w Gz0L4h53D6zLEYuAEEViiZwo0dnvPlsGAW37H4LvdaAOrvgSn1S8KtiKvFqoDP5Y5LoF ZVwLLaAwfVLuSxuv/39J7/VJAZcd3Uy/MW+5puiwUre/lyg0SI9POiPFjfV+WSeP30G+ qyMw== X-Received: by 10.236.56.70 with SMTP id l46mr8963952yhc.2.1378824582303; Tue, 10 Sep 2013 07:49:42 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.39.104 with SMTP id o8ls2271920qek.38.gmail; Tue, 10 Sep 2013 07:49:42 -0700 (PDT) X-Received: by 10.220.11.7 with SMTP id r7mr23332790vcr.12.1378824582072; Tue, 10 Sep 2013 07:49:42 -0700 (PDT) Received: from mail-ve0-f179.google.com (mail-ve0-f179.google.com [209.85.128.179]) by mx.google.com with ESMTPS id bb4si4528613vcb.75.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 10 Sep 2013 07:49:42 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.128.179 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.179; Received: by mail-ve0-f179.google.com with SMTP id c14so4729164vea.10 for ; Tue, 10 Sep 2013 07:49:42 -0700 (PDT) X-Gm-Message-State: ALoCoQkeju5WAze82PCeZJ8Sc/rWNctILnb8j2JIJbcZaKoqYxSEyb0EasmCTpFCahg+UfHtEhRH X-Received: by 10.58.208.130 with SMTP id me2mr23468547vec.13.1378824581988; Tue, 10 Sep 2013 07:49:41 -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 u4csp4664vcz; Tue, 10 Sep 2013 07:49:41 -0700 (PDT) X-Received: by 10.15.55.133 with SMTP id v5mr322278eew.96.1378824580647; Tue, 10 Sep 2013 07:49:40 -0700 (PDT) Received: from mail-ea0-f172.google.com (mail-ea0-f172.google.com [209.85.215.172]) by mx.google.com with ESMTPS id x7si15333861eeo.67.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 10 Sep 2013 07:49:40 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.215.172 is neither permitted nor denied by best guess record for domain of julien.grall@linaro.org) client-ip=209.85.215.172; Received: by mail-ea0-f172.google.com with SMTP id r16so3951354ead.17 for ; Tue, 10 Sep 2013 07:49:40 -0700 (PDT) X-Received: by 10.14.180.73 with SMTP id i49mr4348436eem.55.1378824579954; Tue, 10 Sep 2013 07:49:39 -0700 (PDT) Received: from belegaer.uk.xensource.com. ([185.25.64.249]) by mx.google.com with ESMTPSA id i1sm31911644eeg.0.1969.12.31.16.00.00 (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 10 Sep 2013 07:49:39 -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 v3 14/27] xen/arm: Don't map disabled device in DOM0 Date: Tue, 10 Sep 2013 15:49:02 +0100 Message-Id: <1378824555-16564-15-git-send-email-julien.grall@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1378824555-16564-1-git-send-email-julien.grall@linaro.org> References: <1378824555-16564-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.179 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 132be26..31422d0 100644 --- a/xen/arch/arm/domain_build.c +++ b/xen/arch/arm/domain_build.c @@ -408,9 +408,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);