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: 148876 Delivered-To: patch@linaro.org Received: by 2002:a2e:8595:0:0:0:0:0 with SMTP id b21-v6csp3996724lji; Mon, 15 Oct 2018 09:28:46 -0700 (PDT) X-Google-Smtp-Source: ACcGV61oA28OOuvbRtMlCFnR7KOwTHG5sOGFBGxvCe118MUKVw2GB+Zs09gxgwBszm+gFk84YHCv X-Received: by 2002:a17:902:15a8:: with SMTP id m37-v6mr17711859pla.132.1539620926679; Mon, 15 Oct 2018 09:28:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539620926; cv=none; d=google.com; s=arc-20160816; b=bLxVjkT1yfL9Tsq5bSzdpWJb7JleNYvUlE4VXtsppQIDuqgGwGwi3DbLqBdeqTTbND xXQ4DyXQcyLNim8IYQD6oGuIfKKH1R41oPPd6m2ho1F715q7gcYBsTFYu3MWGSxlUfbj wfx+9ukTwVCMrGrQ1YUIZu0xp1YaZw1Wm/zglUkNdpaiMUqlKueteLPcXmAkbaPxaivJ FsEWbZljj0tOd0IOI9KhpkIDaAPaigdaO/zxrSOPAbTGKWyThstnIZaJ5HOOkJV7YVP3 g8Sg0PVMkmtoi/WHW686ovQe6iPEx2uuDZoQuoxvIgBlvanp5YIQLGSU9MJBW2k2NhLD 5BEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=eXycmWv4/YSgM20PwhnetExzSgEMuwDfaJY/spL27UM=; b=JPLmFBcQW1s3xmy4kArfmstDu/jxlUiA+vb8lhY5WNCHh5ZSTSW01XnyBqR0i9+zer WwRjBfvHOWEd5qgss5ngRr32Y/t3GLW2aWImd3NurYYzYm5kylZNYMvygzTkdDhEhzLh fdZEp1KPPi97En9+PxW0RD2lhcLyAaP6yjS1B/wZ9ZfqnUBRaKvUYKv4wha4WtStNMTp cDr9lR5s2e3U1IU7GDaKg9I1JIumgxQmC17cV4UmocsgtmRu/YjS4lVEGPiRC/6MekM9 h+XJGKw2US9KnmrOwyZlk4A23FSbKd5ujz9d2RtuAjdZ49n+Ia2yqMpkzMPuqvVsd9FV qauA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=f4PM9RPr; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y30-v6si11253062pge.142.2018.10.15.09.28.45; Mon, 15 Oct 2018 09:28:46 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=f4PM9RPr; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726904AbeJPAOi (ORCPT + 32 others); Mon, 15 Oct 2018 20:14:38 -0400 Received: from mail-wr1-f67.google.com ([209.85.221.67]:36268 "EHLO mail-wr1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726827AbeJPAOi (ORCPT ); Mon, 15 Oct 2018 20:14:38 -0400 Received: by mail-wr1-f67.google.com with SMTP id y16so22097412wrw.3 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=XF7D9NkpoB7m5G4n3N5/aZViGo9kjW05MsqdRljGyoc37KbEH8pVQ2maU9lYcswg+B MIJOFub5wOovWWg6VWbUemjpeMR/M9TVEOmMbYCt8apRiRWJv/QMMVjybChPHb5npz8N zP/2tjg4DgHaEqbklyedfXUSSqH4PEDY3XKTus6dFCX6jRkuPTJrXzdJ1r5YqwxqYfn/ db8A50a8f4cA2ymJIXsjbt3s1bJSS2Y+ZC9p6nVzBeCOqE3Xuo1CPLn9NusdaGX4OWY0 MO7H/nYwJulhHbgG+ORLmJir3Rum9Gp3UePt3J6cd5DWWbUaTtaM82edxZ8hFszpTOaP TnRg== X-Gm-Message-State: ABuFfog/YfLWec7E1pJHEgsuX8nZL79bGivaz21/GbJ/Uss0TatVr8nE 96QyZ32bJ1NuKTLvaNndYQ7/9Q== 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 Cc: Jerome Brunet , linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, stable@vger.kernel.org, Neil Armstrong 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> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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(-) -- 2.17.2 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;