From patchwork Tue Feb 2 17:56:42 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 61038 Delivered-To: patch@linaro.org Received: by 10.112.130.2 with SMTP id oa2csp884853lbb; Tue, 2 Feb 2016 09:58:38 -0800 (PST) X-Received: by 10.98.18.15 with SMTP id a15mr16247960pfj.145.1454435918404; Tue, 02 Feb 2016 09:58:38 -0800 (PST) Return-Path: Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id r79si3184452pfb.75.2016.02.02.09.58.38 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 02 Feb 2016 09:58:38 -0800 (PST) Received-SPF: pass (google.com: domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) client-ip=2001:1868:205::9; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) smtp.mailfrom=linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org; dkim=neutral (body hash did not verify) header.i=@linaro.org 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 1aQfCx-0005uH-Ep; Tue, 02 Feb 2016 17:57:43 +0000 Received: from mail-wm0-x22b.google.com ([2a00:1450:400c:c09::22b]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1aQfCV-0005jM-Sm for linux-arm-kernel@lists.infradead.org; Tue, 02 Feb 2016 17:57:17 +0000 Received: by mail-wm0-x22b.google.com with SMTP id l66so34754793wml.0 for ; Tue, 02 Feb 2016 09:56:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=6dzURKh5fUGZvWM/ev9fnR3R04BME7C4H3/loNcNzbI=; b=PjxEvZ+JLBWdjnm6w/yrQQgySo1yu99/duP40sk6t6f1U/SFk8JQ+nuYd0vpRAcN4y 2dUG6y3FnyJdOxLLo+xtwSwbo181DmUrOhadh5B5gCkDbo+Ifecw4MeLhwvnCXyDyArq aB55Cz/GRaPwWrUgO8htM5aP2f/6us4kQDCBg= 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=6dzURKh5fUGZvWM/ev9fnR3R04BME7C4H3/loNcNzbI=; b=hrZY+i1HBxhkgZAHV5UmcMr/Dx9WjA6TuzIZbmIXwFQiTbUWH+Fze6h5bxWakfkuec Jvd+3qftdAJCwEyRnPsIENAwn1dNqrhsrLlIVrHtP829UMsQAE0wcVVHcbs31vYtElnD 4FzCLwJDJXwIU5AThRGhIXBeWoKfJRugnhxgtfhX88VxSWCdSKgLBGeGNDCvmRPiWbfP 4/UmVJRUPZKgYIzJ4PlLgbJASwN3Ht10myMknlpMWUIRHXijqnA4klZ82sqUnBO9A1AC hi7Gx72FKMv33nHTAF5VafQawZCn1wDYuA/JTrDXfYulTmvYi0sPfv/IbYlwRVX0snGS Fcpg== X-Gm-Message-State: AG10YOSk2zfzSpa6nNNQGoZN0lGactrY304/4tNXju4n7yUwnlOp5ECCrFpPWhXBtCc7Eh67 X-Received: by 10.194.192.198 with SMTP id hi6mr30055264wjc.141.1454435814372; Tue, 02 Feb 2016 09:56:54 -0800 (PST) Received: from localhost.localdomain ([195.55.142.58]) by smtp.gmail.com with ESMTPSA id z127sm17556513wme.2.2016.02.02.09.56.52 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 02 Feb 2016 09:56:53 -0800 (PST) From: Ard Biesheuvel To: msalter@redhat.com, will.deacon@arm.com, linux-arm-kernel@lists.infradead.org Subject: [RFC PATCH 3/3] arm64: remove the now unneeded relocate_initrd() Date: Tue, 2 Feb 2016 18:56:42 +0100 Message-Id: <1454435802-7604-4-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1454435802-7604-1-git-send-email-ard.biesheuvel@linaro.org> References: <1454435802-7604-1-git-send-email-ard.biesheuvel@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160202_095716_169934_504D5826 X-CRM114-Status: GOOD ( 13.08 ) X-Spam-Score: -2.7 (--) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-2.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [2a00:1450:400c:c09:0:0:0:22b listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Ard Biesheuvel MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org Signed-off-by: Ard Biesheuvel --- arch/arm64/kernel/setup.c | 64 -------------------- 1 file changed, 64 deletions(-) -- 2.5.0 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel diff --git a/arch/arm64/kernel/setup.c b/arch/arm64/kernel/setup.c index 8119479147db..1a8ef35b03d4 100644 --- a/arch/arm64/kernel/setup.c +++ b/arch/arm64/kernel/setup.c @@ -223,69 +223,6 @@ static void __init request_standard_resources(void) } } -#ifdef CONFIG_BLK_DEV_INITRD -/* - * Relocate initrd if it is not completely within the linear mapping. - * This would be the case if mem= cuts out all or part of it. - */ -static void __init relocate_initrd(void) -{ - phys_addr_t orig_start = __virt_to_phys(initrd_start); - phys_addr_t orig_end = __virt_to_phys(initrd_end); - phys_addr_t ram_end = memblock_end_of_DRAM(); - phys_addr_t new_start; - unsigned long size, to_free = 0; - void *dest; - - if (orig_end <= ram_end) - return; - - /* - * Any of the original initrd which overlaps the linear map should - * be freed after relocating. - */ - if (orig_start < ram_end) - to_free = ram_end - orig_start; - - size = orig_end - orig_start; - if (!size) - return; - - /* initrd needs to be relocated completely inside linear mapping */ - new_start = memblock_find_in_range(0, PFN_PHYS(max_pfn), - size, PAGE_SIZE); - if (!new_start) - panic("Cannot relocate initrd of size %ld\n", size); - memblock_reserve(new_start, size); - - initrd_start = __phys_to_virt(new_start); - initrd_end = initrd_start + size; - - pr_info("Moving initrd from [%llx-%llx] to [%llx-%llx]\n", - orig_start, orig_start + size - 1, - new_start, new_start + size - 1); - - dest = (void *)initrd_start; - - if (to_free) { - memcpy(dest, (void *)__phys_to_virt(orig_start), to_free); - dest += to_free; - } - - copy_from_early_mem(dest, orig_start + to_free, size - to_free); - - if (to_free) { - pr_info("Freeing original RAMDISK from [%llx-%llx]\n", - orig_start, orig_start + to_free - 1); - memblock_free(orig_start, to_free); - } -} -#else -static inline void __init relocate_initrd(void) -{ -} -#endif - u64 __cpu_logical_map[NR_CPUS] = { [0 ... NR_CPUS-1] = INVALID_HWID }; void __init setup_arch(char **cmdline_p) @@ -320,7 +257,6 @@ void __init setup_arch(char **cmdline_p) acpi_boot_table_init(); paging_init(); - relocate_initrd(); kasan_init();