From patchwork Wed Oct 24 19:32:54 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Fainelli X-Patchwork-Id: 988763 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 42gL876r2tz9sBZ for ; Thu, 25 Oct 2018 06:35:35 +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="McA1lhaO"; 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 42gL8753PvzDrPt for ; Thu, 25 Oct 2018 06:35:35 +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="McA1lhaO"; 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::543; helo=mail-pg1-x543.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="McA1lhaO"; dkim-atps=neutral Received: from mail-pg1-x543.google.com (mail-pg1-x543.google.com [IPv6:2607:f8b0:4864:20::543]) (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 42gL5W29bzzDrMG for ; Thu, 25 Oct 2018 06:33:19 +1100 (AEDT) Received: by mail-pg1-x543.google.com with SMTP id 23-v6so2798113pgc.8 for ; Wed, 24 Oct 2018 12:33:18 -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=2Vz407YGxG3JrIcbuMcGjknc9A1ux1lohN4oRm/Cqf4=; b=McA1lhaOKIJL65beGoawo5XA+sF/abwjDeA2yKaiNr8dyq/Od5ufT99E0GONMfFrB5 mxj/QZue6Tf1t+cRflB1mZi2fxv3IYj6NJnHFMWNkG2f8lp7SnQiYeL4NyVTjHBEdZ05 1dnyS5bAy3ME1/TpbS7kNt2F+Ark1Fufn3BBBGkrhPKZooIYoq2aAMK7wGQ/hNB2raHa uRrvKYdU/4TXZHxUoWQfYalvnc/5tO7e0D+DFqq7jz/D1isEZXlEIx9USTvPb91olUnq csiJX/2lmmct5T1tGTx9ZAQ22vlQr9LB07PUSw7pRK5YoMqLg5+eX9X1PLv+twsgdIN4 lSWQ== 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=2Vz407YGxG3JrIcbuMcGjknc9A1ux1lohN4oRm/Cqf4=; b=RSQOc8jSdOusOOrdyyjUnRluNxgXk9twoLNqRhedeiH0bumE0UXWVFGcOpdy83bIzR K7o5cJwnvXmSnNFgWDgCCP7nTp1X//b3VNbOMVg1Xc9qTBTnijiN29j+MYQGjT01YxAl KwFRG08TGmhe9Iq75NXuAO6MXB8XT/P9TMv0oopsdxlTFbAS4/8slALpYS8bDFnlyNOl KMlWmU8KStqVf3Xatn1gBuZ4XJ0cSd3VguCnI91TX5ytine6CKMncN/KpUDjG0XCFGV1 zhx+VLDgUl6ba9XrG72/oE0EWUoQZtVtl6VSxgC+q2EDQAPonugDd3WqjCMVKl33NyCI 3p9g== X-Gm-Message-State: AGRZ1gJR5/fWv6eP1b/6QOB3EMEAl3tsSepKLKxIFpR7CHGGjpmRzzic tLcisavAPEKeGK+JBP3NC3s= X-Google-Smtp-Source: AJdET5f4TB1KsZED30rc1ToGjGeQ0Fw4IrT5lX4Ij0zKC68JI72ZgugEVwyyG9P2X2V4HKF41Rc2IQ== X-Received: by 2002:a63:c54a:: with SMTP id g10-v6mr3624573pgd.201.1540409596871; Wed, 24 Oct 2018 12:33:16 -0700 (PDT) Received: from fainelli-desktop.igp.broadcom.net ([192.19.223.250]) by smtp.gmail.com with ESMTPSA id j187-v6sm9818878pfc.39.2018.10.24.12.33.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 24 Oct 2018 12:33:15 -0700 (PDT) From: Florian Fainelli To: linux-kernel@vger.kernel.org Subject: [PATCH v2 0/2] arm64: Cut rebuild time when changing CONFIG_BLK_DEV_INITRD Date: Wed, 24 Oct 2018 12:32:54 -0700 Message-Id: <20181024193256.23734-1-f.fainelli@gmail.com> X-Mailer: git-send-email 2.17.1 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" , "open list:IA64 Itanium PLATFORM" , "open list:SUPERH" , Catalin Marinas , Will Deacon , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE" , "open list:SPARC + UltraSPARC sparc/sparc64" , "open list:RISC-V ARCHITECTURE" , "open list:GENERIC INCLUDE/ASM HEADER FILES" , "open list:S390" , Florian Fainelli , "open list:C6X ARCHITECTURE" , "open list:QUALCOMM HEXAGON ARCHITECTURE" , "open list:SYNOPSYS ARC ARCHITECTURE" , "moderated list:H8/300 ARCHITECTURE" , "open list:TENSILICA XTENSA PORT xtensa" , Arnd Bergmann , Marc Zyngier , "open list:USER-MODE LINUX UML" , "open list:M68K ARCHITECTURE" , "open list:OPENRISC ARCHITECTURE" , "moderated list:ARM PORT" , "open list:PARISC ARCHITECTURE" , Greg Kroah-Hartman , "open list:ALPHA PORT" , Olof Johansson , "moderated list:NIOS2 ARCHITECTURE" , "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. 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