linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Florian Fainelli <f.fainelli@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: Florian Fainelli <f.fainelli@gmail.com>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Will Deacon <will.deacon@arm.com>, Arnd Bergmann <arnd@arndb.de>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Marc Zyngier <marc.zyngier@arm.com>,
	Olof Johansson <olof@lixom.net>,
	linux-alpha@vger.kernel.org (open list:ALPHA PORT),
	linux-snps-arc@lists.infradead.org (open list:SYNOPSYS ARC
	ARCHITECTURE),
	linux-arm-kernel@lists.infradead.org (moderated list:ARM PORT),
	linux-c6x-dev@linux-c6x.org (open list:C6X ARCHITECTURE),
	uclinux-h8-devel@lists.sourceforge.jp (moderated list:H8/300
	ARCHITECTURE),
	linux-hexagon@vger.kernel.org (open list:QUALCOMM HEXAGON
	ARCHITECTURE),
	linux-ia64@vger.kernel.org (open list:IA64 (Itanium) PLATFORM),
	linux-m68k@lists.linux-m68k.org (open list:M68K ARCHITECTURE),
	linux-mips@linux-mips.org (open list:MIPS),
	nios2-dev@lists.rocketboards.org (moderated list:NIOS2
	ARCHITECTURE),
	openrisc@lists.librecores.org (open list:OPENRISC ARCHITECTURE),
	linux-parisc@vger.kernel.org (open list:PARISC ARCHITECTURE),
	linuxppc-dev@lists.ozlabs.org (open list:LINUX FOR POWERPC
	(32-BIT AND 64-BIT)),
	linux-riscv@lists.infradead.org (open list:RISC-V ARCHITECTURE),
	linux-s390@vger.kernel.org (open list:S390),
	linux-sh@vger.kernel.org (open list:SUPERH),
	sparclinux@vger.kernel.org (open list:SPARC + UltraSPARC
	(sparc/sparc64)),
	linux-um@lists.infradead.org (open list:USER-MODE LINUX (UML)),
	linux-xtensa@linux-xtensa.org (open list:TENSILICA XTENSA PORT
	(xtensa)),
	devicetree@vger.kernel.org (open list:OPEN FIRMWARE AND
	FLATTENED DEVICE TREE),
	linux-arch@vger.kernel.org (open list:GENERIC INCLUDE/ASM HEADER
	FILES)
Subject: [PATCH v2 2/2] arm64: Create asm/initrd.h
Date: Wed, 24 Oct 2018 12:32:56 -0700	[thread overview]
Message-ID: <20181024193256.23734-3-f.fainelli@gmail.com> (raw)
In-Reply-To: <20181024193256.23734-1-f.fainelli@gmail.com>

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

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


  parent reply	other threads:[~2018-10-24 19:33 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-24 19:32 [PATCH v2 0/2] arm64: Cut rebuild time when changing CONFIG_BLK_DEV_INITRD Florian Fainelli
2018-10-24 19:32 ` [PATCH v2 1/2] arch: Add asm-generic/initrd.h and make use of it for most architectures Florian Fainelli
2018-10-24 19:32 ` Florian Fainelli [this message]
2018-10-24 19:55 ` [PATCH v2 0/2] arm64: Cut rebuild time when changing CONFIG_BLK_DEV_INITRD Rob Herring
2018-10-24 20:01   ` Florian Fainelli
2018-10-24 21:25     ` Rob Herring
2018-10-25  9:38   ` Mike Rapoport
2018-10-25  9:51     ` Russell King - ARM Linux
2018-10-25 13:15     ` Rob Herring
2018-10-25 17:29       ` Mike Rapoport
2018-10-25 21:13         ` Rob Herring
2018-10-25 23:07           ` Florian Fainelli
2018-10-26 11:07             ` Mike Rapoport
2018-10-26 19:05               ` Florian Fainelli
2018-10-26  8:12           ` Mike Rapoport

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181024193256.23734-3-f.fainelli@gmail.com \
    --to=f.fainelli@gmail.com \
    --cc=arnd@arndb.de \
    --cc=catalin.marinas@arm.com \
    --cc=devicetree@vger.kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-alpha@vger.kernel.org \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-c6x-dev@linux-c6x.org \
    --cc=linux-hexagon@vger.kernel.org \
    --cc=linux-ia64@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-m68k@lists.linux-m68k.org \
    --cc=linux-mips@linux-mips.org \
    --cc=linux-parisc@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=linux-sh@vger.kernel.org \
    --cc=linux-snps-arc@lists.infradead.org \
    --cc=linux-um@lists.infradead.org \
    --cc=linux-xtensa@linux-xtensa.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=marc.zyngier@arm.com \
    --cc=nios2-dev@lists.rocketboards.org \
    --cc=olof@lixom.net \
    --cc=openrisc@lists.librecores.org \
    --cc=sparclinux@vger.kernel.org \
    --cc=uclinux-h8-devel@lists.sourceforge.jp \
    --cc=will.deacon@arm.com \
    --subject='Re: [PATCH v2 2/2] arm64: Create asm/initrd.h' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).