From patchwork Fri Jul 18 13:08:20 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Campbell X-Patchwork-Id: 33845 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ie0-f197.google.com (mail-ie0-f197.google.com [209.85.223.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 4CB20208CF for ; Fri, 18 Jul 2014 13:10:49 +0000 (UTC) Received: by mail-ie0-f197.google.com with SMTP id rp18sf33562516iec.8 for ; Fri, 18 Jul 2014 06:10:48 -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:sender :errors-to:x-original-sender:x-original-authentication-results :mailing-list:list-archive:content-type:content-transfer-encoding; bh=L0jhcjinASsynHFTnRKxcZSPc+OdwAUA1Zt27VKExgM=; b=atHaM7I3tg+oo5zECaH+P9q2a+WWObfke0Y7onzhRanOZ5N/smnGrOlZma8pj071vL apuS2iA0dbtXfz2Ng1vkgeJkdxNBr+kt/YdlV5d1dGtVo1DaLGbrCSzlNUEuCaDzzRkd Rw/fyjPw1REbUH0B4hrk90U8wVX+YWZJ64K1nyd9zFhxVLuuzH8hIj+zq4IxdZfoYyBZ mqjlkhXVrc45PnyDE2AABr7uwzlHTmEvS2OiAACr4xRxZnRDCntLqW7pdvf4nuPColE1 Ecj6Xy/kfiAz8xvaj4Q4P+8gtOS9f3yNZJ/VKKtKMB/TUuYnV89tfTMokmwWHveZdwtX RSxw== X-Gm-Message-State: ALoCoQnpMHlfLD33v4TF4NZzL7TMF7m5SBr8KCWqeFZMF8KelskajM9//CmlAfARX4BPnDFq9GB0 X-Received: by 10.182.123.232 with SMTP id md8mr2144995obb.41.1405689048757; Fri, 18 Jul 2014 06:10:48 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.24.74 with SMTP id 68ls979521qgq.98.gmail; Fri, 18 Jul 2014 06:10:48 -0700 (PDT) X-Received: by 10.221.26.10 with SMTP id rk10mr5874668vcb.0.1405689048672; Fri, 18 Jul 2014 06:10:48 -0700 (PDT) Received: from mail-vc0-f172.google.com (mail-vc0-f172.google.com [209.85.220.172]) by mx.google.com with ESMTPS id te2si5582592vcb.101.2014.07.18.06.10.48 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 18 Jul 2014 06:10:48 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.172 as permitted sender) client-ip=209.85.220.172; Received: by mail-vc0-f172.google.com with SMTP id im17so7442253vcb.3 for ; Fri, 18 Jul 2014 06:10:48 -0700 (PDT) X-Received: by 10.52.129.200 with SMTP id ny8mr4646228vdb.27.1405689047695; Fri, 18 Jul 2014 06:10:47 -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.37.5 with SMTP id tc5csp9817vcb; Fri, 18 Jul 2014 06:10:47 -0700 (PDT) X-Received: by 10.140.82.227 with SMTP id h90mr7758352qgd.80.1405689047324; Fri, 18 Jul 2014 06:10:47 -0700 (PDT) Received: from lists.xen.org (lists.xen.org. [50.57.142.19]) by mx.google.com with ESMTPS id q15si11320467qay.78.2014.07.18.06.10.45 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Fri, 18 Jul 2014 06:10:46 -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 1X87ts-0005ct-GG; Fri, 18 Jul 2014 13:08:36 +0000 Received: from mail6.bemta4.messagelabs.com ([85.158.143.247]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1X87tr-0005aF-5F for xen-devel@lists.xen.org; Fri, 18 Jul 2014 13:08:35 +0000 Received: from [85.158.143.35:60861] by server-3.bemta-4.messagelabs.com id 6C/70-09960-25C19C35; Fri, 18 Jul 2014 13:08:34 +0000 X-Env-Sender: Ian.Campbell@citrix.com X-Msg-Ref: server-15.tower-21.messagelabs.com!1405688912!18595594!1 X-Originating-IP: [66.165.176.89] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogNjYuMTY1LjE3Ni44OSA9PiAyMDMwMDc=\n X-StarScan-Received: X-StarScan-Version: 6.11.3; banners=-,-,- X-VirusChecked: Checked Received: (qmail 7632 invoked from network); 18 Jul 2014 13:08:33 -0000 Received: from smtp.citrix.com (HELO SMTP.CITRIX.COM) (66.165.176.89) by server-15.tower-21.messagelabs.com with RC4-SHA encrypted SMTP; 18 Jul 2014 13:08:33 -0000 X-IronPort-AV: E=Sophos;i="5.01,685,1400025600"; d="scan'208";a="153665191" Received: from accessns.citrite.net (HELO FTLPEX01CL02.citrite.net) ([10.9.154.239]) by FTLPIPO01.CITRIX.COM with ESMTP; 18 Jul 2014 13:08:32 +0000 Received: from ukmail1.uk.xensource.com (10.80.16.128) by smtprelay.citrix.com (10.13.107.79) with Microsoft SMTP Server id 14.3.181.6; Fri, 18 Jul 2014 09:08:31 -0400 Received: from marilith-n13-p0.uk.xensource.com ([10.80.229.115] helo=localhost.localdomain) by ukmail1.uk.xensource.com with smtp (Exim 4.69) (envelope-from ) id 1X87tm-0001RX-Dq; Fri, 18 Jul 2014 14:08:31 +0100 Received: by localhost.localdomain (sSMTP sendmail emulation); Fri, 18 Jul 2014 14:08:30 +0100 From: Ian Campbell To: Date: Fri, 18 Jul 2014 14:08:20 +0100 Message-ID: <1405688900-11769-10-git-send-email-ian.campbell@citrix.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1405688876.491.10.camel@kazak.uk.xensource.com> References: <1405688876.491.10.camel@kazak.uk.xensource.com> MIME-Version: 1.0 X-DLP: MIA1 Cc: julien.grall@linaro.org, tim@xen.org, Ian Campbell , stefano.stabellini@eu.citrix.com Subject: [Xen-devel] [PATCH v3 10/10] xen: arm: Only lookup kernel bootmodule once while building dom0 dtb. 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.220.172 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: Signed-off-by: Ian Campbell --- v3: New patch --- xen/arch/arm/domain_build.c | 4 +++- xen/arch/arm/kernel.h | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c index 154367e..3db2e94 100644 --- a/xen/arch/arm/domain_build.c +++ b/xen/arch/arm/domain_build.c @@ -405,7 +405,7 @@ static int write_properties(struct domain *d, struct kernel_info *kinfo, int res = 0; int had_dom0_bootargs = 0; - struct bootmodule *mod = boot_module_find_by_kind(BOOTMOD_KERNEL); + struct bootmodule *mod = kinfo->bootmodule; if ( mod && mod->cmdline[0] ) bootargs = &mod->cmdline[0]; @@ -1307,6 +1307,8 @@ int construct_dom0(struct domain *d) d->max_pages = ~0U; kinfo.unassigned_mem = dom0_mem; + kinfo.bootmodule = boot_module_find_by_kind(BOOTMOD_KERNEL); + BUG_ON(!kinfo.bootmodule); rc = kernel_probe(&kinfo); if ( rc < 0 ) diff --git a/xen/arch/arm/kernel.h b/xen/arch/arm/kernel.h index 7c7f624..2745bb5 100644 --- a/xen/arch/arm/kernel.h +++ b/xen/arch/arm/kernel.h @@ -23,6 +23,7 @@ struct kernel_info { paddr_t entry; /* boot blob load addresses */ + struct bootmodule *bootmodule; paddr_t dtb_paddr; paddr_t initrd_paddr;