[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20181024193256.23734-3-f.fainelli@gmail.com>
Date: Wed, 24 Oct 2018 12:32:56 -0700
From: Florian Fainelli <f.fainelli@...il.com>
To: linux-kernel@...r.kernel.org
Cc: Florian Fainelli <f.fainelli@...il.com>,
Catalin Marinas <catalin.marinas@....com>,
Will Deacon <will.deacon@....com>,
Arnd Bergmann <arnd@...db.de>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Marc Zyngier <marc.zyngier@....com>,
Olof Johansson <olof@...om.net>,
linux-alpha@...r.kernel.org (open list:ALPHA PORT),
linux-snps-arc@...ts.infradead.org (open list:SYNOPSYS ARC ARCHITECTURE),
linux-arm-kernel@...ts.infradead.org (moderated list:ARM PORT),
linux-c6x-dev@...ux-c6x.org (open list:C6X ARCHITECTURE),
uclinux-h8-devel@...ts.sourceforge.jp (moderated list:H8/300
ARCHITECTURE),
linux-hexagon@...r.kernel.org (open list:QUALCOMM HEXAGON ARCHITECTURE),
linux-ia64@...r.kernel.org (open list:IA64 (Itanium) PLATFORM),
linux-m68k@...ts.linux-m68k.org (open list:M68K ARCHITECTURE),
linux-mips@...ux-mips.org (open list:MIPS),
nios2-dev@...ts.rocketboards.org (moderated list:NIOS2 ARCHITECTURE),
openrisc@...ts.librecores.org (open list:OPENRISC ARCHITECTURE),
linux-parisc@...r.kernel.org (open list:PARISC ARCHITECTURE),
linuxppc-dev@...ts.ozlabs.org (open list:LINUX FOR POWERPC (32-BIT AND
64-BIT)),
linux-riscv@...ts.infradead.org (open list:RISC-V ARCHITECTURE),
linux-s390@...r.kernel.org (open list:S390),
linux-sh@...r.kernel.org (open list:SUPERH),
sparclinux@...r.kernel.org (open list:SPARC + UltraSPARC
(sparc/sparc64)),
linux-um@...ts.infradead.org (open list:USER-MODE LINUX (UML)),
linux-xtensa@...ux-xtensa.org (open list:TENSILICA XTENSA PORT (xtensa)),
devicetree@...r.kernel.org (open list:OPEN FIRMWARE AND FLATTENED
DEVICE TREE),
linux-arch@...r.kernel.org (open list:GENERIC INCLUDE/ASM HEADER FILES)
Subject: [PATCH v2 2/2] arm64: Create asm/initrd.h
ARM64 is the only architecture that requires a re-definition of
__early_init_dt_declare_initrd(). Now that we added the infrastructure
in asm-generic to provide an asm/initrd.h file, properly break up that
definition from asm/memory.h and make use of that header in
drivers/of/fdt.c where this is used.
This significantly cuts the number of objects that need to be rebuilt on
ARM64 due to the repercusions of including asm/memory.h in several
places.
Signed-off-by: Florian Fainelli <f.fainelli@...il.com>
---
arch/arm64/include/asm/initrd.h | 13 +++++++++++++
arch/arm64/include/asm/memory.h | 8 --------
drivers/of/fdt.c | 1 +
3 files changed, 14 insertions(+), 8 deletions(-)
create mode 100644 arch/arm64/include/asm/initrd.h
diff --git a/arch/arm64/include/asm/initrd.h b/arch/arm64/include/asm/initrd.h
new file mode 100644
index 000000000000..0c9572485810
--- /dev/null
+++ b/arch/arm64/include/asm/initrd.h
@@ -0,0 +1,13 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#ifndef __ASM_INITRD_H
+#define __ASM_INITRD_H
+
+#ifdef CONFIG_BLK_DEV_INITRD
+#define __early_init_dt_declare_initrd(__start, __end) \
+ do { \
+ initrd_start = (__start); \
+ initrd_end = (__end); \
+ } while (0)
+#endif
+
+#endif /* __ASM_INITRD_H */
diff --git a/arch/arm64/include/asm/memory.h b/arch/arm64/include/asm/memory.h
index b96442960aea..dc3ca21ba240 100644
--- a/arch/arm64/include/asm/memory.h
+++ b/arch/arm64/include/asm/memory.h
@@ -168,14 +168,6 @@
#define IOREMAP_MAX_ORDER (PMD_SHIFT)
#endif
-#ifdef CONFIG_BLK_DEV_INITRD
-#define __early_init_dt_declare_initrd(__start, __end) \
- do { \
- initrd_start = (__start); \
- initrd_end = (__end); \
- } while (0)
-#endif
-
#ifndef __ASSEMBLY__
#include <linux/bitops.h>
diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c
index 800ad252cf9c..4e4711af907b 100644
--- a/drivers/of/fdt.c
+++ b/drivers/of/fdt.c
@@ -28,6 +28,7 @@
#include <asm/setup.h> /* for COMMAND_LINE_SIZE */
#include <asm/page.h>
+#include <asm/initrd.h>
#include "of_private.h"
--
2.17.1
Powered by blists - more mailing lists