new file mode 100644
@@ -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 */
@@ -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>
@@ -28,6 +28,7 @@
#include <asm/setup.h> /* for COMMAND_LINE_SIZE */
#include <asm/page.h>
+#include <asm/initrd.h>
#include "of_private.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@gmail.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