linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/2] arm64: Cut rebuild time when changing CONFIG_BLK_DEV_INITRD
@ 2018-10-24 19:32 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
                   ` (2 more replies)
  0 siblings, 3 replies; 15+ messages in thread
From: Florian Fainelli @ 2018-10-24 19:32 UTC (permalink / raw)
  To: linux-kernel
  Cc: Florian Fainelli, Catalin Marinas, Will Deacon, Arnd Bergmann,
	Greg Kroah-Hartman, Marc Zyngier, Olof Johansson,
	open list:ALPHA PORT, open list:SYNOPSYS ARC ARCHITECTURE,
	moderated list:ARM PORT, open list:C6X ARCHITECTURE,
	moderated list:H8/300 ARCHITECTURE,
	open list:QUALCOMM HEXAGON ARCHITECTURE,
	open list:IA64 (Itanium) PLATFORM, open list:M68K ARCHITECTURE,
	open list:MIPS, moderated list:NIOS2 ARCHITECTURE,
	open list:OPENRISC ARCHITECTURE, open list:PARISC ARCHITECTURE,
	open list:LINUX FOR POWERPC (32-BIT AND 64-BIT),
	open list:RISC-V ARCHITECTURE, open list:S390, open list:SUPERH,
	open list:SPARC + UltraSPARC (sparc/sparc64),
	open list:USER-MODE LINUX (UML),
	open list:TENSILICA XTENSA PORT (xtensa),
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE,
	open list:GENERIC INCLUDE/ASM HEADER FILES

Hi all,

While investigating why ARM64 required a ton of objects to be rebuilt
when toggling CONFIG_DEV_BLK_INITRD, it became clear that this was
because we define __early_init_dt_declare_initrd() differently and we do
that in arch/arm64/include/asm/memory.h which gets included by a fair
amount of other header files, and translation units as well.

Changing the value of CONFIG_DEV_BLK_INITRD is a common thing with build
systems that generate two kernels: one with the initramfs and one
without. buildroot is one of these build systems, OpenWrt is also
another one that does this.

This patch series proposes adding an empty initrd.h to satisfy the need
for drivers/of/fdt.c to unconditionally include that file, and moves the
custom __early_init_dt_declare_initrd() definition away from
asm/memory.h

This cuts the number of objects rebuilds from 1920 down to 26, so a
factor 73 approximately.

Apologies for the long CC list, please let me know how you would go
about merging that and if another approach would be preferable, e.g:
introducing a CONFIG_ARCH_INITRD_BELOW_START_OK Kconfig option or
something like that.

Changes in v2:

- put an /* empty */ comment in the asm-generic/initrd.h file
- trim down the CC list to maximize the chances of people receiving this

Florian Fainelli (2):
  arch: Add asm-generic/initrd.h and make use of it for most
    architectures
  arm64: Create asm/initrd.h

 arch/alpha/include/asm/Kbuild      |  1 +
 arch/arc/include/asm/Kbuild        |  1 +
 arch/arm/include/asm/Kbuild        |  1 +
 arch/arm64/include/asm/initrd.h    | 13 +++++++++++++
 arch/arm64/include/asm/memory.h    |  8 --------
 arch/c6x/include/asm/Kbuild        |  1 +
 arch/h8300/include/asm/Kbuild      |  1 +
 arch/hexagon/include/asm/Kbuild    |  1 +
 arch/ia64/include/asm/Kbuild       |  1 +
 arch/m68k/include/asm/Kbuild       |  1 +
 arch/microblaze/include/asm/Kbuild |  1 +
 arch/mips/include/asm/Kbuild       |  1 +
 arch/nds32/include/asm/Kbuild      |  1 +
 arch/nios2/include/asm/Kbuild      |  1 +
 arch/openrisc/include/asm/Kbuild   |  1 +
 arch/parisc/include/asm/Kbuild     |  1 +
 arch/powerpc/include/asm/Kbuild    |  1 +
 arch/riscv/include/asm/Kbuild      |  1 +
 arch/s390/include/asm/Kbuild       |  1 +
 arch/sh/include/asm/Kbuild         |  1 +
 arch/sparc/include/asm/Kbuild      |  1 +
 arch/um/include/asm/Kbuild         |  1 +
 arch/unicore32/include/asm/Kbuild  |  1 +
 arch/x86/include/asm/Kbuild        |  1 +
 arch/xtensa/include/asm/Kbuild     |  1 +
 drivers/of/fdt.c                   |  1 +
 include/asm-generic/initrd.h       |  1 +
 27 files changed, 38 insertions(+), 8 deletions(-)
 create mode 100644 arch/arm64/include/asm/initrd.h
 create mode 100644 include/asm-generic/initrd.h

-- 
2.17.1


^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2018-10-26 19:05 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 ` [PATCH v2 2/2] arm64: Create asm/initrd.h Florian Fainelli
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

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).