From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B099BC433FE for ; Sat, 22 Oct 2022 14:51:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229681AbiJVOvs (ORCPT ); Sat, 22 Oct 2022 10:51:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60626 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229608AbiJVOvq (ORCPT ); Sat, 22 Oct 2022 10:51:46 -0400 Received: from the.earth.li (the.earth.li [IPv6:2a00:1098:86:4d:c0ff:ee:15:900d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5B5582565F1 for ; Sat, 22 Oct 2022 07:51:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=earth.li; s=the; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject: Cc:To:From:Date:Sender:Reply-To: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=zK3GK745Rpekd0W3RMt4rPJA0uSmGOJkehdAfC4Sz4o=; b=kbSUpYYVx5Er7Y4ja6jOBUNuis UDYrfrLiM/JaU5yEfa1SgddD98KIhlH3oj5pPfe6gwz+Rf/zTcv0vImd7ArwOHRw47clBM/Ijvhv+ PQlwv89fSn1NUWER5gEHdTFLU0Z3JJhJxassuJZd6IuuazfKPPXteOhtR32x62hiiN9ISkn+TOLxD WmCxppr5R6OvjRXLryiBcym+ASw0JoKftM6tHZM6eywnDXnwAsE5/hYZTcXYeEwRV5j1BbN4yuuMh 8HGdtg+3ZrbORGfL8L1OmPjyyUfS0YdQScNR/nq84HTv05Dszp00O4UST9+ctc6BtWYqhZ35lUTmh aTNfl+DQ==; Received: from noodles by the.earth.li with local (Exim 4.94.2) (envelope-from ) id 1omFqG-004Bfl-Kz; Sat, 22 Oct 2022 15:51:16 +0100 Date: Sat, 22 Oct 2022 15:51:16 +0100 From: Jonathan McDowell To: Linus Walleij Cc: Christian Marangi , Geert Uytterhoeven , Russell King , Andy Gross , Bjorn Andersson , Konrad Dybcio , Arnd Bergmann , Ard Biesheuvel , "Russell King (Oracle)" , Nick Hawkins , John Crispin , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org Subject: Re: [PATCH] ARM: mach-qcom: fix support for ipq806x Message-ID: References: <20221021181016.14740-1-ansuelsmth@gmail.com> <63531543.050a0220.b6bf5.284d@mx.google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Oct 22, 2022 at 04:21:28PM +0200, Linus Walleij wrote: > On Fri, Oct 21, 2022 at 11:55 PM Christian Marangi wrote: > > On Fri, Oct 21, 2022 at 11:44:56PM +0200, Linus Walleij wrote: > > > > Is it not possible to use Geert's linux,usable-memory-range in > > > the chosen node to make the kernel stay off the memory? > > > (See examples by grep usable-memory in the kernel.) > > > > > just to confirm this is one of the example you are suggesting? > > > > chosen { > > bootargs = "console=ttyS0,115200 earlycon"; > > stdout-path = "serial0:115200n8"; > > linux,usable-memory-range = <0x80200000 0x1fe00000>; > > }; > > Yep that thing! > > > Main problem here is that uboot in some case doesn't support dt and pass > > wrong ATAGS (with the memory not reserved) and AUTO_ZRELADDR calculate > > the wrong addr I assume? > > You do have a DTB right, just that it is attached, and then the kernel > uses the ATAGs to augment the memory? > > In that case what about disabling ARM_ATAG_DTB_COMPAT > and adding the actual valid memory to the top-level DTS > file? Just like that: > > memory { > device_type = "memory"; > reg = <0x42000000 0xnnnnnnnn>; > }; The RB3011 (arch/arm/boot/dts/qcom-ipq8064-rb3011.dts) does this and has been working fine with AUTO_ZRELADDR (and no ATAGS support enabled) - I have a recollection it didn't used to, but it's certainly worked since the 5.15 timeframe. J. -- Generally, all generalizations are false.. This .sig brought to you by the letter M and the number 44 Product of the Republic of HuggieTag