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: 10642175 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 9CB3018BC for ; Mon, 15 Oct 2018 16:31:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8A66B29AEA for ; Mon, 15 Oct 2018 16:31:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7DEF129C48; Mon, 15 Oct 2018 16:31:49 +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 D468C29AEA for ; Mon, 15 Oct 2018 16:31:48 +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=YV1AtyLk1WOkYky4OZdRXVi82jCcTnIVtClB8pEh6BA=; b=O7nufl+37HUkruv1GPzBfXchx/ DYVYZlh3/hlUzprRClExKTX1l5OB1r8ymeSeso/IAe7wXWBy8pIYlWcn+absJi0fjrtifCE8PD0ov JR7AGzOMKxdoUZ2JxBk9Rg6AFHkYGk0+A9oEjtukZ70O4iPvV0RBOWx9DZu8qJBLslLMzauwvGFtV glGNXk4LnCvhV5wKpv2EbSnCl/xBfcQBoFuasS6sjSdRyIoP0mMsdxyhdg6iCo/MY48w+oJrc/+96 +OWHvqhlcplaoy9DQDbgEPf4Y8DdWSDNowAVANzBujKJtHo3a5Ah60OJcaDgeJ6NPynOCylh4OCMe poMAPYIQ==; 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 1gC5mH-0006R4-9c; Mon, 15 Oct 2018 16:31:33 +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-00044E-TL for linux-arm-kernel@lists.infradead.org; Mon, 15 Oct 2018 16:30:40 +0000 Received: by mail-wr1-x444.google.com with SMTP id n1-v6so22083829wrt.10 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=BtXeYn81a1K7Afy6aUpSwpCv9UE+BgXtgtl6+rybpt+EymYs6TTq9Pcf5BYd0Ffig0 iup2VuEgzJ4lujUU/RsICFcaC4Y1OSIFub/cLKfSiQrBfgFic/5R8EBuFodGOt0ZAjo5 KpYF/qzsQ/+Xm3sfEiwQOkj5pw6j0xaC3e/+7a2gikbqS7jY/Vh6eMuqZP1dOk6woarc 3qZH2d/2B/yuYYrlP1yFPM7Lijuw2+/5jMv/UnubZYe6olOps983HRvh6gWVCDpZG1Ks Oc1BxvfEN8Xo/pw4i4vus2o3dleqJ9IkGRbvHSCx7xZVUN3gDzrVH6Ff74KAmiuKJ508 5wcw== X-Gm-Message-State: ABuFfogVW4+Bg/EJZLPaMVmUwCJ4X/rJ7a0adCoOQRsIjT76cB0j3ihg nKbu6a1+PG4QW2sL3fAMlsJ0EQ== 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_092852_039794_12D8B345 X-CRM114-Status: GOOD ( 16.68 ) 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: 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-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=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;