From patchwork Wed Apr 1 16:21:38 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 46635 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f70.google.com (mail-la0-f70.google.com [209.85.215.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 9DA83216D1 for ; Wed, 1 Apr 2015 16:24:31 +0000 (UTC) Received: by layy10 with SMTP id y10sf5760792lay.0 for ; Wed, 01 Apr 2015 09:24:30 -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:mime-version:cc:subject:precedence:list-id :list-unsubscribe:list-post:list-help:list-subscribe:content-type :content-transfer-encoding:sender:errors-to:x-original-sender :x-original-authentication-results:mailing-list:list-archive; bh=Ui6GPNUJ5MMtWgr9GvuLXtkXvVwCXHkhkH6CwTn2CQg=; b=LcuY5P+/LNwVDRMTyms2O1bng2ihjBswxNfZYUC+wEGvKFDzcg81qAfnfEPQ/cgfv6 hNkREo1o8PsZuiIyzWw3yMROGWZo/GMB4pbG5OcX5mZ1yFlSTocfzk+MQdNnX8Fsfsnr RsU/LlLH+U+dGy6Jx/wsmbE2bIx/xJKFTn2yEi7YwTUDr8PkPkyxBZlZPhlVQXi8Q9C4 rkFYp2M+13eym96PJW4yJ3cTCNSH6p9wme8WaYTHwGKvkNqe9JHYOxfhwcY2A0HmBT9D GVBvf50xzRfLr+xGY6vWtaRXbG+9ZKWyLUPqQl/cuZVFbXtfv3oiqZC4eHqfsAZJWNE1 54Jg== X-Gm-Message-State: ALoCoQkC6HjWFEsiwJhUJDqlqtyp0GIqiydJLnPp8KWWDG12NpeAfojo6rLq/rM6GJ6LRZf1Hh7Z X-Received: by 10.180.73.137 with SMTP id l9mr38391wiv.5.1427905470342; Wed, 01 Apr 2015 09:24:30 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.198.232 with SMTP id jf8ls101893lac.83.gmail; Wed, 01 Apr 2015 09:24:30 -0700 (PDT) X-Received: by 10.152.87.162 with SMTP id az2mr20337344lab.58.1427905469989; Wed, 01 Apr 2015 09:24:29 -0700 (PDT) Received: from mail-lb0-f182.google.com (mail-lb0-f182.google.com. [209.85.217.182]) by mx.google.com with ESMTPS id i2si1999366lbz.68.2015.04.01.09.24.29 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 01 Apr 2015 09:24:29 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.182 as permitted sender) client-ip=209.85.217.182; Received: by lbbzk7 with SMTP id zk7so24038745lbb.0 for ; Wed, 01 Apr 2015 09:24:29 -0700 (PDT) X-Received: by 10.152.178.197 with SMTP id da5mr37458266lac.56.1427905469782; Wed, 01 Apr 2015 09:24:29 -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.57.201 with SMTP id k9csp771085lbq; Wed, 1 Apr 2015 09:24:28 -0700 (PDT) X-Received: by 10.140.43.199 with SMTP id e65mr54814610qga.34.1427905468235; Wed, 01 Apr 2015 09:24:28 -0700 (PDT) Received: from lists.xen.org (lists.xen.org. [50.57.142.19]) by mx.google.com with ESMTPS id 197si2301851qhu.73.2015.04.01.09.24.26 (version=TLSv1 cipher=RC4-SHA bits=128/128); Wed, 01 Apr 2015 09:24:28 -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 1YdLPm-0004gG-GO; Wed, 01 Apr 2015 16:22:50 +0000 Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1YdLPk-0004fJ-Te for xen-devel@lists.xenproject.org; Wed, 01 Apr 2015 16:22:49 +0000 Received: from [193.109.254.147] by server-9.bemta-14.messagelabs.com id 99/FB-13722-85B1C155; Wed, 01 Apr 2015 16:22:48 +0000 X-Env-Sender: julien.grall@citrix.com X-Msg-Ref: server-15.tower-27.messagelabs.com!1427905365!14999781!2 X-Originating-IP: [66.165.176.63] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogNjYuMTY1LjE3Ni42MyA9PiAzMDYwNDg=\n, received_headers: No Received headers X-StarScan-Received: X-StarScan-Version: 6.13.6; banners=-,-,- X-VirusChecked: Checked Received: (qmail 32551 invoked from network); 1 Apr 2015 16:22:47 -0000 Received: from smtp02.citrix.com (HELO SMTP02.CITRIX.COM) (66.165.176.63) by server-15.tower-27.messagelabs.com with RC4-SHA encrypted SMTP; 1 Apr 2015 16:22:47 -0000 X-IronPort-AV: E=Sophos;i="5.11,504,1422921600"; d="scan'208";a="250389343" From: Julien Grall To: Date: Wed, 1 Apr 2015 17:21:38 +0100 Message-ID: <1427905307-23749-6-git-send-email-julien.grall@citrix.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1427905307-23749-1-git-send-email-julien.grall@citrix.com> References: <1427905307-23749-1-git-send-email-julien.grall@citrix.com> MIME-Version: 1.0 X-DLP: MIA1 Cc: ian.campbell@citrix.com, Stefano Stabellini , Julien Grall , tim@xen.org, stefano.stabellini@citrix.com, Andrii Tseglytskyi Subject: [Xen-devel] [PATCH v5 p1 05/14] 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: , 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: patch@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.182 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: From: Julien Grall 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 /*