From patchwork Mon Jan 5 18:33:54 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leif Lindholm X-Patchwork-Id: 42756 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 96AD025B5B for ; Mon, 5 Jan 2015 18:36:25 +0000 (UTC) Received: by mail-la0-f70.google.com with SMTP id hs14sf12427664lab.1 for ; Mon, 05 Jan 2015 10:36:24 -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:subject:date:message-id :in-reply-to:references:cc:precedence:list-id:list-unsubscribe :list-archive: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; bh=TRaSEzsk0es3q6Euog33ov97oHsT8T2TRA0D2Zcp4Ds=; b=GQGEgrokQtVCp8qqy8UN1u85yfxQZegfOSVjtTNSTGyTHPnTa+NMX5PBC5oDep52J/ +tGXR5rSj+V6rO8b8DUnp5UxbFPgo+1h4lg0K6id857zO6NgBDRvtWp3dYN/yP0LMGZy Nf024g1ICNSnfb0AIPpXZopFQklWvMJKu6k/iM4i/cL4YzIzKMRwSAWqRLO/6GzNatmZ ZqQ+dEImYcuBo/F8Uoe4mHMe9dYsbETFjy7IfU0vLjowQVme4XrUmhikNd2D8fRP4TCe JswUnJwESWkafuE0Zet3lLMg6sOhmUWwtNKxtJdc0rvLKN2wBvMNx7C2kLs/alraCUBz JjMg== X-Gm-Message-State: ALoCoQkqrN19gs3r5XpXIT9CJ16zNtVpDtwxFFVewxIMhhQWDTQaSgr74MrquTcLz34HnmQU/pWC X-Received: by 10.152.8.67 with SMTP id p3mr545811laa.4.1420482984249; Mon, 05 Jan 2015 10:36:24 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.29.133 with SMTP id k5ls1526949lah.48.gmail; Mon, 05 Jan 2015 10:36:24 -0800 (PST) X-Received: by 10.152.87.100 with SMTP id w4mr94953300laz.71.1420482984099; Mon, 05 Jan 2015 10:36:24 -0800 (PST) Received: from mail-la0-f53.google.com (mail-la0-f53.google.com. [209.85.215.53]) by mx.google.com with ESMTPS id sg5si36673631lbb.19.2015.01.05.10.36.24 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 05 Jan 2015 10:36:24 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.53 as permitted sender) client-ip=209.85.215.53; Received: by mail-la0-f53.google.com with SMTP id gm9so19168002lab.12 for ; Mon, 05 Jan 2015 10:36:24 -0800 (PST) X-Received: by 10.112.104.4 with SMTP id ga4mr24762825lbb.24.1420482983922; Mon, 05 Jan 2015 10:36:23 -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 c8csp960304lbb; Mon, 5 Jan 2015 10:36:23 -0800 (PST) X-Received: by 10.70.91.208 with SMTP id cg16mr148102972pdb.144.1420482982084; Mon, 05 Jan 2015 10:36:22 -0800 (PST) Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id uv4si39806517pbc.110.2015.01.05.10.36.21 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 05 Jan 2015 10:36:22 -0800 (PST) Received-SPF: none (google.com: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org does not designate permitted sender hosts) client-ip=2001:1868:205::9; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Y8CTu-00056k-E1; Mon, 05 Jan 2015 18:34:22 +0000 Received: from mail-wg0-f45.google.com ([74.125.82.45]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Y8CTQ-0004vB-TY for linux-arm-kernel@lists.infradead.org; Mon, 05 Jan 2015 18:33:54 +0000 Received: by mail-wg0-f45.google.com with SMTP id b13so28018581wgh.32 for ; Mon, 05 Jan 2015 10:33:29 -0800 (PST) X-Received: by 10.194.238.104 with SMTP id vj8mr93401601wjc.107.1420482809427; Mon, 05 Jan 2015 10:33:29 -0800 (PST) Received: from mohikan.mushroom.smurfnet.nu (cpc4-cmbg17-2-0-cust71.5-4.cable.virginm.net. [86.14.224.72]) by mx.google.com with ESMTPSA id hn2sm76395248wjc.5.2015.01.05.10.33.28 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 05 Jan 2015 10:33:28 -0800 (PST) From: Leif Lindholm To: msalter@redhat.com, linux-arm-kernel@lists.infradead.org, linux-efi@vger.kernel.org, will.deacon@arm.com, catalin.marinas@arm.com Subject: [PATCH 1/2] arm64: don't make early_*map() calls post paging_init() Date: Mon, 5 Jan 2015 18:33:54 +0000 Message-Id: <1420482835-6444-2-git-send-email-leif.lindholm@linaro.org> X-Mailer: git-send-email 2.1.3 In-Reply-To: <1420482835-6444-1-git-send-email-leif.lindholm@linaro.org> References: <1420482835-6444-1-git-send-email-leif.lindholm@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150105_103353_167054_0A49E719 X-CRM114-Status: GOOD ( 10.23 ) X-Spam-Score: -0.7 (/) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-0.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [74.125.82.45 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [74.125.82.45 listed in wl.mailspike.net] -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders Cc: ard.biesheuvel@linaro.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: leif.lindholm@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.53 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 arm64 early_ioremap/iounmap/memremap/memunmap are not supported beyond the call to paging_init(), but arm64_enter_virtual_mode() (an early initcall) makes one call to unmap the UEFI memory map. Rearrange the code to unmap this region before paging_init(). Signed-off-by: Leif Lindholm --- arch/arm64/kernel/efi.c | 12 +++--------- arch/arm64/kernel/setup.c | 2 -- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/arch/arm64/kernel/efi.c b/arch/arm64/kernel/efi.c index 6fac253..790adb5 100644 --- a/arch/arm64/kernel/efi.c +++ b/arch/arm64/kernel/efi.c @@ -317,15 +317,8 @@ void __init efi_init(void) return; reserve_regions(); -} - -void __init efi_idmap_init(void) -{ - if (!efi_enabled(EFI_BOOT)) - return; - /* boot time idmap_pg_dir is incomplete, so fill in missing parts */ - efi_setup_idmap(); + early_memunmap(memmap.map, params.mmap_size); } static int __init remap_region(efi_memory_desc_t *md, void **new) @@ -380,7 +373,6 @@ static int __init arm64_enter_virtual_mode(void) } mapsize = memmap.map_end - memmap.map; - early_memunmap(memmap.map, mapsize); if (efi_runtime_disabled()) { pr_info("EFI runtime services will be disabled.\n"); @@ -393,6 +385,8 @@ static int __init arm64_enter_virtual_mode(void) mapsize); memmap.map_end = memmap.map + mapsize; + efi_setup_idmap(); + efi.memmap = &memmap; /* Map the runtime regions */ diff --git a/arch/arm64/kernel/setup.c b/arch/arm64/kernel/setup.c index b809911..c7eb3c5 100644 --- a/arch/arm64/kernel/setup.c +++ b/arch/arm64/kernel/setup.c @@ -401,8 +401,6 @@ void __init setup_arch(char **cmdline_p) paging_init(); request_standard_resources(); - efi_idmap_init(); - unflatten_device_tree(); psci_init();