From patchwork Mon Oct 29 23:52:01 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Fainelli X-Patchwork-Id: 10660387 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 0D8BB174F for ; Mon, 29 Oct 2018 23:53:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EBAA92843C for ; Mon, 29 Oct 2018 23:53:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DCB592844B; Mon, 29 Oct 2018 23:53:36 +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 692592843C for ; Mon, 29 Oct 2018 23:53:36 +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: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=++/ScaNZQTTWW9FRiOKdwonb5M7byMkec9b/uWledmg=; b=LCU9nlFM0N+TMLBFWSIQl4dBbn P4hO/Ny34cLleVgC0iTIgBAh9miEyQ08S2KKkm2sNsuZqRD7M4aUAibKXthsQgGcoKTMsPOu0HUbg A8Ctv8jFUwLBKkCo/f2up0cK0M6P2Gsnu1HKciMZpH9GrLiaUEUxxSPIP5F5Mo/6gMYxgigjPnovs Sjq9r1DU0O+zG4lSYupRpYeX3fZU3HabtqnHnyK5Fgq5mewwVREYVGK/pXw4V9/3myq+k8DUooy2O 5I1qEjrdIumV6HO0809dbnYHG2Qq2CizOa3vG9e55W6U2GiShQ2+7raF/Nm1U04/tMaQTdiCZmCVP YupkAbfw==; 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 1gHHLd-0004LV-Ik; Mon, 29 Oct 2018 23:53:29 +0000 Received: from mail-pg1-x541.google.com ([2607:f8b0:4864:20::541]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gHHKv-000421-9t for linux-arm-kernel@lists.infradead.org; Mon, 29 Oct 2018 23:52:46 +0000 Received: by mail-pg1-x541.google.com with SMTP id k1-v6so3260260pgq.1 for ; Mon, 29 Oct 2018 16:52:35 -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=AtQivvj6hJ1qy9E/5uGhpUB8LlJCIsHqyEiYftwE/sA=; b=p7AJ6XixL296KovyKMAD+UzeA+mwLeJ3m1QA5oj6PcFN5uBSkIug+6L9XN8E27b191 B37oztlbjdZXaancADeb/EH0MDVF41xkeXaqLdysJJYJXtglzeGPpl8SFXP/Oa2R9u3e ZrmV4prxSDk0zXDgZegDvpRWMNUREV/ACi1oQQD7c5J+rDRZxNJth/pyFDyEkuT7uLBi UZzP0+DqoU92CYEz4n4wZmDbG57FGeVAs9fgfipfRz6qQamrFSZMwwZHCP+u4KQakJSk 1H/YUqj2tphWaaYQNHkEoVJqZL6pczSzt0uaF1oH6VOjQBngKwYF5DeNS/IERJ0K06fw 9Nmw== 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=AtQivvj6hJ1qy9E/5uGhpUB8LlJCIsHqyEiYftwE/sA=; b=BTc37f1JDZRGM2lTtrWmDd2souyaxpu4BrV9aH1sP+D+Ny3Nu9tG3O1BIXNVqgIaOo nBjxmdsuUKx1dgvgiK6Scye/at1+P4ikXSOueGMHDduu44Tcq+Spzz7s/WK9eRDeNUlM Dgx/FyYuVmKU3UZA/hTooqMlIJ6KxkL4HlK03yUFD8y7CGfqyi5zgQinbZq40NJt1ifA hu/WnFpv3CtYv8LqLCnVtjLMT98G/x07TfbuCzt61RJRak9qI01cjhngDVy8H1uZXv+/ 543gmoDrhWs3ScggVEmC8pHrp8UhcwKp5la1FQ3hg9rCPcLYsM+ZaeFPH2iu+XHIrEd+ Osdg== X-Gm-Message-State: AGRZ1gK9GwNb3xSy+QbVX2DgyYpUYJuH8gAVgEVpCunGhhLoG3jTCCCD expivjUJTlpg/QoA16LyGxM= X-Google-Smtp-Source: AJdET5cJBzb7p6c/l41cmqC5bBs2xtjr6B0hdL70p3RdSxmQYPKkuPyP1v1uKJ4lb4gShWumd4fCJQ== X-Received: by 2002:a63:1e5c:: with SMTP id p28mr15872242pgm.376.1540857154346; Mon, 29 Oct 2018 16:52:34 -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.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 29 Oct 2018 16:52:33 -0700 (PDT) From: Florian Fainelli To: linux-kernel@vger.kernel.org Subject: [PATCH 1/6] nds32: Remove phys_initrd_start and phys_initrd_size Date: Mon, 29 Oct 2018 16:52:01 -0700 Message-Id: <20181029235206.30060-2-f.fainelli@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181029235206.30060-1-f.fainelli@gmail.com> References: <20181029235206.30060-1-f.fainelli@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181029_165245_342988_46B32F96 X-CRM114-Status: GOOD ( 13.97 ) 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 This will conflict with a subsequent change making phys_initrd_start and phys_initrd_size global variables. nds32 does not make use of those nor provides a suitable declarations so just get rid of them. Signed-off-by: Florian Fainelli --- arch/nds32/mm/init.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/arch/nds32/mm/init.c b/arch/nds32/mm/init.c index c713d2ad55dc..32f55a24ccbb 100644 --- a/arch/nds32/mm/init.c +++ b/arch/nds32/mm/init.c @@ -22,8 +22,6 @@ DEFINE_PER_CPU(struct mmu_gather, mmu_gathers); DEFINE_SPINLOCK(anon_alias_lock); extern pgd_t swapper_pg_dir[PTRS_PER_PGD]; -extern unsigned long phys_initrd_start; -extern unsigned long phys_initrd_size; /* * empty_zero_page is a special page that is used for From patchwork Mon Oct 29 23:52:02 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Fainelli X-Patchwork-Id: 10660389 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 D7CB613BF for ; Mon, 29 Oct 2018 23:54:17 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BDC8928CD0 for ; Mon, 29 Oct 2018 23:54:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AEFF429238; Mon, 29 Oct 2018 23:54:17 +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 4EB8528CD0 for ; Mon, 29 Oct 2018 23:54:17 +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: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=+Jf7+vbir7T0zvZnn79P+extJa7Cfm3RtSoHy8R/7w8=; b=CIfeoFPr51bIx1jOzOqcbNHgev yCWRoGtaFPllS+Hk+iCuQ8kdE72OQc1xLCtB2jwkhe5pXw6TQ1Q/OPruHUQRYPB+2Q4/p7QYP8HtX GHmSxkJzFv2veEMN/Z199jFeZknC+lhEV5bVPpsF5brblSF3l+cgFFhTqoYQ6Pif3uFYg8FTvB6J6 KxR1cZx2YchqeZkIs1o/tXBFkQgYaT0cqC7stEVb+UssITIcoELbMqr8vkbczyBcfwqLgfC2NKj43 YsqMILdxffsv91h4Xj3FMJAE2FJNkfFF2LyLzO47jSwq6M9p6HHjCqADk+zNTUMaDCLqXggsoF9s5 5mp1PGSA==; 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 1gHHMK-0004i3-Aq; Mon, 29 Oct 2018 23:54:12 +0000 Received: from mail-pl1-x643.google.com ([2607:f8b0:4864:20::643]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gHHKx-000429-JT for linux-arm-kernel@lists.infradead.org; Mon, 29 Oct 2018 23:52:59 +0000 Received: by mail-pl1-x643.google.com with SMTP id n4-v6so4010409plp.2 for ; Mon, 29 Oct 2018 16:52:37 -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=xRniQ/SenF/b2HkRCisGu8vGveS5ZrM6Rdu1vfSJ1hU=; b=NdfWYyrJaKwj0g5pJz1Dt03O59C9R58Rk2vAj1lodD9y2gN1oN9JDzi77jkpb18I35 xD8gUuFi8XvlfsnepqG/DnZSP2MlRo9pOG9RI9plDEcle8dggoqCC+Qm9+PLQUydjuMV 1QleRUKhNLCm0KFls5X0syhY69a3PYAHrBOmtMan9W5+pBy7VaQeveVibXo6pL6+HaYw yxVKEoZ3zGFXW62nxN5CqPv/v/yos+nucGc9VwP+QrsZyoN5IvtRsDvIs8VjGm8EU/Ww XYrZjkpHG4Hg3WpSahZvJOJWxs6gOh0pyaipEdiuSL6QxxCJaZ+M8HiUPtlR2oOb6UVq NxHA== 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=xRniQ/SenF/b2HkRCisGu8vGveS5ZrM6Rdu1vfSJ1hU=; b=RgcxDUcEDNIUhiydbrpbbozBdx/T48UY3a8z3fKGUa+ujd8QEOM5WFsTLbGVNFhLIN LamWryUqM2Nhoap9tOeq4OjFDEFiSHBjJLDSdEDiahtE/OpomC63GGX6Pj7GU4jNXvXg UE6Hvm5529XnA6P1jOLNwrwxlssHZuV7R/1N4XIXz1HTR0PVK79ZlFNAURt0e0+PJ+fO POLypMhB//bcDhZNoVXW2fVUxksqo3gYxozWmEvL8GrVWey2zhXQSk4VRfWT9J1q+PR2 KCLoN3lp8ulhuTf2G9eIJIfDxeWHUzDWQo8RlFJwNHLGdPGvuAG4mGHu8A4+T1bBM/gk SDcg== X-Gm-Message-State: AGRZ1gI5TnvVK/CAxdAqWzgbc8zwgpr7ouUgx2WQrWRXef99+ZzHG0yb 4lYEN9q1hJXICWXnIpKDleI= X-Google-Smtp-Source: AJdET5e5bw1tFJSx1qa61gkDTjZ9BaPVELRZjfaIRFIPo8U1E7PTr0pTB7nsNKPA3E34HYQe+nw5zA== X-Received: by 2002:a17:902:7201:: with SMTP id ba1-v6mr902814plb.79.1540857156701; Mon, 29 Oct 2018 16:52:36 -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.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 29 Oct 2018 16:52:35 -0700 (PDT) From: Florian Fainelli To: linux-kernel@vger.kernel.org Subject: [PATCH 2/6] arch: Make phys_initrd_start and phys_initrd_size global variables Date: Mon, 29 Oct 2018 16:52:02 -0700 Message-Id: <20181029235206.30060-3-f.fainelli@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181029235206.30060-1-f.fainelli@gmail.com> References: <20181029235206.30060-1-f.fainelli@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181029_165247_701672_8A1256FA X-CRM114-Status: GOOD ( 13.46 ) 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 Make phys_initrd_start and phys_initrd_size global variables that will later be referenced by generic code under drivers/of/fdt.c. Signed-off-by: Florian Fainelli --- arch/arm/mm/init.c | 4 ++-- arch/unicore32/mm/init.c | 4 ++-- include/linux/initrd.h | 3 +++ 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c index 0cc8e04295a4..8f364aa24172 100644 --- a/arch/arm/mm/init.c +++ b/arch/arm/mm/init.c @@ -51,8 +51,8 @@ unsigned long __init __clear_cr(unsigned long mask) } #endif -static phys_addr_t phys_initrd_start __initdata = 0; -static unsigned long phys_initrd_size __initdata = 0; +phys_addr_t phys_initrd_start __initdata = 0; +unsigned long phys_initrd_size __initdata = 0; static int __init early_initrd(char *p) { diff --git a/arch/unicore32/mm/init.c b/arch/unicore32/mm/init.c index 8f8699e62bd5..4dd26d6f02e5 100644 --- a/arch/unicore32/mm/init.c +++ b/arch/unicore32/mm/init.c @@ -31,8 +31,8 @@ #include "mm.h" -static unsigned long phys_initrd_start __initdata = 0x01000000; -static unsigned long phys_initrd_size __initdata = SZ_8M; +phys_addr_t phys_initrd_start __initdata = 0x01000000; +unsigned long phys_initrd_size __initdata = SZ_8M; static int __init early_initrd(char *p) { diff --git a/include/linux/initrd.h b/include/linux/initrd.h index 84b423044088..14beaff9b445 100644 --- a/include/linux/initrd.h +++ b/include/linux/initrd.h @@ -21,4 +21,7 @@ extern int initrd_below_start_ok; extern unsigned long initrd_start, initrd_end; extern void free_initrd_mem(unsigned long, unsigned long); +extern phys_addr_t phys_initrd_start; +extern unsigned long phys_initrd_size; + extern unsigned int real_root_dev; From patchwork Mon Oct 29 23:52:03 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Fainelli X-Patchwork-Id: 10660391 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 1208E14E2 for ; Mon, 29 Oct 2018 23:54:54 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EF18328CD0 for ; Mon, 29 Oct 2018 23:54:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DF85529238; Mon, 29 Oct 2018 23:54:53 +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 6859328CD0 for ; Mon, 29 Oct 2018 23:54:53 +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: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=Dh0CfulSgccjEWEmTrszdlESBdnHEl15BSKKxUPMNuw=; b=W3EXyO+ToMsUaDNILPlMk+/Zh+ SLlJ46sezCtyJxZKthdwupGg8t9yDEAZyirzOWirauaYN03S9FcKmf0nJBG+gOdM4FnfP2984JMtd FRB9kyOEGuwhEl4qh17dHLwV39HUddUrA95+vobxr3wQKmnVM6QRHiYcdv7d/85MqTFEN4Ou7ntfB X6S3Hvfd6Ev4Ef3qM4Wuje4iV/tzICVW4gIZaWbUZMgcUMA46+WVVX0IiXiKCUMB/bsiFKT6nje/O WZHnvu0qif5K9Fyale/8MMjPpofgizUY9KB1dYekr89Yqiv65bQhDnWGcSj+swJFXtmfueDAZZWoJ GlJHzBZg==; 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 1gHHMv-0004xC-1d; Mon, 29 Oct 2018 23:54:49 +0000 Received: from mail-pl1-x642.google.com ([2607:f8b0:4864:20::642]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gHHL0-00042U-0M for linux-arm-kernel@lists.infradead.org; Mon, 29 Oct 2018 23:53:01 +0000 Received: by mail-pl1-x642.google.com with SMTP id b5-v6so3965515pla.6 for ; Mon, 29 Oct 2018 16:52:39 -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=IdcEyKMm4vYhsKy4CABorYdVSsAXOdKZ8deL2wX7NRA=; b=p3ns2q3uzt5IPKy6pThwMWZ+2BxmXDhR3fDNiRBZP3zz+NeZkGWhmEOqgy3IhrdGZq vlO3fgpwrVCPFKTqGDaDJ8cLQuK85GgbCTHTKd4VjD0BG2fTiigh+hFiO5GTR33UqAVH gn+5ZYyKvFlJ8F/eeWdo6L20gBgbllK3tLGDiQ5cKJxR/8wB3/Cme35fqIIbG3PP51PX Api8AXpXIdJs9arp2NYdfj1XQQbM64UIxW8nZRdv3dJRN8uSNraqY4rZohKP7GhFxVP1 W7ICGYefk0t+wHCjlJFrGi2CNGZsC88l07AQE0t34lKcPPs5vXLtGfDNgjFOPfnutGFP FBEg== 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=IdcEyKMm4vYhsKy4CABorYdVSsAXOdKZ8deL2wX7NRA=; b=eKb328C4BdcrXTXe1T4+m4f3RNU8qO0Cyr/2RW7bUBTNQ/1xAh6YyfNbJF3Zn32LY7 F4CLgxul8hs+iBjO1ww8njrrT/L3iOgxGxszHVqFXBRjeEFiCgEHT81xlnWYUj+9Ls1I hFdJz1RBcGF6qGvGyW4qx/Tkxd4jTGc5At7prGcRlB0jtQXci1AMFoV/v0sf8Vf+vBYW uxS2DtiHlLTFl4N/QJ8eRZgSEGTxuKh3JluZYHwP7CNvUc7kp/evvE9FovdWCe0vffg2 7WuyCE9e8JXTVSny0OBvlseZarjH86rXB+7D+BPgeA9P0Sh458Ek6twk/KNi6tirDw1j xKOA== X-Gm-Message-State: AGRZ1gJSgp2teMpu/V1hi15qSmMAGEhNHxbG+wbgOuZB9PsPVDFNmV1r S9ldXsNPWyYtN3jn5aA+NI0= X-Google-Smtp-Source: AJdET5f46Izd+jiHB1knz9Af4+W7TgXITKwkUfBEb0OM3n+3u7kESWfwo+gWbpH5EzG5zr+mUBJzEg== X-Received: by 2002:a17:902:5066:: with SMTP id f35-v6mr16157636plh.145.1540857159247; Mon, 29 Oct 2018 16:52:39 -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.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 29 Oct 2018 16:52:38 -0700 (PDT) From: Florian Fainelli To: linux-kernel@vger.kernel.org Subject: [PATCH 3/6] arch: Define ARCH_HAS_PHYS_INITRD for ARM and Unicore32 Date: Mon, 29 Oct 2018 16:52:03 -0700 Message-Id: <20181029235206.30060-4-f.fainelli@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181029235206.30060-1-f.fainelli@gmail.com> References: <20181029235206.30060-1-f.fainelli@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181029_165250_092712_D600F896 X-CRM114-Status: GOOD ( 14.94 ) 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 Make ARM and Unicore32 select ARCH_HAS_PHYS_INITRD meaning that they do define phys_initrd_start/phys_initrd_size and make use of it. Signed-off-by: Florian Fainelli --- arch/Kconfig | 7 +++++++ arch/arm/Kconfig | 1 + arch/unicore32/Kconfig | 1 + 3 files changed, 9 insertions(+) diff --git a/arch/Kconfig b/arch/Kconfig index 9d329608913e..0926f8291782 100644 --- a/arch/Kconfig +++ b/arch/Kconfig @@ -865,6 +865,13 @@ config HAVE_ARCH_PREL32_RELOCATIONS architectures, and don't require runtime relocation on relocatable kernels. +config ARCH_HAS_PHYS_INITRD + bool + help + An architecture selects this when it needs to act on the physical + address of the initial ramdisk and allow generic code such as + FDT to populate that address. + source "kernel/gcov/Kconfig" source "scripts/gcc-plugins/Kconfig" diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index e8cd55a5b04c..b87c40701b0e 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -11,6 +11,7 @@ config ARM select ARCH_HAS_KCOV select ARCH_HAS_MEMBARRIER_SYNC_CORE select ARCH_HAS_PTE_SPECIAL if ARM_LPAE + select ARCH_HAS_PHYS_INITRD select ARCH_HAS_PHYS_TO_DMA select ARCH_HAS_SET_MEMORY select ARCH_HAS_STRICT_KERNEL_RWX if MMU && !XIP_KERNEL diff --git a/arch/unicore32/Kconfig b/arch/unicore32/Kconfig index 0c5111b206bd..28a66ae61dcf 100644 --- a/arch/unicore32/Kconfig +++ b/arch/unicore32/Kconfig @@ -2,6 +2,7 @@ config UNICORE32 def_bool y select ARCH_HAS_DEVMEM_IS_ALLOWED + select ARCH_HAS_PHYS_INITRD select ARCH_MIGHT_HAVE_PC_PARPORT select ARCH_MIGHT_HAVE_PC_SERIO select DMA_DIRECT_OPS From patchwork Mon Oct 29 23:52:04 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Fainelli X-Patchwork-Id: 10660393 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 95A1D174F for ; Mon, 29 Oct 2018 23:55:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7A54C28CD0 for ; Mon, 29 Oct 2018 23:55:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 67C3629238; Mon, 29 Oct 2018 23:55:53 +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 0B05328CD0 for ; Mon, 29 Oct 2018 23:55:53 +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: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=Flkr7IEZAyraqRveZwvEdKLcB/OSUrymyDJUSf6Mxu8=; b=HGVimCpu/Ywc8L2DRsSoIwXCMM /ROEIV7wyvKQHLmy1HvjmaTuCScOfMJzXEZDWIg4qflgyNF+FGY3qSSzukYQZdz3+6owNW2jLu3nL i1Y/Blcryz5uow9cF9BftZqXSEU+UsoSFlHhEEhdLn4rXNWlMyLn1LlQHAiKDqe7xFMfVRBpyT7be 2auG6U72UTCP7jcBYrfuyRdoievPucHCRIiii0Uk4TQnkwiTHp82Mg3D7VGhaM649iNhY/mhvlU4C CwTFZ/osFEc+bZTWqnqv6fa820xWLnmuntu774h/BgTJqliANjGL/OHY9HofHLERfYp9DIm/mOBRO JmzbQ+xA==; 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 1gHHNr-0006WJ-5d; Mon, 29 Oct 2018 23:55:47 +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 1gHHL2-00042a-DN for linux-arm-kernel@lists.infradead.org; Mon, 29 Oct 2018 23:53:10 +0000 Received: by mail-pf1-x444.google.com with SMTP id z2-v6so2244848pfe.2 for ; Mon, 29 Oct 2018 16:52:42 -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=wOKJE9uIABdH60US3sClxZQrg6R8PI279i9FOlxRlG4=; b=WZJiJ7FsHbbeZO/tb/j+6S3Yk1wYRnL75lNXEYERbkmvnjNG2uXoHgzIr4XbzLVfOK 7aVetERjzAO5EQfMfRY1G+h2EeJhdiMyehZUEDWsPPXX3hCcmANOJRtO8I0L1BsWbLBD Oi9aU5g/KYBdP2/wt0PfGRqlctLjW3Hcgao3BVaCdwbmAszwjxhPcspRvXbHsqvNUUtV VIGFdT5Ezm7cYkLJn82k4M0WO77ISyjSnHZvI6llxFKUoEDYKI7djvt6VdlBZ0+z1a5K ASlyo5+GxSFOPNNYXsfYPcTUqBfjx10fosupbrzRNRmyWFsR8kd5TwNZeP0GoI1NLZW5 M2mQ== 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=wOKJE9uIABdH60US3sClxZQrg6R8PI279i9FOlxRlG4=; b=b1zSlKHnIR1hCckr5Msrfqv5AXVUtUXLjQ5PeI117f6IO+ARSwHytkOeDbTGOUpo6r B7hkQVJO0p/Ft5ViGaILxQ5JfPFgMQYQU4DRZz7R1RuztzRadit5brLDK+KpMivOgZXx bQAjuMAqujVuVcAwVOG5Eb1wjd5TJ1dKBBTljBGMSHcyUwAzzzQRLSkh/5VzVM+fj+aI M3exuGCYreLnJEHvLOasxmu1LTR+dx63+zH+QEaEZJ+qJq75irgzVr781rwCK+4xPpIC Od4efekfV7lCNny9vG+BcZ4pzLojwC3pEDuBTQxrHglPYc068NrVOxVjO0Cedd/HdifG dTeg== X-Gm-Message-State: AGRZ1gLgW3YO6sOmkQ/IE+gnNQhX1QxqpdSBXcpsYiyTl+q0oKPHAKf1 HweachfYwT7fSER7QcvslNU= X-Google-Smtp-Source: AJdET5f47m1khXFFfa05z8/iowOKmbFK5hnpI9SiwtLHld0dxYAF5hEKNCViFgZU9rKJo/TtkHsh8A== X-Received: by 2002:a62:460c:: with SMTP id t12-v6mr510305pfa.206.1540857161524; Mon, 29 Oct 2018 16:52:41 -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.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 29 Oct 2018 16:52:40 -0700 (PDT) From: Florian Fainelli To: linux-kernel@vger.kernel.org Subject: [PATCH 4/6] of/fdt: Populate phys_initrd_start/phys_initrd_size from FDT Date: Mon, 29 Oct 2018 16:52:04 -0700 Message-Id: <20181029235206.30060-5-f.fainelli@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181029235206.30060-1-f.fainelli@gmail.com> References: <20181029235206.30060-1-f.fainelli@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181029_165252_620978_D2C00D93 X-CRM114-Status: GOOD ( 15.82 ) 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 If the architecture implements ARCH_HAS_PHYS_INITRD, make the FDT scanning code populate the physical address of the start of the FDT and its size. Signed-off-by: Florian Fainelli --- arch/arm/mm/init.c | 2 +- drivers/of/fdt.c | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c index 8f364aa24172..517e95cfb5d2 100644 --- a/arch/arm/mm/init.c +++ b/arch/arm/mm/init.c @@ -237,7 +237,7 @@ static void __init arm_initrd_init(void) phys_addr_t start; unsigned long size; - /* FDT scan will populate initrd_start */ + /* FDT scan will populate initrd_start and phys_initrd_start */ if (initrd_start && !phys_initrd_size) { phys_initrd_start = __virt_to_phys(initrd_start); phys_initrd_size = initrd_end - initrd_start; diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c index 76c83c1ffeda..313cd4f24258 100644 --- a/drivers/of/fdt.c +++ b/drivers/of/fdt.c @@ -899,6 +899,10 @@ static void __early_init_dt_declare_initrd(unsigned long start, initrd_start = (unsigned long)__va(start); initrd_end = (unsigned long)__va(end); initrd_below_start_ok = 1; +#ifdef CONFIG_ARCH_HAS_PHYS_INITRD + phys_initrd_start = start; + phys_initrd_size = end - start; +#endif } #endif From patchwork Mon Oct 29 23:52:05 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Fainelli X-Patchwork-Id: 10660397 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 4EBBF14E2 for ; Mon, 29 Oct 2018 23:57:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3649928CD0 for ; Mon, 29 Oct 2018 23:57:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2307129238; Mon, 29 Oct 2018 23:57:18 +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 7B2AE28CD0 for ; Mon, 29 Oct 2018 23:57:17 +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: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=0jywFFKAFmnNmeYfDpB37kF0wyrVAz7eTf2b3zuXCR0=; b=h9hYFW8Ao7jVnWZXmwMqoil2CT +efDMGX1KKYgrt/p5XQ+2lEIbcHlRRXefdgnz/BHOglIKPi0D/xhMfzFmuvonPosv+0XdXV2N1O5V nCr3Bun5WrgXM84xy7kTPI83o8WIcIaDSIfItxT69g+7j5cyix665npGgkbvNvOulwsA/nb68KIob YBtQ60KDuhROWG0KLr19/wuNvwriAxhDGvoNgiBr4xsOAZnoUbDlZlAy/0hzo9mGD9KxkrzCAvbag /p+sk80aiZCMOG0nGmWBHai/VYT2sG9eG/92Q0CZ9zJQ0vXF6juyXfpdMhwJFVgVCO8zqEl59XiQJ /pZwrQtw==; 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 1gHHP3-00073u-Le; Mon, 29 Oct 2018 23:57:01 +0000 Received: from mail-pg1-x543.google.com ([2607:f8b0:4864:20::543]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gHHL4-00043m-NO for linux-arm-kernel@lists.infradead.org; Mon, 29 Oct 2018 23:53:19 +0000 Received: by mail-pg1-x543.google.com with SMTP id c10-v6so4683964pgq.4 for ; Mon, 29 Oct 2018 16:52:44 -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=fU/03j6hWRyu9xAaSEpO9kPy+MSb5qCckFcBZmMx+bY=; b=hTaMoOvk6uRPCTs5sir3RKYA+OAF3jlRfZAq1m48fxSAozlUi6oQ3gnEbmRn/ZcYRm 2OZlfoLmw3YCaywb8j0+J9xpkRWhCe/wabDZzikx5R4JtOgRY7QNN7FlRSn9lZ2PEWDu djKWE9N3lU8qVfoEFixfA8mYhSz3sGk1o8XoGmHkfr4eMuwVKgRTYspKKjcWNQT6BWdf Mi0EzAfxGcrD3CWHsm49Ai74l3F8Hg3Fqlq9c+ja9NLKM7s6jsozk4FtMAex7KGGc3wC 6rRKaaqZ11hgwfGanhmwznFzD7dvqD5wTEsIqVw8ETgGdo/8hw7TuskIbgdKZtzu9hd2 DVAw== 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=fU/03j6hWRyu9xAaSEpO9kPy+MSb5qCckFcBZmMx+bY=; b=XGQ5OwaEp1F341HTJMh9mAsZ1Aq2tA7DIZ60paIx93FKb7YyVtviuo3ij3ZSuOPRZV +S6HjY7sjJ7jVeWm6b7PLUPHEtFQMTQAIs01ljnBfSZq2M1WEi0M2kx6t/hItXW6f6SM qMsT48CSwPyAiRrQfapQCjTNhMjnnmG2rOH1MXKL2NgvF3eDoNXJyFzwal5lwOb7ktag RjboF4FrjrkFMHu4kLNFUSpGm+EZGBsysNe3JWzTFPVEeFnW+YWQUJQcSIJQdURPNCx6 k2vRDKLsoAvHJmsheUdned7aQZI5br4z3x+lFjotm0wwdZhHFTGRUY0h5v/ZvaRZN17r SRaw== X-Gm-Message-State: AGRZ1gIJ5BH95Estf69LEaeGTvIuw6l+E1RCjN9Vy30FQ4ib2cOzucNq srKKZTUzUA+1DfJPNMt0rVI= X-Google-Smtp-Source: AJdET5eHSYsttLAS3SM9hiiHEDvnZ6ilH9qmF6+vipuY0cF622QYjwqgrSyt8Uha2YUYRx0M29GeKw== X-Received: by 2002:a62:8c93:: with SMTP id m141-v6mr460947pfd.239.1540857163842; Mon, 29 Oct 2018 16:52:43 -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.41 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 29 Oct 2018 16:52:42 -0700 (PDT) From: Florian Fainelli To: linux-kernel@vger.kernel.org Subject: [PATCH 5/6] arm64: Utilize ARCH_HAS_PHYS_INITRD Date: Mon, 29 Oct 2018 16:52:05 -0700 Message-Id: <20181029235206.30060-6-f.fainelli@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181029235206.30060-1-f.fainelli@gmail.com> References: <20181029235206.30060-1-f.fainelli@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181029_165254_881985_955C923C X-CRM114-Status: GOOD ( 20.97 ) 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 ARM64 is the only architecture that re-defines __early_init_dt_declare_initrd() in order for that function to populate initrd_start/initrd_end with physical addresses instead of virtual addresses. Instead of having an override, just get rid of that implementation and select ARCH_HAS_PHYS_INITRD which would do that for us. Signed-off-by: Florian Fainelli --- arch/arm64/Kconfig | 1 + arch/arm64/include/asm/memory.h | 8 -------- arch/arm64/mm/init.c | 23 +++++++++++------------ 3 files changed, 12 insertions(+), 20 deletions(-) diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig index 964f682a2b7b..302fb721d412 100644 --- a/arch/arm64/Kconfig +++ b/arch/arm64/Kconfig @@ -21,6 +21,7 @@ config ARM64 select ARCH_HAS_GIGANTIC_PAGE if (MEMORY_ISOLATION && COMPACTION) || CMA select ARCH_HAS_KCOV select ARCH_HAS_MEMBARRIER_SYNC_CORE + select ARCH_HAS_PHYS_INITRD select ARCH_HAS_PTE_SPECIAL select ARCH_HAS_SET_MEMORY select ARCH_HAS_SG_CHAIN 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/arch/arm64/mm/init.c b/arch/arm64/mm/init.c index 3cf87341859f..fef9eb7fdb50 100644 --- a/arch/arm64/mm/init.c +++ b/arch/arm64/mm/init.c @@ -61,6 +61,8 @@ */ s64 memstart_addr __ro_after_init = -1; phys_addr_t arm64_dma_phys_limit __ro_after_init; +phys_addr_t phys_initrd_start __initdata; +unsigned long phys_initrd_size __initdata; #ifdef CONFIG_BLK_DEV_INITRD static int __init early_initrd(char *p) @@ -72,8 +74,8 @@ static int __init early_initrd(char *p) if (*endp == ',') { size = memparse(endp + 1, NULL); - initrd_start = start; - initrd_end = start + size; + phys_initrd_start = start; + phys_initrd_size = size; } return 0; } @@ -408,14 +410,14 @@ void __init arm64_memblock_init(void) memblock_add(__pa_symbol(_text), (u64)(_end - _text)); } - if (IS_ENABLED(CONFIG_BLK_DEV_INITRD) && initrd_start) { + if (IS_ENABLED(CONFIG_BLK_DEV_INITRD) && phys_initrd_size) { /* * Add back the memory we just removed if it results in the * initrd to become inaccessible via the linear mapping. * Otherwise, this is a no-op */ - u64 base = initrd_start & PAGE_MASK; - u64 size = PAGE_ALIGN(initrd_end) - base; + u64 base = phys_initrd_start & PAGE_MASK; + u64 size = PAGE_ALIGN(phys_initrd_size); /* * We can only add back the initrd memory if we don't end up @@ -460,13 +462,10 @@ void __init arm64_memblock_init(void) */ memblock_reserve(__pa_symbol(_text), _end - _text); #ifdef CONFIG_BLK_DEV_INITRD - if (initrd_start) { - memblock_reserve(initrd_start, initrd_end - initrd_start); - - /* the generic initrd code expects virtual addresses */ - initrd_start = __phys_to_virt(initrd_start); - initrd_end = __phys_to_virt(initrd_end); - } + /* the generic initrd code expects virtual addresses */ + initrd_start = __phys_to_virt(phys_initrd_start); + initrd_end = initrd_start + phys_initrd_size; + initrd_below_start_ok = 0; #endif early_init_fdt_scan_reserved_mem(); From patchwork Mon Oct 29 23:52:06 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Fainelli X-Patchwork-Id: 10660395 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 3601B174F for ; Mon, 29 Oct 2018 23:56:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1E3F628CD0 for ; Mon, 29 Oct 2018 23:56:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0FA6729238; Mon, 29 Oct 2018 23:56:31 +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 817CA28CD0 for ; Mon, 29 Oct 2018 23:56:30 +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: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=IstQKYhZeTieoBtyrLCiQl5tUhYKqhdUFGzKSFVgcWY=; b=sd/HxM+/oHuR5dDqSkfUZrnGA3 q5pTL9SMaXQFXnssTVqPMTg3B1Dho8XSe3T2zoZyVeYGeLb79S9b+EnFrAI45vroanzTAg6DYUT3d bptggS+/CPH2Sfa9shJql3pgElQ9SFJaUiv+tgP+1OQy5XOTEO9iXWE+ad6Ah5ZHhuNl62xNwQUSt DwSQIFBB3sBZPWJoSbpfv27qSVcjIg0vpxG4j9JK3KxtWVUZu/BmeBgYlWiSC2KrM/rNYSTGkmwYB EvF3HuijZoXOpGGGH/fAmzfNf89wQb8flZ1bmjY0J3Gq/8DJ6NE/TlE6A240x5ctU/hk0Hry9bP5q /BxKdYOQ==; 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 1gHHOT-0006p2-Ip; Mon, 29 Oct 2018 23:56:25 +0000 Received: from mail-pg1-x543.google.com ([2607:f8b0:4864:20::543]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gHHL4-00044R-OC for linux-arm-kernel@lists.infradead.org; Mon, 29 Oct 2018 23:53:14 +0000 Received: by mail-pg1-x543.google.com with SMTP id m9-v6so1970542pgl.13 for ; Mon, 29 Oct 2018 16:52:47 -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=UCzz1toXQe6bQDYNTpARd+cAILXLMTsKuFpS/Hs6ZpA=; b=hGDIKmT8JC7ldxnYEi2TgGW3IK81ZJRtagn6wQGiIyQ5dvfVWuQNuNviAJ69A7YPbf 2CtGs23/wkWaJTlEsYvj1Q0LsJ1R3TqDsBt4PgkChy7wjMoIEiD9ggIH90rEbEURFFGx 3AQ9Ej2tM5ASJ3OoKYiYdt6+ZtkIMt12oFKc4GorkmUt/3VRfzqRKM26/+i8kUF1jM5j oOY0bfuw3OsCdbrqvgyxVLCZFVAN8ZCTnJE9Qc+qqskxNPJeRXukaRVk5/pOCCiLXiwV 6UfaddskARqZz0FR51m9H/4hgWcWPNDQIgkFfgEUt3WOCLMwx7s8cSsneAG67ld1/84G xG1Q== 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=UCzz1toXQe6bQDYNTpARd+cAILXLMTsKuFpS/Hs6ZpA=; b=ZzKdqi7a/nBj7v/P2ZQXRe3Z/zrP5wXGJLuvTJncsoCcIL6hs0z0jzHitQu/CGORA5 vw5n8Zu9EOrZ2ZexCtlyj2quMNCR79IvaIluIe3M6fW8qrwf67PUKSWgqHkulzIOTtX7 MTCYSw87vVEfK1KBH5D3iOobZjbr5txn3gdahfW0gK0KDqKjvgM68v9pJ1msY5l97kto DVYOPrsGNSr0wx2BNE8pJwz8uoRqfScy6kvnSegFum7DDm3n5oB1vVXWQcdTUIk5P0W6 DFSlu99/Far22JqMN5fkM5T10SrOBiOviDjBhE8DsqbuevRjVpDyAAjwxgxGnuJaK2Jj ed7A== X-Gm-Message-State: AGRZ1gJx4Z9+yjq3MnkALi8qHnA31tv2XDXupgieEigjvSv+b+z9u7bt /T3JRnxeF+hewkTeThwPIWM= X-Google-Smtp-Source: AJdET5eHYVb/NuHFBjEhkC8HoR0aFVfakxqd+ruG1hahbvjrnV9ih3tJJ5QxKfR5ltvetBxWyTVzjQ== X-Received: by 2002:a63:fb41:: with SMTP id w1-v6mr15900303pgj.321.1540857166303; Mon, 29 Oct 2018 16:52:46 -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.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 29 Oct 2018 16:52:45 -0700 (PDT) From: Florian Fainelli To: linux-kernel@vger.kernel.org Subject: [PATCH 6/6] of/fdt: Remove definition check for __early_init_dt_declare_initrd() Date: Mon, 29 Oct 2018 16:52:06 -0700 Message-Id: <20181029235206.30060-7-f.fainelli@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181029235206.30060-1-f.fainelli@gmail.com> References: <20181029235206.30060-1-f.fainelli@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181029_165254_883933_65426885 X-CRM114-Status: GOOD ( 13.81 ) 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 With the one and only architecture (ARM64) no longer defining a custom __early_init_dt_declare_initrd() function, just get rid of the check for that function being already defined. Signed-off-by: Florian Fainelli --- drivers/of/fdt.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c index 313cd4f24258..3d84fe79eeb4 100644 --- a/drivers/of/fdt.c +++ b/drivers/of/fdt.c @@ -892,7 +892,6 @@ const void * __init of_flat_dt_match_machine(const void *default_match, } #ifdef CONFIG_BLK_DEV_INITRD -#ifndef __early_init_dt_declare_initrd static void __early_init_dt_declare_initrd(unsigned long start, unsigned long end) { @@ -904,7 +903,6 @@ static void __early_init_dt_declare_initrd(unsigned long start, phys_initrd_size = end - start; #endif } -#endif /** * early_init_dt_check_for_initrd - Decode initrd location from flat tree