]> xenbits.xensource.com Git - xen.git/commitdiff
xen/arm: Don't map disabled device in DOM0
authorJulien Grall <julien.grall@linaro.org>
Fri, 13 Sep 2013 12:49:21 +0000 (13:49 +0100)
committerIan Campbell <ian.campbell@citrix.com>
Tue, 17 Sep 2013 14:28:33 +0000 (15:28 +0100)
Linux should cope with 'status = "disabled"' in the Device Tree.

Signed-off-by: Julien Grall <julien.grall@linaro.org>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
xen/arch/arm/domain_build.c

index fb4f172b8be73ba33ecbc5a187fc9c6587eb4a41..70f48b6d377b33d39e1a6cb6f5fb8ee9e9ca7ea6 100644 (file)
@@ -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);