From patchwork Thu Mar 19 19:29:31 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 46097 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f200.google.com (mail-wi0-f200.google.com [209.85.212.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 6CFF421515 for ; Thu, 19 Mar 2015 19:32:23 +0000 (UTC) Received: by wivz2 with SMTP id z2sf14550539wiv.1 for ; Thu, 19 Mar 2015 12:32:22 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:date:message-id:in-reply-to :references:cc:subject:precedence:list-id:list-unsubscribe:list-post :list-help:list-subscribe:mime-version:content-type :content-transfer-encoding:sender:errors-to:x-original-sender :x-original-authentication-results:mailing-list:list-archive; bh=1W8oeDV0STaNcsuxXF+sofM6y77LP3Dhcjlj3nbWvi0=; b=C/SQwxga2+kndyEIraY5EwIMbDpmjs9RHPq9b/152FuL6FT3zjRuY4LBRrxwygIxuZ Iidag88th22UVqlQSe0SfqmGB7pnkGO9djIjE5wQHoMzWBdPfouxdbLJvTr/wiJcw2BC 5OxwO/yOnAC2aKljE9m7msaogh2HgSj29fNZCIge1GVhzi19YdsHQh/Zy6ZT6KtKUphg Bd82u/vC9fsxhrS3YW5EDpQrn//ge9HAKrISP6q0o0z/GHuFQIfh8+H68owY4hI1AkCl oJSoPv4XwHFfiLUUqwxKzhFmyPtJG7kV4GARkSzVQhX/sSKek+Eu6qACRcVYnjbYKG+s qinA== X-Gm-Message-State: ALoCoQmAAcOKt/3hTDAiJ74SQQipIYunO6byBQZIFdUGuUN866Yi+i4Tl9QuWfB1rwarfqvhOWX9 X-Received: by 10.180.81.134 with SMTP id a6mr2067349wiy.1.1426793542745; Thu, 19 Mar 2015 12:32:22 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.204.134 with SMTP id ky6ls308852lac.76.gmail; Thu, 19 Mar 2015 12:32:22 -0700 (PDT) X-Received: by 10.112.181.231 with SMTP id dz7mr67805745lbc.47.1426793542356; Thu, 19 Mar 2015 12:32:22 -0700 (PDT) Received: from mail-la0-f46.google.com (mail-la0-f46.google.com. [209.85.215.46]) by mx.google.com with ESMTPS id yd8si1619896lbb.144.2015.03.19.12.32.22 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 19 Mar 2015 12:32:22 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.46 as permitted sender) client-ip=209.85.215.46; Received: by labjg1 with SMTP id jg1so70612769lab.2 for ; Thu, 19 Mar 2015 12:32:22 -0700 (PDT) X-Received: by 10.152.206.70 with SMTP id lm6mr71449771lac.35.1426793542242; Thu, 19 Mar 2015 12:32:22 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.35.133 with SMTP id h5csp597541lbj; Thu, 19 Mar 2015 12:32:21 -0700 (PDT) X-Received: by 10.52.7.228 with SMTP id m4mr82290079vda.31.1426793536179; Thu, 19 Mar 2015 12:32:16 -0700 (PDT) Received: from lists.xen.org (lists.xen.org. [50.57.142.19]) by mx.google.com with ESMTPS id k11si2006077vdf.23.2015.03.19.12.32.15 (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 19 Mar 2015 12:32:16 -0700 (PDT) Received-SPF: none (google.com: xen-devel-bounces@lists.xen.org does not designate permitted sender hosts) client-ip=50.57.142.19; Received: from localhost ([127.0.0.1] helo=lists.xen.org) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1YYg9Y-0004Db-KV; Thu, 19 Mar 2015 19:30:48 +0000 Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1YYg9W-0004DG-U1 for xen-devel@lists.xenproject.org; Thu, 19 Mar 2015 19:30:47 +0000 Received: from [85.158.137.68] by server-13.bemta-3.messagelabs.com id B3/FB-17064-5E32B055; Thu, 19 Mar 2015 19:30:45 +0000 X-Env-Sender: julien.grall@linaro.org X-Msg-Ref: server-7.tower-31.messagelabs.com!1426793444!13802819!1 X-Originating-IP: [74.125.82.44] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 6.13.4; banners=-,-,- X-VirusChecked: Checked Received: (qmail 1331 invoked from network); 19 Mar 2015 19:30:45 -0000 Received: from mail-wg0-f44.google.com (HELO mail-wg0-f44.google.com) (74.125.82.44) by server-7.tower-31.messagelabs.com with RC4-SHA encrypted SMTP; 19 Mar 2015 19:30:45 -0000 Received: by wggv3 with SMTP id v3so71347295wgg.1 for ; Thu, 19 Mar 2015 12:30:44 -0700 (PDT) X-Received: by 10.180.24.233 with SMTP id x9mr19444471wif.9.1426793444863; Thu, 19 Mar 2015 12:30:44 -0700 (PDT) Received: from chilopoda.uk.xensource.com. ([185.25.64.249]) by mx.google.com with ESMTPSA id hl8sm3203005wjb.38.2015.03.19.12.30.42 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 19 Mar 2015 12:30:43 -0700 (PDT) From: Julien Grall To: xen-devel@lists.xenproject.org Date: Thu, 19 Mar 2015 19:29:31 +0000 Message-Id: <1426793399-6283-6-git-send-email-julien.grall@linaro.org> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1426793399-6283-1-git-send-email-julien.grall@linaro.org> References: <1426793399-6283-1-git-send-email-julien.grall@linaro.org> Cc: ian.campbell@citrix.com, Stefano Stabellini , Julien Grall , tim@xen.org, stefano.stabellini@citrix.com, Andrii Tseglytskyi Subject: [Xen-devel] [PATCH v4 05/33] xen/arm: Map disabled device in DOM0 X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: julien.grall@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.46 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Archive: The check to avoid mapping disabled devices in DOM0 was added in anticipation of the device passthrough. But, a brand new property will be added later to mark device which will be passthrough. Also, remove the memory type check as we already skipped them earlier in the function via skip_matches. Furthermore, some platform (such as the OMAP) may try to poke device even if the property "status" is set to "disabled". Signed-off-by: Julien Grall Acked-by: Stefano Stabellini Acked-by: Ian Campbell Cc: Andrii Tseglytskyi --- Changes in v4: - Typoes in the commit message - Add Ian and Stefano's ack Changes in v3: - Patch added - "xen/arm: follow-up to allow DOM0 manage IRQ and MMIO" has been split in 2 patch [1] - Drop the check for memory type. Thoses nodes have been blacklisted. [1] https://patches.linaro.org/34669/ --- xen/arch/arm/domain_build.c | 19 +++---------------- xen/arch/arm/platforms/omap5.c | 12 ------------ 2 files changed, 3 insertions(+), 28 deletions(-) diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c index ab4ad65..31b32df 100644 --- a/xen/arch/arm/domain_build.c +++ b/xen/arch/arm/domain_build.c @@ -1085,22 +1085,9 @@ static int handle_node(struct domain *d, struct kernel_info *kinfo, return 0; } - /* - * Some device doesn't need to be mapped in Xen: - * - 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_type_is_equal(node, "memory") && - dt_device_is_available(node) ) - { - res = map_device(d, node); - - if ( res ) - return res; - } + res = map_device(d, node); + if ( res) + return res; /* * The property "name" is used to have a different name on older FDT diff --git a/xen/arch/arm/platforms/omap5.c b/xen/arch/arm/platforms/omap5.c index 9d6e504..e7bf30d 100644 --- a/xen/arch/arm/platforms/omap5.c +++ b/xen/arch/arm/platforms/omap5.c @@ -155,17 +155,6 @@ static const char * const dra7_dt_compat[] __initconst = NULL }; -static const struct dt_device_match dra7_blacklist_dev[] __initconst = -{ - /* OMAP Linux kernel handles devices with status "disabled" in a - * weird manner - tries to reset them. While their memory ranges - * are not mapped, this leads to data aborts, so skip these devices - * from DT for dom0. - */ - DT_MATCH_NOT_AVAILABLE(), - { /* sentinel */ }, -}; - PLATFORM_START(omap5, "TI OMAP5") .compatible = omap5_dt_compat, .init_time = omap5_init_time, @@ -185,7 +174,6 @@ PLATFORM_START(dra7, "TI DRA7") .dom0_gnttab_start = 0x4b000000, .dom0_gnttab_size = 0x20000, - .blacklist_dev = dra7_blacklist_dev, PLATFORM_END /*