From patchwork Tue Jan 13 14:25:15 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 42994 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f199.google.com (mail-wi0-f199.google.com [209.85.212.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 58C4520DE8 for ; Tue, 13 Jan 2015 14:27:43 +0000 (UTC) Received: by mail-wi0-f199.google.com with SMTP id bs8sf2098319wib.2 for ; Tue, 13 Jan 2015 06:27:42 -0800 (PST) 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=LX3dCep4neB1ue5wgSO6KMWz6rf0ubTplVnkYZxYGKs=; b=XSAOcfv/jEiAtM++61IdEKeFGvehW3nMWittHs5BkmL8Rhx/Dqo7l3aY3ootvmiwcs HcOjQlDOk7pV878p/MWcmISPixwaHu/jYU7qAFi2XDEJJ3xgbWQmwqPCW5qPgkt6n/vJ 1jCUFWmuCoiY9VSNGxU4zdlzGRJgCHbwvOdFAoqB4sshEqnfP4ZoAO6y/CxhgAR0ohve YSmgHeNrT1JUrQWMSvPM70Xngs1wbXvBveYpxGYqLuzGkHClKuMpZaIlRtJo+BsDQjpl muo8lrPoaFjVjMrPW4QBPV0GCD6zZJV/oT1wMqjrZRTreqdmr6fgV+mMe9U8WW9ryYUL yuXA== X-Gm-Message-State: ALoCoQkeTIYNzA/bHaSoAcPJ9LUPuZxswxnNs6S/ziP5RON56lJASnV/BdCSb0iqZJRalKBybNBO X-Received: by 10.194.176.200 with SMTP id ck8mr402236wjc.0.1421159262661; Tue, 13 Jan 2015 06:27:42 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.20.100 with SMTP id m4ls1070lae.49.gmail; Tue, 13 Jan 2015 06:27:42 -0800 (PST) X-Received: by 10.152.23.98 with SMTP id l2mr42164253laf.46.1421159262292; Tue, 13 Jan 2015 06:27:42 -0800 (PST) Received: from mail-lb0-f178.google.com (mail-lb0-f178.google.com. [209.85.217.178]) by mx.google.com with ESMTPS id jb3si23891383lbc.79.2015.01.13.06.27.42 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 13 Jan 2015 06:27:42 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.178 as permitted sender) client-ip=209.85.217.178; Received: by mail-lb0-f178.google.com with SMTP id u14so2799580lbd.9 for ; Tue, 13 Jan 2015 06:27:42 -0800 (PST) X-Received: by 10.112.159.136 with SMTP id xc8mr42322603lbb.98.1421159262148; Tue, 13 Jan 2015 06:27:42 -0800 (PST) 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.9.200 with SMTP id c8csp1398714lbb; Tue, 13 Jan 2015 06:27:41 -0800 (PST) X-Received: by 10.224.29.148 with SMTP id q20mr268532qac.7.1421159260781; Tue, 13 Jan 2015 06:27:40 -0800 (PST) Received: from lists.xen.org (lists.xen.org. [50.57.142.19]) by mx.google.com with ESMTPS id n61si26957710qge.70.2015.01.13.06.27.40 (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 13 Jan 2015 06:27:40 -0800 (PST) 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 1YB2QU-00017O-Gx; Tue, 13 Jan 2015 14:26:34 +0000 Received: from mail6.bemta4.messagelabs.com ([85.158.143.247]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1YB2QT-00016T-As for xen-devel@lists.xenproject.org; Tue, 13 Jan 2015 14:26:33 +0000 Received: from [85.158.143.35] by server-3.bemta-4.messagelabs.com id 82/1D-15461-81B25B45; Tue, 13 Jan 2015 14:26:32 +0000 X-Env-Sender: julien.grall@linaro.org X-Msg-Ref: server-14.tower-21.messagelabs.com!1421159192!21180444!1 X-Originating-IP: [74.125.82.171] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 6.12.5; banners=-,-,- X-VirusChecked: Checked Received: (qmail 6437 invoked from network); 13 Jan 2015 14:26:32 -0000 Received: from mail-we0-f171.google.com (HELO mail-we0-f171.google.com) (74.125.82.171) by server-14.tower-21.messagelabs.com with RC4-SHA encrypted SMTP; 13 Jan 2015 14:26:32 -0000 Received: by mail-we0-f171.google.com with SMTP id u56so3217717wes.2 for ; Tue, 13 Jan 2015 06:26:32 -0800 (PST) X-Received: by 10.180.72.177 with SMTP id e17mr40191936wiv.42.1421159191810; Tue, 13 Jan 2015 06:26:31 -0800 (PST) Received: from chilopoda.uk.xensource.com. ([185.25.64.249]) by mx.google.com with ESMTPSA id ni15sm14513482wic.18.2015.01.13.06.26.30 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 13 Jan 2015 06:26:31 -0800 (PST) From: Julien Grall To: xen-devel@lists.xenproject.org Date: Tue, 13 Jan 2015 14:25:15 +0000 Message-Id: <1421159133-31526-7-git-send-email-julien.grall@linaro.org> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1421159133-31526-1-git-send-email-julien.grall@linaro.org> References: <1421159133-31526-1-git-send-email-julien.grall@linaro.org> Cc: stefano.stabellini@citrix.com, Julien Grall , tim@xen.org, ian.campbell@citrix.com, Andrii Tseglytskyi Subject: [Xen-devel] [PATCH v3 06/24] 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.217.178 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 device in DOM0 was added in the anticipation of the device passthrough. But, a brand new property will be added later to mark device which will passthrough. At the same time, remove the memory type check because those nodes has been blacklisted. Futhermore, 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 Cc: Andrii Tseglytskyi --- 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 8f1b48e..f68755f 100644 --- a/xen/arch/arm/domain_build.c +++ b/xen/arch/arm/domain_build.c @@ -1104,22 +1104,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 /*