From mboxrd@z Thu Jan 1 00:00:00 1970 From: 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> References: <1379076574-28316-1-git-send-email-julien.grall@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1379076574-28316-1-git-send-email-julien.grall@linaro.org> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xen.org Cc: patches@linaro.org, Julien Grall , ian.campbell@citrix.com, andre.przywara@linaro.org, stefano.stabellini@eu.citrix.com List-Id: xen-devel@lists.xenproject.org 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); -- 1.7.10.4