From patchwork Mon Oct 15 16:28:32 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Brunet X-Patchwork-Id: 10642177 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 040993B73 for ; Mon, 15 Oct 2018 16:40:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E5A9329A71 for ; Mon, 15 Oct 2018 16:40:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D9C8229A75; Mon, 15 Oct 2018 16:40:30 +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_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=unavailable 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 54A1529A71 for ; Mon, 15 Oct 2018 16:40: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=aFs46ni0I26AXNMhbLHu1wmlwusrV6G+97YkAL+Di5s=; b=KaMDfz8L8j1fuVop4fSN4M4x7O dMXJ+wWmZuH1NuLGl8chFXAq3sylKiIttA/wxdATcnezeE91+w72HhpqzEtaIXYVEUfUavw405sWK r4yDLmLDr+8nknPz5vGHr5YuOIRB4srXdME6hyi/Fmav2Fr8KzopuCZKmYssvuWXw6Ome6Pk2CjsE TwrGABF8JKYnqLF7J6ttV/yrXhB2/oY+RlvKxcmZx/dDXWmUeJ7THD9E/8QdfrMRpmSDu7DlWhMlq UDEtY4C6mp5wWnFnIIIox/cXqSp8TOZJ2DqRt+oG/aBQ5TdVR9KEZ1t1hDgokkYDi+/yR8LMuMz6C Bm5NK0Cw==; 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 1gC5uu-0001Zg-CR; Mon, 15 Oct 2018 16:40:28 +0000 Received: from mail-wr1-x444.google.com ([2a00:1450:4864:20::444]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gC5jf-00044D-RL for linux-amlogic@lists.infradead.org; Mon, 15 Oct 2018 16:30:34 +0000 Received: by mail-wr1-x444.google.com with SMTP id x12-v6so22066630wru.8 for ; Mon, 15 Oct 2018 09:28:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=eXycmWv4/YSgM20PwhnetExzSgEMuwDfaJY/spL27UM=; b=f4PM9RPrtH39FeI9DhSFAPxrqe+xpB8dyZCE1gAXktR49AOU41v77ohMNmG3zka5IJ ZgARpJm4Gkj0orM7sV/P3A2pLhhvF7yXsWqa4LHkg2vEZnv/vcnibn6CgJ5iU08IXtte c1K2AC7jtipTPlS+nx8yFl4Yos+ZlJLaB0jKn5AtA+2e0d22kDi8qlwdcCs4mTAwu3eg rC+Cs2Lr9JnJLsiLiCRpojVACEjN+r17Rthn0+lOrutjjMhyscTZHMi7Nu2vfwpOVRGN wbqPUFGi5SBRSBZnEI2PGiOSI+K76Ft/yi6h4A2wOiLEkpNgqTmY4lQhpovG+9wwkYkj qLXQ== 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=eXycmWv4/YSgM20PwhnetExzSgEMuwDfaJY/spL27UM=; b=sxH6kYWQ2Mx45J22WW8xIs+KVeSYNKYe8tOKWd2z3fRv1ktuivPBW2DNDt62IhHHGX IjO+rK4DKuaTCdogI9i4ERg3E4oqNhqn9bMEzy2zHuGTps8bexEq52IOUNzMH/RTicCZ vOqJl3TNx/DR4CiDVAsvM1S/M18LrxOYRtmQlBqOl3gWTXU2KEYZe1LAXrvvHQNFpKzU 1CJKyLE4Lls/CQ6mFzeF/GOQtQk7+he5lrxhIQcyFZ38SbHevKVHdtdR9LDUHovTL6nT ge5zllHDMXhGB2XnDQR/9cpdVT/dKeiMdaCAJtOhozNdaL4+uSmMA9VfsPQlMdjFYg4B 7V+g== X-Gm-Message-State: ABuFfogvFd6zPHFlktanH9z2MuodXGNC0I/rw3jHOAMT1c8SWHvZ0bdP 5uVqvWnEzv6j6mjqkMMI++POSw== X-Google-Smtp-Source: ACcGV61xlLh0dbNUWNrramcTqd55VK8KDy2MzkW/JhpY/Os7vOCH1MWsB6QGNv+BOlwWBOBgbcdKWQ== X-Received: by 2002:a5d:4ec8:: with SMTP id s8-v6mr14144300wrv.32.1539620920122; Mon, 15 Oct 2018 09:28:40 -0700 (PDT) Received: from boomer.baylibre.local ([90.63.244.31]) by smtp.googlemail.com with ESMTPSA id c8-v6sm14045926wrb.6.2018.10.15.09.28.39 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 15 Oct 2018 09:28:39 -0700 (PDT) From: Jerome Brunet To: Kevin Hilman , Carlo Caione Subject: [PATCH 1/2] arm64: dts: meson: fix reserve memory regions Date: Mon, 15 Oct 2018 18:28:32 +0200 Message-Id: <20181015162833.7544-2-jbrunet@baylibre.com> X-Mailer: git-send-email 2.17.2 In-Reply-To: <20181015162833.7544-1-jbrunet@baylibre.com> References: <20181015162833.7544-1-jbrunet@baylibre.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181015_092851_928560_9D207DC0 X-CRM114-Status: GOOD ( 14.69 ) X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Neil Armstrong , linux-kernel@vger.kernel.org, stable@vger.kernel.org, linux-amlogic@lists.infradead.org, linux-arm-kernel@lists.infradead.org, Jerome Brunet MIME-Version: 1.0 Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+patchwork-linux-amlogic=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Since commit 50d7ba36b916 ("arm64: export memblock_reserve()d regions via /proc/iomem") was merged Amlogic's boards using mainline u-boot started showing the following warning: WARNING: CPU: 0 PID: 1 at arch/arm64/kernel/setup.c:271 reserve_memblock_reserved_regions+0xd8/0x144 Modules linked in: CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.19.0-rc7-00263-g385684b3eb27-dirty #254 pstate: 40000005 (nZcv daif -PAN -UAO) pc : reserve_memblock_reserved_regions+0xd8/0x144 lr : reserve_memblock_reserved_regions+0xd0/0x144 [...] This is due to u-boot setting some /reservedmem/ region while our dts declares reserved memory on the same region with no-map. The conflict produce the warning. This is fixed by using /reservedmem/ in our dts as well, which is probably something we should have done from the beginning. Cc: stable@vger.kernel.org Cc: Neil Armstrong Signed-off-by: Jerome Brunet --- Hi Kevin, I would have liked to put a Fixes tag above but I could not figure out which commit to pick, considering how much we changed those regions in the past. If you have suggestion, I'll be happy to repost this patch. If you prefer, feel free to amend this patch directly. Cheers Jerome arch/arm64/boot/dts/amlogic/meson-axg.dtsi | 24 +++++-------------- arch/arm64/boot/dts/amlogic/meson-gx.dtsi | 27 ++++++++-------------- 2 files changed, 15 insertions(+), 36 deletions(-) diff --git a/arch/arm64/boot/dts/amlogic/meson-axg.dtsi b/arch/arm64/boot/dts/amlogic/meson-axg.dtsi index 178d8e8c56b8..06a06f11f114 100644 --- a/arch/arm64/boot/dts/amlogic/meson-axg.dtsi +++ b/arch/arm64/boot/dts/amlogic/meson-axg.dtsi @@ -13,6 +13,12 @@ #include #include +/* 16 MiB reserved for Hardware ROM Firmware */ +/memreserve/ 0x0 0x1000000; + +/* 3 MiB reserved for ARM Trusted Firmware (BL31) */ +/memreserve/ 0x05000000 0x300000; + / { compatible = "amlogic,meson-axg"; @@ -115,24 +121,6 @@ method = "smc"; }; - reserved-memory { - #address-cells = <2>; - #size-cells = <2>; - ranges; - - /* 16 MiB reserved for Hardware ROM Firmware */ - hwrom_reserved: hwrom@0 { - reg = <0x0 0x0 0x0 0x1000000>; - no-map; - }; - - /* Alternate 3 MiB reserved for ARM Trusted Firmware (BL31) */ - secmon_reserved: secmon@5000000 { - reg = <0x0 0x05000000 0x0 0x300000>; - no-map; - }; - }; - soc { compatible = "simple-bus"; #address-cells = <2>; diff --git a/arch/arm64/boot/dts/amlogic/meson-gx.dtsi b/arch/arm64/boot/dts/amlogic/meson-gx.dtsi index 676a995fb912..23e879b29b1e 100644 --- a/arch/arm64/boot/dts/amlogic/meson-gx.dtsi +++ b/arch/arm64/boot/dts/amlogic/meson-gx.dtsi @@ -13,6 +13,15 @@ #include #include +/* 16 MiB reserved for Hardware ROM Firmware */ +/memreserve/ 0x0 0x1000000; + +/* 2 MiB reserved for ARM Trusted Firmware (BL31) */ +/memreserve/ 0x10000000 0x200000; + +/* Alternate 3 MiB reserved for ARM Trusted Firmware (BL31) */ +/memreserve/ 0x05000000 0x300000; + / { interrupt-parent = <&gic>; #address-cells = <2>; @@ -23,24 +32,6 @@ #size-cells = <2>; ranges; - /* 16 MiB reserved for Hardware ROM Firmware */ - hwrom_reserved: hwrom@0 { - reg = <0x0 0x0 0x0 0x1000000>; - no-map; - }; - - /* 2 MiB reserved for ARM Trusted Firmware (BL31) */ - secmon_reserved: secmon@10000000 { - reg = <0x0 0x10000000 0x0 0x200000>; - no-map; - }; - - /* Alternate 3 MiB reserved for ARM Trusted Firmware (BL31) */ - secmon_reserved_alt: secmon@5000000 { - reg = <0x0 0x05000000 0x0 0x300000>; - no-map; - }; - linux,cma { compatible = "shared-dma-pool"; reusable; From patchwork Mon Oct 15 16:28:33 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Brunet X-Patchwork-Id: 10642169 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 BB6FC15E2 for ; Mon, 15 Oct 2018 16:29:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A9F2D29938 for ; Mon, 15 Oct 2018 16:29:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9D0C829A27; Mon, 15 Oct 2018 16:29:41 +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_SIGNED, DKIM_VALID,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 4186A2994B for ; Mon, 15 Oct 2018 16:29:41 +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=m4q0E9Cs7VAv+ZwMdtbXINGKTr4ra16WnFWX+Czx2dU=; b=CjR229BIcCEyfvkl32+tdP+FQQ 0c49Wo2x8eRd4SJ1Q0Vf9rRNs5zi3iNhyflQbcSfraQVZWTC3FF2PuHhtcVvR2c9Nj0VsGZ5x0QwO lGMCnwSjdiSVIpJBU3+j7OPK4yAvuPidHv+9LJx6sGy+BxCS1bfxcTOBAUrfTnbNPOD6cVJyjUHHT s0IIrXgJutYRGc4rU4ZPrONHlsfSP6gc11qVGeQ4xbq/m+L+SqpnM030H4/f6NN8/mnuCxtMhj5+4 JEdKAnJYURMMWAtnJOaJSjv8wxfegtD0RSvvAouXewwERmjJJm6yxgV3tx6hs3fyPB97IJdr8D8Rl uEXt7r9g==; 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 1gC5kO-0004Nm-Te; Mon, 15 Oct 2018 16:29:37 +0000 Received: from merlin.infradead.org ([2001:8b0:10b:1231::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gC5jo-000483-HE for linux-amlogic@bombadil.infradead.org; Mon, 15 Oct 2018 16:29:00 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=+DyCxkj+D/g7NE4kKGpBjPKPVkzXiIpmqo3AIhGxDvM=; b=RuW2W1sdFRMuYxtnCu3yW0Ohw ba7ceM6+vZ+ePzDQhGEsr/oTHQItvTbX8lA4k0e3XYwsx2U+oqVRzxfpiu5MLu52c7xRAtabp/WrI dYzPNBDtY4u75ZZKwRL7C+RfLqDk/3a64ZFoxFdpvVG1optVhxja1eZUSHBJeDDlVOQ2gFSBE0fdQ 8YQnL1GAEy2kccg7WfryxrKERGttiL4Wd38WRltciuaK8iw2yDCuj9EdYymOgf7NweRHH6z4qPa6G 1Xzwi+bH5EJJ8dB4Dd3KaEBwdU5/TxZfoJUHl88v1n3cqNc5jnvNHDTG5rAXbefPbH3TGoUE7LiHj WjR4ycKqg==; Received: from mail-wm1-x341.google.com ([2a00:1450:4864:20::341]) by merlin.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gC5jm-0001hm-7D for linux-amlogic@lists.infradead.org; Mon, 15 Oct 2018 16:28:58 +0000 Received: by mail-wm1-x341.google.com with SMTP id 189-v6so19568792wmw.2 for ; Mon, 15 Oct 2018 09:28:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=+DyCxkj+D/g7NE4kKGpBjPKPVkzXiIpmqo3AIhGxDvM=; b=Q1xQdC63nkv6Lh/d80Fpmmwk8rPAcqvT2R4JV4asJhxrT5+680VrX463iwZQPcc3bN HHrKEfRhP6Yjm2s8AVXSpkqdtoaDoE9Bl1RJkr+rAfjEwneBrFxIhU50+67dmlpIs+5+ 69BZ8FIQd4k+aO0pPqxtmaIqbYjRRT5mJDsxnOmzXGu5TwLzjCRn5FI5d3C/kmkEj8II 25ik4hFFAIaf0B/Js+N6nx1Owe2/JlNNTlUtxtd6i5Ua2Wbh5qOPmFNIhJ+i0k7NYcF2 vs9mczhvEV4BniFaFakU1bvvjMDR4019JC3L79E15NGuEgKGlhiAdQkK+KjyAL5pWfRq +w6w== 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=+DyCxkj+D/g7NE4kKGpBjPKPVkzXiIpmqo3AIhGxDvM=; b=b4PWvDSi6bsEI6BOUHFDiSN6/nQviVZJHbRCIDK9uc1mXGUEXJFrGpgnsjH4pM7d+D PiM4+u/Nt9dsndVPealLn163afnhxUTBO3rat/2Cuk3eG+f3fACEwMzmlPqMjmFEBZWD QM3dVVieCixpv04jwWU1H8LPy6VV2AY/gL3dyPW+PFMOoqc0I9YQz3iLczeVjLcU9amo 62qz1XoyCTATCYAgmnR+SkXXG2r0aMb3oetAB6bXrS6LuyWkXQW/UVxCAfEMKLUxljcU C/Bwdi6hj0Fe9WaisHCKmfAjkW/GcOc20018U8P+v0Ul4A1fwmCkb4pwZmLGZrPMCqyI Dqng== X-Gm-Message-State: ABuFfojX5nud7tw+GRiGidc5m6Mte15uumC+LlTnbPHQ2ThAiciIoIMN QLHYxBwYY2PI44ChGO28eOBkmg== X-Google-Smtp-Source: ACcGV62HkoxUQ52H1Yx+hYWGE8YWRM+J61hf8qEgi6ROI98JdikzSqYHqzy7yNxJkTXhrgJ2D+6sjw== X-Received: by 2002:a1c:1dc8:: with SMTP id d191-v6mr13325599wmd.27.1539620921040; Mon, 15 Oct 2018 09:28:41 -0700 (PDT) Received: from boomer.baylibre.local ([90.63.244.31]) by smtp.googlemail.com with ESMTPSA id c8-v6sm14045926wrb.6.2018.10.15.09.28.40 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 15 Oct 2018 09:28:40 -0700 (PDT) From: Jerome Brunet To: Kevin Hilman , Carlo Caione Subject: [PATCH 2/2] arm64: dts: meson-axg: drop FW reserved memory Date: Mon, 15 Oct 2018 18:28:33 +0200 Message-Id: <20181015162833.7544-3-jbrunet@baylibre.com> X-Mailer: git-send-email 2.17.2 In-Reply-To: <20181015162833.7544-1-jbrunet@baylibre.com> References: <20181015162833.7544-1-jbrunet@baylibre.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181015_122858_270510_38CA3780 X-CRM114-Status: GOOD ( 11.18 ) X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Jerome Brunet MIME-Version: 1.0 Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+patchwork-linux-amlogic=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP The axg does not require the FW memory region for all we know. This seems to be something we carried for the gx family for no reason. Fixes: 9d59b708500f ("arm64: dts: meson-axg: add initial A113D SoC DT support") Signed-off-by: Jerome Brunet --- arch/arm64/boot/dts/amlogic/meson-axg.dtsi | 3 --- 1 file changed, 3 deletions(-) diff --git a/arch/arm64/boot/dts/amlogic/meson-axg.dtsi b/arch/arm64/boot/dts/amlogic/meson-axg.dtsi index 06a06f11f114..d1beedc4fb0e 100644 --- a/arch/arm64/boot/dts/amlogic/meson-axg.dtsi +++ b/arch/arm64/boot/dts/amlogic/meson-axg.dtsi @@ -13,9 +13,6 @@ #include #include -/* 16 MiB reserved for Hardware ROM Firmware */ -/memreserve/ 0x0 0x1000000; - /* 3 MiB reserved for ARM Trusted Firmware (BL31) */ /memreserve/ 0x05000000 0x300000;