Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753300AbeAEXhh (ORCPT + 1 other); Fri, 5 Jan 2018 18:37:37 -0500 Received: from mail-pl0-f66.google.com ([209.85.160.66]:37519 "EHLO mail-pl0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752370AbeAEXhZ (ORCPT ); Fri, 5 Jan 2018 18:37:25 -0500 X-Google-Smtp-Source: ACJfBovPRm67F6nncBC8q1nnifnDOhr9kFCBf1vBiCMIL9ZU0GgTQz/E+kFs/PtKUkE97nU1eJeuTg== Subject: [PATCH 2/2] RISC-V: Remove mem_end command line processing Date: Fri, 5 Jan 2018 15:35:49 -0800 Message-Id: <20180105233549.15117-2-palmer@sifive.com> X-Mailer: git-send-email 2.13.6 In-Reply-To: <20180105233549.15117-1-palmer@sifive.com> References: <20180105233549.15117-1-palmer@sifive.com> Cc: patches@groups.riscv.org, Palmer Dabbelt From: Palmer Dabbelt To: linux-kernel@vger.kernel.org Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: This is just some cruft left over from before the port converted to device tree. The right way to handle memory regions is to specify them in the device tree, which BBL (our simplest bootloader) is already capable of doing. This patch simply removes the cruft. Signed-off-by: Palmer Dabbelt --- arch/riscv/kernel/setup.c | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/arch/riscv/kernel/setup.c b/arch/riscv/kernel/setup.c index a548ccf48024..c6d095ff5ab8 100644 --- a/arch/riscv/kernel/setup.c +++ b/arch/riscv/kernel/setup.c @@ -149,25 +149,6 @@ void __init sbi_save(unsigned int hartid, void *dtb) early_init_dt_scan(__va(dtb)); } -/* - * Allow the user to manually add a memory region (in case DTS is broken); - * "mem_end=nn[KkMmGg]" - */ -static int __init mem_end_override(char *p) -{ - resource_size_t base, end; - - if (!p) - return -EINVAL; - base = (uintptr_t) __pa(PAGE_OFFSET); - end = memparse(p, &p) & PMD_MASK; - if (end == 0) - return -EINVAL; - memblock_add(base, end - base); - return 0; -} -early_param("mem_end", mem_end_override); - static void __init setup_bootmem(void) { struct memblock_region *reg; -- 2.13.6