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: 5570161 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 66E889F4DC for ; Mon, 5 Jan 2015 18:37:13 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 83A76201B4 for ; Mon, 5 Jan 2015 18:37:12 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A1B5C20176 for ; Mon, 5 Jan 2015 18:37:11 +0000 (UTC) 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-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=QG3DWp3eAXVT+bVrRDlzlbIhHDoS1WMXo7O2o9tTFD0=; b=GgdNf/Mf8doyq91Ons5AtIxvRVv2T5tice66UfFRXNA+/zQD9KNOY96J8pUEj92WuT xYlBFq7u0JuW5wiF/QJMEeinepRu3JwmevYDJThGSW+gA1Q6ssYJ803CpR8iQxva9trZ VnE/lVQkpLEkrxiMuqJ65ss4TbeT5h5Unj74TGaaclvweDJZrEmhTWsJGheK0RDJ9eTv LhKfh7wqmBrj3w/R7DncRiA1zRTdMiAA1wdrPJUFgZ6Mx4EJz2QopKeXk1uHO6Vq9qCb cKmaGfZ6QHO0TSFEZJWhjKMfDtq8hYXybdPQH/MVfJpevowy7MemJwonuGaZsVQyn+Iy LqMg== X-Gm-Message-State: ALoCoQndkMCZdvZHXAChEenAiwYBDMZ1hjoFXdj5UrZqV+HujPy/adxsha0Uvxgmi3XGLkx30bz+ 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 (/) 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+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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();