From patchwork Mon Oct 29 23:52:00 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Fainelli X-Patchwork-Id: 10660385 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D211C13BF for ; Mon, 29 Oct 2018 23:52:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B5F3E29C22 for ; Mon, 29 Oct 2018 23:52:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A33C329C53; Mon, 29 Oct 2018 23:52:52 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id E17ED29C22 for ; Mon, 29 Oct 2018 23:52:51 +0000 (UTC) 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: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:In-Reply-To: References:List-Owner; bh=hbCpaMHyUC8S9MD4zwMh2xRi3ICgoVXNAJMwEKQw0QE=; b=MQy 9Gk94IuwSIVqvFywBqpsYlP26zCOTFrie5ykXQWkwfJEF7qkpbBNigs+4q20Ns2cvWD32vFDTwap/ rpSQqHU8J2dBHTr5tgT9yeNuyP1EQaQ0OrBcsYFiY3hAgx5ZNmCtwOS8Ujjh1iFeGffoLGy2yZQvZ qqrbDsFb3daYPKKIXRnPgxCAGyZbXTbNHoUUtm8ede/+QGLtkpB+AQpb6Fqq5cjItrc+LwUeOsWrX l0cwdT97oa84A2eu31BVqiQK3vS/ebTaT7XElRSQ7ri68cVg2iq17pipwKV2fQvIhD5Ke7FejXkA0 ImthRYkcNq1MbCluAhBD9VjTa9SaLuA==; 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 1gHHKw-00044G-OL; Mon, 29 Oct 2018 23:52:46 +0000 Received: from mail-pg1-x544.google.com ([2607:f8b0:4864:20::544]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gHHKs-000420-Tw for linux-arm-kernel@lists.infradead.org; Mon, 29 Oct 2018 23:52:44 +0000 Received: by mail-pg1-x544.google.com with SMTP id r9-v6so4680123pgv.6 for ; Mon, 29 Oct 2018 16:52:32 -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=ywkQ4pBzy+okMcYg/tA16vWIBgM/SUB4JcA2XHdHXas=; b=mtwRF2iEbqqJcx6t2XjILD8Ym3OpOps2hG7+1gHz/DgFnHtrQeeJVtjuZ1T1VD1PYO gb+Kw0g3uzlrgnXfy8IMOJR0W0Bn8hK/mn6Qm/3cUBBvXIdAj2uSwasJwoRlyAZ5Bl0j zQ5vcteD+iaDHXMLsxA80tu2Uv4F7XbQxaotQ6fghNFPNFk8xryZ+7LkxpMReaM8Lotl JMYsAip82BDojyd+sjvCy5QE/Fqe9PEchSkWkTJ42oxAB4f+Kvuhwc7pWgNE/8Rz2XGp gHj658+Om46yixAShdGBCLkhu8GLZyBnKDKlLng9FJBBJ3/aMdTz0ARSdQGHJsPU6CRz 2sdw== 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=ywkQ4pBzy+okMcYg/tA16vWIBgM/SUB4JcA2XHdHXas=; b=RYWJ0p+ESInaBCdhxBWXXxYLKQLS2m232pjRuF1nXmvHcIVLGA/0UrBH+A1xleH3jx 3IFd3nZgQ/gN423ac/d3dgOz6rto6lchojQRDaXhsIL3EhYfGZ1yOR7fpDJCdnXm1wZ/ M1TUH4CAMcf4XjEecJ0Fy6B0hjXxN1CLx/q5gvSuaQrirWBiCo4tp6Xga1fORhl8oU6t m1FYCoye30FF5o+Bp+G/Ev2sgGfZua2jZkTceuAxHPmIQ+oPYe4qdBHR8eWfXYtSPMeC MZxWILvj9lDoh0HOE5zME0DwIRiAfPQTJdLCgJkEtbL89EPK5h8/sqyozX9eINKrE4Fg ixYQ== X-Gm-Message-State: AGRZ1gIbyWukrDu2L4otje2QCxxh/hDUE8HYjPKazpmkh0JTzXItWd/N ezfDic+CUnKlA71YsfekFtQ= X-Google-Smtp-Source: AJdET5fiuGxLO/m9wAL6/HZBi9hxcWXDvU7mweKH7gz2DnQxJLf+asDB1EWA9bms3ivKf8Au5STB4g== X-Received: by 2002:a63:a552:: with SMTP id r18mr15710615pgu.176.1540857151939; Mon, 29 Oct 2018 16:52:31 -0700 (PDT) Received: from fainelli-desktop.igp.broadcom.net ([192.19.223.250]) by smtp.gmail.com with ESMTPSA id k13-v6sm22537981pff.30.2018.10.29.16.52.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 29 Oct 2018 16:52:30 -0700 (PDT) From: Florian Fainelli To: linux-kernel@vger.kernel.org Subject: [PATCH 0/6] arm64: Get rid of __early_init_dt_declare_initrd() Date: Mon, 29 Oct 2018 16:52:00 -0700 Message-Id: <20181029235206.30060-1-f.fainelli@gmail.com> X-Mailer: git-send-email 2.17.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181029_165242_993609_07496863 X-CRM114-Status: GOOD ( 13.59 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: CHANDAN VN , Catalin Marinas , Will Deacon , Stefan Agner , Masahiro Yamada , deanbo422@gmail.com, Frank Rowand , Florian Fainelli , linux@armlinux.org.uk, rppt@linux.ibm.com, Andrey Ryabinin , Laura Abbott , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE" , Marc Zyngier , Andrey Konovalov , Kristina Martsenko , Russell King , Rob Herring , green.hu@gmail.com, gxt@pku.edu.cn, "moderated list:ARM64 PORT AARCH64 ARCHITECTURE" , ard.biesheuvel@linaro.org, Johannes Weiner , Andrew Morton , Robin Murphy , Greg Hackmann MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Hi all, The numbers no longer make any sense since I either did not correctly understand the feedback being given, or dramatically changed the approach. This version introduces an architecture symbol: ARCH_HAS_PHYS_INITRD which indicates whether the architecture cares/supports parsing the physical address of the initrd. Currently ARM (32-bit), Unicore32 and now ARM64 support that. When that symbol is defined, we also have the generic FDT code populate the initrd physical address and size, and we can later make use of that within architecture specific code to populate the memblock regions and do the righ physical to virtual address conversion. Rob, hopefully this is what you had in mind. Previous discussions/submissions list here: v3: https://www.spinics.net/lists/arm-kernel/msg683566.html v2: https://lkml.org/lkml/2018/10/25/4 Florian Fainelli (6): nds32: Remove phys_initrd_start and phys_initrd_size arch: Make phys_initrd_start and phys_initrd_size global variables arch: Define ARCH_HAS_PHYS_INITRD for ARM and Unicore32 of/fdt: Populate phys_initrd_start/phys_initrd_size from FDT arm64: Utilize ARCH_HAS_PHYS_INITRD of/fdt: Remove definition check for __early_init_dt_declare_initrd() arch/Kconfig | 7 +++++++ arch/arm/Kconfig | 1 + arch/arm/mm/init.c | 6 +++--- arch/arm64/Kconfig | 1 + arch/arm64/include/asm/memory.h | 8 -------- arch/arm64/mm/init.c | 23 +++++++++++------------ arch/nds32/mm/init.c | 2 -- arch/unicore32/Kconfig | 1 + arch/unicore32/mm/init.c | 4 ++-- drivers/of/fdt.c | 6 ++++-- include/linux/initrd.h | 3 +++ 11 files changed, 33 insertions(+), 29 deletions(-)