From patchwork Wed Oct 24 19:32:56 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Fainelli X-Patchwork-Id: 988761 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=linux-snps-arc-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="sHFtKCgt"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="XUVPRaDo"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 42gL6l00qdz9sML for ; Thu, 25 Oct 2018 06:34:22 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=nEK12TwimGCujNUldIGwHId5Lafwq/X4Yeeo8waJe0Y=; b=sHFtKCgtguN2aePGx3nhBqMuw6 yGRN7o7XkSU0T4YIBMnzcMKtbBDW0K5kkxfxngkIOcgLODDFO86S0Gvn0p0Jy5bx2CJMcbmtJYZR1 mIT3860H4UZikUCKKyUn/DcXdrXuGedW9Rbi04zaXPAFisdSxAVHbnAuT+rAs3AyT1VKqV4cM1GKQ dWpKB7h2O9UR+54ciYjR8alq/7tofgieZ9OK34bYT9YdcU2dD73K7k/GUo8oD7CDNWuon1T4eMSV/ 2OmnULQAm+Hlzgnu+ODj1xGApyu8VY41dP6w1sWMv+oJyymLU/9bVqbjt2HaKoNr5gwwp0DzteBpd rGocdTcA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gFOv1-0000hN-3f; Wed, 24 Oct 2018 19:34:15 +0000 Received: from mail-pf1-x444.google.com ([2607:f8b0:4864:20::444]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gFOuK-0000LC-PS; Wed, 24 Oct 2018 19:33:39 +0000 Received: by mail-pf1-x444.google.com with SMTP id f78-v6so2936697pfe.1; Wed, 24 Oct 2018 12:33:22 -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:in-reply-to:references; bh=R7GnanBC/dUP1yUUX1JKpyThiE0iCRjX5YFPvjRZfCc=; b=XUVPRaDoxMaZ0lc+zIzwRmVi++6Px2u+8TgSt+ESHM01GRwvZtXwQDGr4zqDSMZfrw 8nq+I4eE4vaqFXIJDj0j7q+PI42qbkO9Lx9HT8x5RKjlanTfAVScBJLHwP7splrM/86g SwKMGcaiEl1CEBvNP0jbIDkfSLJKkemdtX42rsEnrMQENoVA80iYvrzrwMnfiQoxbZni JkfwfIdggNQDt4uFgzXJhfpmuyCYCHoxEVICC0TXx1+PvFtzmXL0tV4d+3IFqdBUfCN3 GqHTcCVh6xi6gCkOdgy0tizfHP5iGPbFk5siMBPV9ZhNeCLYFPKMA1XnN4fFTHSdfvvV A26w== 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:in-reply-to :references; bh=R7GnanBC/dUP1yUUX1JKpyThiE0iCRjX5YFPvjRZfCc=; b=dh1Kq3V0FE+KPLMavD7IMacPehLTvfpf6TXRl/YeavgmMEugQy9KA24onK83cQfYmq kiV9IZWLgAP2UQJnWZ2y9Arxh7N1GzXMdGhVlKotmwW09Ct8F6sX5H7VuCBKcLJMUO7z sp9DoxqfGtN8TK+L9SYozyS8KMutUPavFOV45qwBl6BB88U3L9BokuWjQj3OMyFiMApi 3741oAAYIpEukoBA6NdaWhUlM7iNsuL1JGbFd1kdNWyKCWJh7S03P+4a1Eniuc0+m44g ySOxOJHg7B15QfTxQ4U+wL+xw68KHwLAeyaf/WRBEctsp7OL5L8lLkWC88yQ0MF0dfi3 KTkA== X-Gm-Message-State: AGRZ1gJdpvtHt6CMOKR0jdLiLTRmaglKAW39NHBBBi8YqoiZNzBHOw6Y ZVx1VAM/DujV7s39XKqrA88= X-Google-Smtp-Source: AJdET5dg31dP21iFfiQOW43Rew2HT+LpqU+mmMjIz/9NCSpREeKfcx0lWewCTEg3MxMGJke0wlIAEA== X-Received: by 2002:a62:b87:: with SMTP id 7-v6mr3903770pfl.67.1540409601762; Wed, 24 Oct 2018 12:33:21 -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.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 24 Oct 2018 12:33:20 -0700 (PDT) From: Florian Fainelli To: linux-kernel@vger.kernel.org Subject: [PATCH v2 2/2] arm64: Create asm/initrd.h Date: Wed, 24 Oct 2018 12:32:56 -0700 Message-Id: <20181024193256.23734-3-f.fainelli@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181024193256.23734-1-f.fainelli@gmail.com> References: <20181024193256.23734-1-f.fainelli@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181024_123332_872552_5E5A1B42 X-CRM114-Status: GOOD ( 14.67 ) X-Spam-Score: -0.1 (/) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (-0.1 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:444 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (f.fainelli[at]gmail.com) -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-BeenThere: linux-snps-arc@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Linux on Synopsys ARC Processors 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" MIME-Version: 1.0 Sender: "linux-snps-arc" Errors-To: linux-snps-arc-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org 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 --- 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 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 /* for COMMAND_LINE_SIZE */ #include +#include #include "of_private.h"