From patchwork Tue Oct 23 23:40:41 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Fainelli X-Patchwork-Id: 988563 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 42g6915wSTz9sCt for ; Wed, 24 Oct 2018 21:35:33 +1100 (AEDT) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="JZ1FQW2s"; dkim-atps=neutral Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 42g6914H8CzDrK4 for ; Wed, 24 Oct 2018 21:35:33 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="JZ1FQW2s"; dkim-atps=neutral X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gmail.com (client-ip=2607:f8b0:4864:20::643; helo=mail-pl1-x643.google.com; envelope-from=f.fainelli@gmail.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="JZ1FQW2s"; dkim-atps=neutral Received: from mail-pl1-x643.google.com (mail-pl1-x643.google.com [IPv6:2607:f8b0:4864:20::643]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 42fqdw31rkzDrL3 for ; Wed, 24 Oct 2018 10:41:08 +1100 (AEDT) Received: by mail-pl1-x643.google.com with SMTP id bh10-v6so1361059plb.4 for ; Tue, 23 Oct 2018 16:41:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=7OS2r3euy1TczlyR46QbFm62nalquqEBBOjTowUcAkM=; b=JZ1FQW2sjznoZVhwKxRvzGXbACgNDowsPsyxlWZVVG7INAURVS5jcxx915CmrAtFRB 8hWt+dLKEAVaszN//gmUjAYoT7FDyiMui97wYDmRNVObbg407myVHSOQQZ2tzM6HKXjZ mHfpSVcF4JVoAjUiAlqOz8+OgLkgiyNTMN4slZ2nQdl2qnD25v68X/twk29GWgHctS5W xnYbKMErl9Jjcz+rWWWrl4jqwHUvFwF5J4+jg0wCCfi+5wfY10suO+glJ/huiOk8gQQR VFWKT2AnmDQl75D4iT3d+hUeGJI3o/5MTq/bf6m/xNvsxIAEvup7H34zIhNHpVjgjKte er4Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=7OS2r3euy1TczlyR46QbFm62nalquqEBBOjTowUcAkM=; b=OLJDx8uoHZNYK/Tr+lHBTiHL4BDWcGa5h7dakfjxQAkY2XfdDMP4+2r3krnn63KfM8 MWXcMaTBxUT0j27jBu5s9od/0bgFC06Ll4gx5Fwvae0iNn3t1ncFut+Y1d3jeyYNPo7w OT0y/uUB+svVf2LbHubnznZeeVx8wHal1QfHJN8++9nMXne+H4PKNSAlfZmtXSSvi/zY gM94ZEm+dgUxPeG7AzYTgRz+s1uxso/XYx53hY9NHie9ztBj+1RmwK5XFVApHntV78MW TydVDKhEdh2yU/gWqJ9THsXZAYLW6Zt9L6tlhK+1+BAUv+eA2h3dxUT1gurEClwW5haP adlg== X-Gm-Message-State: AGRZ1gLaYKLAbvla6rOMLuphLb1LCe5n7kitgsTfoHhasKnY+jYcIO8Q XCNK+zytQe4TdoBADsM1Su4= X-Google-Smtp-Source: AJdET5fBJhLb6MQXskYp1eO10D2a24G6cKuepRaM3H/nhlH771jer1HqF14MUwzRYB/YVHWQB+Kq3Q== X-Received: by 2002:a17:902:6e08:: with SMTP id u8-v6mr162695plk.64.1540338065703; Tue, 23 Oct 2018 16:41:05 -0700 (PDT) Received: from fainelli-desktop.igp.broadcom.net ([192.19.223.250]) by smtp.gmail.com with ESMTPSA id a5-v6sm3041223pfo.53.2018.10.23.16.41.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 23 Oct 2018 16:41:04 -0700 (PDT) From: Florian Fainelli To: linux-kernel@vger.kernel.org Subject: [PATCH 0/2] arm64: Cut rebuild time when changing CONFIG_BLK_DEV_INITRD Date: Tue, 23 Oct 2018 16:40:41 -0700 Message-Id: <20181023234044.1138-1-f.fainelli@gmail.com> X-Mailer: git-send-email 2.17.1 X-Mailman-Approved-At: Wed, 24 Oct 2018 21:33:24 +1100 X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "open list:MIPS" , Alan Kao , "open list:SUPERH" , Will Deacon , Paul Mackerras , "open list:GENERIC INCLUDE/ASM HEADER FILES" , "James E.J. Bottomley" , Geert Uytterhoeven , Catalin Marinas , Matt Turner , "moderated list:H8/300 ARCHITECTURE" , Marc Zyngier , "open list:USER-MODE LINUX UML" , Thomas Gleixner , Richard Henderson , Matt Redfearn , Greg Kroah-Hartman , Ralf Baechle , Richard Kuo , Paul Burton , Andrew Morton , "open list:IA64 Itanium PLATFORM" , James Hogan , Palmer Dabbelt , Max Filippov , Deepa Dinamani , Vincent Chen , "open list:S390" , "open list:C6X ARCHITECTURE" , Yoshinori Sato , "open list:QUALCOMM HEXAGON ARCHITECTURE" , Helge Deller , Jan Henrik Weinstock , Andrey Ryabinin , "open list:TENSILICA XTENSA PORT xtensa" , Jessica Yu , Philippe Ombredanne , Aurelien Jacquiot , "open list:M68K ARCHITECTURE" , Stafford Horne , linux-arm-kernel@lists.infradead.org, Chris Zankel , Tony Luck , "open list:OPENRISC ARCHITECTURE" , Martin Schwidefsky , Kate Stewart , Heiko Carstens , Alexei Starovoitov , Frank Rowand , Florian Fainelli , Daniel Borkmann , "open list:SYNOPSYS ARC ARCHITECTURE" , Fenghua Yu , arnd@arndb.de, Andrey Konovalov , Jeff Dike , Masahiro Yamada , Borislav Petkov , Greentime Hu , Guan Xuetao , "open list:PARISC ARCHITECTURE" , Ard Biesheuvel , Christoffer Dall , "open list:ALPHA PORT" , Olof Johansson , Ley Foon Tan , "David S. Miller" , Rich Felker , Hendrik Brueckner , Thomas Petazzoni , "H. Peter Anvin" , "open list:SPARC + UltraSPARC sparc/sparc64" , "open list:RISC-V ARCHITECTURE" , Greg Ungerer , Jonas Bonn , Richard Weinberger , "maintainer:X86 ARCHITECTURE 32-BIT AND 64-BIT" , Russell King , Ingo Molnar , Mark Salter , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE" , Albert Ou , Stefan Kristiansson , Rob Herring , "moderated list:NIOS2 ARCHITECTURE" , Michal Simek , Vineet Gupta , Stephen Boyd , Ivan Kokshaysky , "open list:LINUX FOR POWERPC 32-BIT AND 64-BIT" Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" 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. 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. 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