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 X-Spam-Level: X-Spam-Status: No, score=-2.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CC79EC433ED for ; Tue, 13 Apr 2021 06:52:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A2EDC6128E for ; Tue, 13 Apr 2021 06:52:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245093AbhDMGwl (ORCPT ); Tue, 13 Apr 2021 02:52:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43184 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236569AbhDMGwi (ORCPT ); Tue, 13 Apr 2021 02:52:38 -0400 Received: from mail-il1-x12d.google.com (mail-il1-x12d.google.com [IPv6:2607:f8b0:4864:20::12d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4248EC061574; Mon, 12 Apr 2021 23:52:19 -0700 (PDT) Received: by mail-il1-x12d.google.com with SMTP id b17so13239212ilh.6; Mon, 12 Apr 2021 23:52:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=M4M2rpCGtRwRg1+8877RTBO/hucYsuldRGZssGiZkFU=; b=GaSOG8KY8ZaZWLXAPHL7vrlSMfr8PXo4xP3uO29spI7irXqCNRyf+p4b4X+96hQ++6 C05BWz193nKUehM/+jIYGKjPy1xKu1Q3KjL3Xqeinj/xz7IWAHqlZQXpxqaxnvYzRhqT aGhs3qQkhhMUuc5OMilbvHOK7AuuSHVhSt4l0BRiM4l5+uXGaTzfY+ccIwfabXgKYkK1 ZHeZEDtGquWqarzXe7vsxV+iXoVOvG86aeZNDLL5UtJ0YiRZ9w2tEC8mWdChka5sYX7u z70hCoH3+M2mqDKItwT3xagkU7WLz4jfOGVgS+cPMzYNtxV7uDBMuKKggSw+nZ9VAIoN 9ISQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=M4M2rpCGtRwRg1+8877RTBO/hucYsuldRGZssGiZkFU=; b=nTMdX45pVsCStOVF0JH4eW/cR2J7B2JvOXbh/z8fhWYusa2oqTdBy42hiIT0tdmNO9 bkR5hJ6VLnqVbN3cgDPKxXn5uw97ireOCcow/JtD9g0F8X76s9tUYCKdBCK2yyziB9I2 z/EEGZxUb4x8GQO2dyrYAhmH41ylbpmFdzVWtQ2TPbIZY9sY/uVIxswAFLtPxnvQ2kKM rJO7eFXUvvmkkkokdUwFlD/GnGi8wtG93v5SEw2tpUFevhoMyUcNMjEJI2rmKbF/uMl9 vRSSL3IbNARjIOWKzaBhHCLomRMtSJ3LuoZjJUjvdnmwpU67AXbaeNrhqSNeqhpNC10A MJkw== X-Gm-Message-State: AOAM531ba4pMgs5PHSbP9hVp/tUn3m+/ziAFkA53lyCDVcENpimrMpzS G/C+3wSKxUYjxCy9q6rRvon2F4VRxnXGQNsqJEXjQuEw8vnhhQ== X-Google-Smtp-Source: ABdhPJwrHdB4Kty/56ZRa5JOtBSFNPRqlb4H2lwFBOov/5dyFRtZC+Yr1D1fJoECc7QtqzoNu+tm1iTflbWH942Iy+E= X-Received: by 2002:a92:cec3:: with SMTP id z3mr9236418ilq.179.1618296738783; Mon, 12 Apr 2021 23:52:18 -0700 (PDT) MIME-Version: 1.0 References: <20210307194030.8007-1-ilya.lipnitskiy@gmail.com> <20210312151934.GA4209@alpha.franken.de> <20210406131043.GG9505@alpha.franken.de> In-Reply-To: From: Ilya Lipnitskiy Date: Mon, 12 Apr 2021 23:52:07 -0700 Message-ID: Subject: Re: [PATCH] MIPS: fix memory reservation for non-usermem setups To: Thomas Bogendoerfer Cc: Mike Rapoport , Tiezhu Yang , Jinyang He , Youling Tang , Tobias Wolf , Marcin Nowakowski , linux-mips@vger.kernel.org, Linux Kernel Mailing List , stable Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Apr 12, 2021 at 11:45 PM Ilya Lipnitskiy wrote: > > Hi Thomas, > > On Tue, Apr 6, 2021 at 6:18 AM Thomas Bogendoerfer > wrote: > > > > On Sat, Apr 03, 2021 at 07:02:13PM -0700, Ilya Lipnitskiy wrote: > > > Hi Mike, > > > > > > On Tue, Mar 16, 2021 at 11:33 PM Mike Rapoport wrote: > > > > > > > > Hi Ilya, > > > > > > > > On Tue, Mar 16, 2021 at 10:10:09PM -0700, Ilya Lipnitskiy wrote: > > > > > Hi Thomas, > > > > > > > > > > On Fri, Mar 12, 2021 at 7:19 AM Thomas Bogendoerfer > > > > > wrote: > > > > > > > > > > > > On Sun, Mar 07, 2021 at 11:40:30AM -0800, Ilya Lipnitskiy wrote: > > > > > > > From: Tobias Wolf > > > > > > > > > > > > > > Commit 67a3ba25aa95 ("MIPS: Fix incorrect mem=X@Y handling") introduced a new > > > > > > > issue for rt288x where "PHYS_OFFSET" is 0x0 but the calculated "ramstart" is > > > > > > > not. As the prerequisite of custom memory map has been removed, this results > > > > > > > in the full memory range of 0x0 - 0x8000000 to be marked as reserved for this > > > > > > > platform. > > > > > > > > > > > > and where is the problem here ? > > > > > Turns out this was already attempted to be upstreamed - not clear why > > > > > it wasn't merged. Context: > > > > > https://lore.kernel.org/linux-mips/6504517.U6H5IhoIOn@loki/ > > > > > > > > > > I hope the thread above helps you understand the problem. > > > > > > > > The memory initialization was a bit different then. Do you still see the > > > > same problem? > > > Thanks for asking. I obtained a RT2880 device and gave it a try. It > > > hangs at boot without this patch, however selecting > > > > can you provide debug logs with memblock=debug for both good and bad > > kernels ? I'm curious what's the reason for failing allocation... > Sorry for taking a while to respond. See attached. > FWIW, it seems these are the lines that stand out in hang.log: > [ 0.000000] memblock_reserve: [0x00000000-0x07ffffff] setup_arch+0x214/0x5d8 > [ 0.000000] Wasting 1048576 bytes for tracking 32768 unused pages > ... > [ 0.000000] reserved[0x0] [0x00000000-0x087137aa], 0x087137ab > bytes flags: 0x0 Just to be clear, good.log is mips-next tip (dbd815c0dcca) and hang.log is the same with MIPS_AUTO_PFN_OFFSET _NOT_ selected. Ilya