From patchwork Thu Jun 5 11:56:48 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Campbell X-Patchwork-Id: 31413 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-vc0-f197.google.com (mail-vc0-f197.google.com [209.85.220.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 2967D203AC for ; Thu, 5 Jun 2014 11:58:37 +0000 (UTC) Received: by mail-vc0-f197.google.com with SMTP id hq11sf4566244vcb.0 for ; Thu, 05 Jun 2014 04:58:37 -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:message-id:from:to:date:in-reply-to :references:mime-version:cc:subject:precedence:list-id :list-unsubscribe:list-post:list-help:list-subscribe:sender :errors-to:x-original-sender:x-original-authentication-results :mailing-list:list-archive:content-type:content-transfer-encoding; bh=ezIXoupjEvCviqt8Dxh7NZKcFzVS0SZVNwAj0MfRKOc=; b=ejPnUPQakH5BCRe2iSBffHAkYY/tQVDdt/qmr9rJ7PjI432ygA/6ALdTq1Q9LAqDxq C27rp2mtNXHrjIdT7E7gnJdiYUqaz+5GFunsQD4nFdHMxw37vhV2uUYklDswj0s4tkkG VDfOcoI1v0HMLDadJ+d8mbxQTgJybtH6SwB8HlzxZivD+ayMrADCSzu3C/gwo23V7M9Q DKfhvy4XMryotaPbl2DllKG1p4XkuTAjDAhu6V+Al1Yrv2oZDHpdOl6lHjUPgvQq6un7 At5wxOuTByUzDSPelf057XdUsbRjWw8746Qr7Oe8uM03rFxvoJTAJEo+wDQvWteunoXZ atdA== X-Gm-Message-State: ALoCoQmzEMxz/sSSOpb3z1hAu0HrSH4dxnHazj6CfaI6QycmAfdiqMN67NMu5e0eQhQDswJDj4ai X-Received: by 10.236.175.42 with SMTP id y30mr22483387yhl.42.1401969517724; Thu, 05 Jun 2014 04:58:37 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.84.72 with SMTP id k66ls97660qgd.96.gmail; Thu, 05 Jun 2014 04:58:37 -0700 (PDT) X-Received: by 10.52.190.138 with SMTP id gq10mr17492246vdc.47.1401969517579; Thu, 05 Jun 2014 04:58:37 -0700 (PDT) Received: from mail-ve0-f175.google.com (mail-ve0-f175.google.com [209.85.128.175]) by mx.google.com with ESMTPS id ur5si3553065vec.61.2014.06.05.04.58.37 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 05 Jun 2014 04:58:37 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.128.175 as permitted sender) client-ip=209.85.128.175; Received: by mail-ve0-f175.google.com with SMTP id jw12so1010845veb.6 for ; Thu, 05 Jun 2014 04:58:37 -0700 (PDT) X-Received: by 10.220.12.66 with SMTP id w2mr48796757vcw.15.1401969517490; Thu, 05 Jun 2014 04:58:37 -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.221.54.6 with SMTP id vs6csp10659vcb; Thu, 5 Jun 2014 04:58:37 -0700 (PDT) X-Received: by 10.224.50.136 with SMTP id z8mr16435208qaf.66.1401969517055; Thu, 05 Jun 2014 04:58:37 -0700 (PDT) Received: from lists.xen.org (lists.xen.org. [50.57.142.19]) by mx.google.com with ESMTPS id g2si7893988qaf.76.2014.06.05.04.58.36 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 05 Jun 2014 04:58:37 -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 1WsWHv-0008Ly-65; Thu, 05 Jun 2014 11:56:55 +0000 Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1WsWHt-0008Ll-QH for xen-devel@lists.xen.org; Thu, 05 Jun 2014 11:56:54 +0000 Received: from [85.158.137.68:6616] by server-13.bemta-3.messagelabs.com id 9E/45-18692-40B50935; Thu, 05 Jun 2014 11:56:52 +0000 X-Env-Sender: Ian.Campbell@citrix.com X-Msg-Ref: server-9.tower-31.messagelabs.com!1401969410!4519530!1 X-Originating-IP: [66.165.176.63] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogNjYuMTY1LjE3Ni42MyA9PiAzMDYwNDg=\n X-StarScan-Received: X-StarScan-Version: 6.11.3; banners=-,-,- X-VirusChecked: Checked Received: (qmail 31313 invoked from network); 5 Jun 2014 11:56:51 -0000 Received: from smtp02.citrix.com (HELO SMTP02.CITRIX.COM) (66.165.176.63) by server-9.tower-31.messagelabs.com with RC4-SHA encrypted SMTP; 5 Jun 2014 11:56:51 -0000 X-IronPort-AV: E=Sophos;i="4.98,980,1392163200"; d="scan'208";a="139424347" Received: from accessns.citrite.net (HELO FTLPEX01CL03.citrite.net) ([10.9.154.239]) by FTLPIPO02.CITRIX.COM with ESMTP; 05 Jun 2014 11:56:49 +0000 Received: from [127.0.0.1] (10.80.16.47) by smtprelay.citrix.com (10.13.107.80) with Microsoft SMTP Server id 14.3.181.6; Thu, 5 Jun 2014 07:56:49 -0400 Message-ID: <1401969408.15729.52.camel@hastur.hellion.org.uk> From: Ian Campbell To: Fu Wei Date: Thu, 5 Jun 2014 12:56:48 +0100 In-Reply-To: <5390205B.5060803@linaro.org> References: <536A1FCF.50207@linaro.org> <1401899819.15729.44.camel@hastur.hellion.org.uk> <5390205B.5060803@linaro.org> X-Mailer: Evolution 3.8.5-2+b3 MIME-Version: 1.0 X-DLP: MIA2 Cc: xen-devel , linaro-uefi Subject: [Xen-devel] [PATCH] xen: arm: implement generic multiboot compatibility strings (Was: Re: [Linaro-uefi] The GRUB multiboot support patch for aarch64(V3.1)) 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: ian.campbell@citrix.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.128.175 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: On Thu, 2014-06-05 at 15:46 +0800, Fu Wei wrote: > > I can see why you did this (it's what Xen actually supports today) but I > > wonder if in the interests of reducing the special cases I should create > > a Xen patch which causes it to accept both names so that you can just > > implement the "multiboot,*" stuff in common code without the special > > cases? (Although that depends on the reason for the other non-compat > > string special cases too) > > I think the "multiboot,*" stuff will be better, once Xen supports > this, I will update this code. I've only compile tested this, but I *think* this does the right thing. Ian. 8<----------------- >From d0acce53a086869420c2d8870d1a8a058013d6b5 Mon Sep 17 00:00:00 2001 From: Ian Campbell Date: Wed, 4 Jun 2014 18:17:10 +0100 Subject: [PATCH] xen: arm: implement generic multiboot compatibility strings This causes Xen to accept the more generic names originally proposed by Andre in http://thread.gmane.org/gmane.linux.linaro.announce.boot/326 and incorporated into the proposal in http://wiki.xen.org/wiki/Xen_ARM_with_Virtualization_Extensions/Multiboot This will allow bootloaders to not special case Xen (or at least to reduce the amount which is required). Signed-off-by: Ian Campbell --- xen/common/device_tree.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/xen/common/device_tree.c b/xen/common/device_tree.c index f0b17a3..5040097 100644 --- a/xen/common/device_tree.c +++ b/xen/common/device_tree.c @@ -338,9 +338,11 @@ static void __init process_multiboot_node(const void *fdt, int node, struct dt_mb_module *mod; int len; - if ( fdt_node_check_compatible(fdt, node, "xen,linux-zimage") == 0 ) + if ( fdt_node_check_compatible(fdt, node, "xen,linux-zimage") == 0 || + fdt_node_check_compatible(fdt, node, "multiboot,linux-zimage") == 0 ) nr = MOD_KERNEL; - else if ( fdt_node_check_compatible(fdt, node, "xen,linux-initrd") == 0) + else if ( fdt_node_check_compatible(fdt, node, "xen,linux-initrd") == 0 || + fdt_node_check_compatible(fdt, node, "multiboot,linux-initrd") == 0 ) nr = MOD_INITRD; else if ( fdt_node_check_compatible(fdt, node, "xen,xsm-policy") == 0 ) nr = MOD_XSM; @@ -433,7 +435,8 @@ static int __init early_scan_node(const void *fdt, { if ( device_tree_node_matches(fdt, node, "memory") ) process_memory_node(fdt, node, name, address_cells, size_cells); - else if ( device_tree_node_compatible(fdt, node, "xen,multiboot-module" ) ) + else if ( device_tree_node_compatible(fdt, node, "xen,multiboot-module" ) || + device_tree_node_compatible(fdt, node, "boot,module" )) process_multiboot_node(fdt, node, name, address_cells, size_cells); else if ( depth == 1 && device_tree_node_matches(fdt, node, "chosen") ) process_chosen_node(fdt, node, name, address_cells, size_cells);