From 0fbc0b67a89d756ae3a839be01440e54348159a0 Mon Sep 17 00:00:00 2001 From: Rob Herring Date: Fri, 5 Jan 2018 16:09:38 -0600 Subject: cris: remove arch specific early DT functions Now that the DT core code handles bootmem arches, we can remove the cris specific early_init_dt_alloc_memory_arch function. As the default early_init_dt_add_memory_arch just does a WARN, we can just remove the entire devicetree.c file. Cc: Mikael Starvik Cc: Jesper Nilsson Cc: linux-cris-kernel@axis.com Signed-off-by: Rob Herring --- arch/cris/kernel/Makefile | 19 ------------------- arch/cris/kernel/devicetree.c | 15 --------------- 2 files changed, 34 deletions(-) delete mode 100644 arch/cris/kernel/devicetree.c (limited to 'arch') diff --git a/arch/cris/kernel/Makefile b/arch/cris/kernel/Makefile index af075a5fb9aa..e69de29bb2d1 100644 --- a/arch/cris/kernel/Makefile +++ b/arch/cris/kernel/Makefile @@ -1,19 +0,0 @@ -# SPDX-License-Identifier: GPL-2.0 -# $Id: Makefile,v 1.12 2004/10/19 13:07:43 starvik Exp $ -# -# Makefile for the linux kernel. -# - -CPPFLAGS_vmlinux.lds := -DDRAM_VIRTUAL_BASE=0x$(CONFIG_ETRAX_DRAM_VIRTUAL_BASE) -extra-y := vmlinux.lds - -obj-y := process.o traps.o irq.o ptrace.o setup.o time.o sys_cris.o -obj-y += devicetree.o -obj-y += stacktrace.o - -obj-$(CONFIG_MODULES) += crisksyms.o -obj-$(CONFIG_MODULES) += module.o -obj-$(CONFIG_SYSTEM_PROFILER) += profile.o - -clean: - diff --git a/arch/cris/kernel/devicetree.c b/arch/cris/kernel/devicetree.c deleted file mode 100644 index 36e1c658229f..000000000000 --- a/arch/cris/kernel/devicetree.c +++ /dev/null @@ -1,15 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0 -#include -#include -#include - -void __init early_init_dt_add_memory_arch(u64 base, u64 size) -{ - pr_err("%s(%llx, %llx)\n", - __func__, base, size); -} - -void * __init early_init_dt_alloc_memory_arch(u64 size, u64 align) -{ - return alloc_bootmem_align(size, align); -} -- cgit From ac94f18f6636d45a7d78f74d2a741d038d0f8c10 Mon Sep 17 00:00:00 2001 From: Rob Herring Date: Fri, 5 Jan 2018 16:10:24 -0600 Subject: metag: remove arch specific early DT functions Now that the DT core code handles bootmem arches, we can remove the metag specific early_init_dt_alloc_memory_arch function. As the default early_init_dt_add_memory_arch just does a WARN, we can remove it too. Cc: James Hogan Cc: linux-metag@vger.kernel.org Signed-off-by: Rob Herring --- arch/metag/kernel/devtree.c | 14 -------------- 1 file changed, 14 deletions(-) (limited to 'arch') diff --git a/arch/metag/kernel/devtree.c b/arch/metag/kernel/devtree.c index 18dd7aea9fdc..6af749a64438 100644 --- a/arch/metag/kernel/devtree.c +++ b/arch/metag/kernel/devtree.c @@ -14,26 +14,12 @@ #include #include #include -#include -#include -#include #include #include #include #include -void __init early_init_dt_add_memory_arch(u64 base, u64 size) -{ - pr_err("%s(%llx, %llx)\n", - __func__, base, size); -} - -void * __init early_init_dt_alloc_memory_arch(u64 size, u64 align) -{ - return alloc_bootmem_align(size, align); -} - static const void * __init arch_get_next_mach(const char *const **match) { static const struct machine_desc *mdesc = __arch_info_begin; -- cgit From a518a04eb0f5be616eebff567611e1fd9692b995 Mon Sep 17 00:00:00 2001 From: Rob Herring Date: Fri, 5 Jan 2018 16:11:26 -0600 Subject: mips: remove arch specific early_init_dt_alloc_memory_arch Now that the DT core code handles bootmem arches, we can remove the MIPS specific early_init_dt_alloc_memory_arch function. Cc: Ralf Baechle Cc: linux-mips@linux-mips.org Signed-off-by: Rob Herring --- arch/mips/kernel/prom.c | 5 ----- 1 file changed, 5 deletions(-) (limited to 'arch') diff --git a/arch/mips/kernel/prom.c b/arch/mips/kernel/prom.c index 0dbcd152a1a9..89950b7bf536 100644 --- a/arch/mips/kernel/prom.c +++ b/arch/mips/kernel/prom.c @@ -44,11 +44,6 @@ void __init early_init_dt_add_memory_arch(u64 base, u64 size) return add_memory_region(base, size, BOOT_MEM_RAM); } -void * __init early_init_dt_alloc_memory_arch(u64 size, u64 align) -{ - return __alloc_bootmem(size, align, __pa(MAX_DMA_ADDRESS)); -} - int __init early_init_dt_reserve_memory_arch(phys_addr_t base, phys_addr_t size, bool nomap) { -- cgit From f7a6e01c8c90596c1871c9fae22e498cbf1c73a1 Mon Sep 17 00:00:00 2001 From: Rob Herring Date: Fri, 5 Jan 2018 16:11:49 -0600 Subject: nios2: remove arch specific early_init_dt_alloc_memory_arch Now that the DT core code handles bootmem arches, we can remove the nios2 specific early_init_dt_alloc_memory_arch function. Cc: Ley Foon Tan Cc: nios2-dev@lists.rocketboards.org Reviewed-by: Tobias Klauser Signed-off-by: Rob Herring --- arch/nios2/kernel/prom.c | 5 ----- 1 file changed, 5 deletions(-) (limited to 'arch') diff --git a/arch/nios2/kernel/prom.c b/arch/nios2/kernel/prom.c index 6688576b3a47..8d7446a4b475 100644 --- a/arch/nios2/kernel/prom.c +++ b/arch/nios2/kernel/prom.c @@ -42,11 +42,6 @@ void __init early_init_dt_add_memory_arch(u64 base, u64 size) } -void * __init early_init_dt_alloc_memory_arch(u64 size, u64 align) -{ - return alloc_bootmem_align(size, align); -} - int __init early_init_dt_reserve_memory_arch(phys_addr_t base, phys_addr_t size, bool nomap) { -- cgit From b75e250a90519c6ebecc15d23dfc693f8a725181 Mon Sep 17 00:00:00 2001 From: Rob Herring Date: Fri, 5 Jan 2018 16:14:00 -0600 Subject: x86: remove arch specific early_init_dt_alloc_memory_arch Now that the DT core code handles bootmem arches, we can remove the x86 specific early_init_dt_alloc_memory_arch function. Cc: Thomas Gleixner Cc: Ingo Molnar Cc: "H. Peter Anvin" Cc: x86@kernel.org Signed-off-by: Rob Herring --- arch/x86/kernel/devicetree.c | 6 ------ 1 file changed, 6 deletions(-) (limited to 'arch') diff --git a/arch/x86/kernel/devicetree.c b/arch/x86/kernel/devicetree.c index 76e07698e6d1..25de5f6ca997 100644 --- a/arch/x86/kernel/devicetree.c +++ b/arch/x86/kernel/devicetree.c @@ -2,7 +2,6 @@ /* * Architecture specific OF callbacks. */ -#include #include #include #include @@ -39,11 +38,6 @@ void __init early_init_dt_add_memory_arch(u64 base, u64 size) BUG(); } -void * __init early_init_dt_alloc_memory_arch(u64 size, u64 align) -{ - return __alloc_bootmem(size, align, __pa(MAX_DMA_ADDRESS)); -} - void __init add_dtb(u64 data) { initial_dtb = data + offsetof(struct setup_data, data); -- cgit From 3a6fbcb2e2e4b263df1cc8647ce1858c57ddc805 Mon Sep 17 00:00:00 2001 From: Rob Herring Date: Fri, 5 Jan 2018 16:18:35 -0600 Subject: xtensa: remove arch specific early DT functions Now that the DT core code handles bootmem arches, we can remove the xtensa specific early_init_dt_alloc_memory_arch function. The common early_init_dt_add_memory_arch can be used too now that xtensa switched to memblock. Cc: Chris Zankel Cc: linux-xtensa@linux-xtensa.org Acked-by: Max Filippov Signed-off-by: Rob Herring --- arch/xtensa/kernel/setup.c | 12 ------------ 1 file changed, 12 deletions(-) (limited to 'arch') diff --git a/arch/xtensa/kernel/setup.c b/arch/xtensa/kernel/setup.c index 08175df7a69e..82bd1a94157c 100644 --- a/arch/xtensa/kernel/setup.c +++ b/arch/xtensa/kernel/setup.c @@ -20,7 +20,6 @@ #include #include #include -#include #include #include #include @@ -218,17 +217,6 @@ static int __init xtensa_dt_io_area(unsigned long node, const char *uname, } #endif -void __init early_init_dt_add_memory_arch(u64 base, u64 size) -{ - size &= PAGE_MASK; - memblock_add(base, size); -} - -void * __init early_init_dt_alloc_memory_arch(u64 size, u64 align) -{ - return __alloc_bootmem(size, align, 0); -} - void __init early_init_devtree(void *params) { early_init_dt_scan(params); -- cgit