Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp2450116pxb; Tue, 13 Apr 2021 02:05:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzHGhtqvBeGldYarRQDPd8gCeZTEGA1vIPsgqt9rF39XiWHskzp8H6g6AYAnWyT9aPdkELz X-Received: by 2002:a17:90b:19ca:: with SMTP id nm10mr3799213pjb.175.1618304716584; Tue, 13 Apr 2021 02:05:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618304716; cv=none; d=google.com; s=arc-20160816; b=AbtiPfUndjZWI0FtqkRUjlbWo7NttTFKXJYMBAkUJCVSNi9DkP0hrgBE9+CF6gKKK6 jxMXyJRnYw5faELHTTzcreRKCkIZPyxdWJAzXL8tG5qJ0/vw9zZnsRkT38dnKGIyEFZl QUG9qQzCuDEwsFXkIYuWD/yv+/5It9aY16AiNEg32SGZdPoH3qFavH28lHH1iU2gTMf8 mVdxVeTK6P0dJ7LnnRAdIl3Z5+rTjOn700lP8oRKio9Y1YeSTVPuUEpNfzWY7UV/JE7G 0sNtS3UScNHUfIIfoulGRMjDSwnL6kNen3XrJCQgeoNBu6QtMhNQpjedM9KRI37DErtE uzdA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=M4M2rpCGtRwRg1+8877RTBO/hucYsuldRGZssGiZkFU=; b=PYGYiyFbZXa6RwrvsSRtW06OdZxZKuZxd32IYXGKOVgS+lV5uFi/g7OxduBdQ0fr4+ iTwJKA8zBygBwyHkjSilUOjpIWZ4oDoR4wF8Kfg4q7PvujsCnF+dpxdqbVJu4EH22uPA KODj1ItZCzfZnZsX06jigTWbNySILXIU7z9tsQEIS+IVjvKhZAlun4kE5Pf/9unzmQQB YOReKvWOk/vBBOTFu4ceZ9PBzX4zp0r3RfB6vKhm6VSgfBys/nZIWyqox71N+dUM0ATz Mhj9p4tLB/zIsFG2lmZdniH8hOt01xGrT/noQEbVAsCUW/P1l9fKwIyxVLqWXUmQs8Q/ fCLA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=GaSOG8KY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w1si2380329pjq.100.2021.04.13.02.05.04; Tue, 13 Apr 2021 02:05:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=GaSOG8KY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243386AbhDMGwj (ORCPT + 99 others); Tue, 13 Apr 2021 02:52:39 -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-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