Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp4107536imm; Wed, 5 Sep 2018 10:48:48 -0700 (PDT) X-Google-Smtp-Source: ANB0VdYzkUNRU+MAfhQESazT8rccc5RouR1PTGohftmMBsr3gHlMLahyh59gz7J9zvggHtHgeqc1 X-Received: by 2002:a63:d74f:: with SMTP id w15-v6mr37819372pgi.306.1536169728693; Wed, 05 Sep 2018 10:48:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536169728; cv=none; d=google.com; s=arc-20160816; b=rxxYbZ0Dgt41PcIhFMpfiYFFvAqXDzrICZJz2tgcUfzvXjVbpnkqHw4wlq8J+upmWu 9ei8cIxgZ8jbDd7SclfRXszhJgZduL6rWSaBLyma+3yvN6r5oOxqdYIwbqCI7SB45ajF W/PwsTseUNyl2yx8WYE2c5SjK5V2W/i8euhLx/rXrByntzjs5dS1zlA2LF36whc41GBA F/qV2M4/WIVeShUk0C0i5gzLSzVPNKzsI8Lm63CMPgMWk7kjD2PpbP+g7yKLcv4haU5u EMKk23iEIo0/gun5uZSzGjUhGL8a2sv5zvoMWYdPhqtJ8lxbIyXHwafKscyJKa0NS4SR zpeA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:spamdiagnosticmetadata :spamdiagnosticoutput:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=wrLc8JNF5DuGxNKXETWPafk8LIxuCw9MG9QVm1OBvLQ=; b=ONg4flXUjypWJ4jxkr/ExXpb6OEamkfR6ktW+ExA6/dOsS1gSNjUMlLnNRW9KmL2hb 2OUeF624vkvpfGgwuBHlEvi1o6Qf0bxHEZUEyNBhfQ8bsVfckgF6SwfN7foFF2ZG2MmU TM8RvaFtwJkveWDI86VutHU+w/7qjqtUoYorpbPrQArOyAn79I7yVYUTSBM0Qdr245BK AWkPJgeA0BkFwSQgDljZ/rjsHxWgYG7Yt2gG+GAJGblCALrCg4l924JS3Kf1ihrGTzTm /d5xe/eOQxDYo/reVNbcX/0qL2zppyDX4iN/ixbCa5td33NUF/DnW7BPz6hhPUqfjY/4 /CHw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@wavesemi.onmicrosoft.com header.s=selector1-wavecomp-com header.b=kFy1kXZs; 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 o20-v6si2388035pgh.319.2018.09.05.10.48.32; Wed, 05 Sep 2018 10:48:48 -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=@wavesemi.onmicrosoft.com header.s=selector1-wavecomp-com header.b=kFy1kXZs; 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 S1727501AbeIEWSb (ORCPT + 99 others); Wed, 5 Sep 2018 18:18:31 -0400 Received: from mail-bl2nam02on0138.outbound.protection.outlook.com ([104.47.38.138]:59635 "EHLO NAM02-BL2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726497AbeIEWSb (ORCPT ); Wed, 5 Sep 2018 18:18:31 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wavesemi.onmicrosoft.com; s=selector1-wavecomp-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=wrLc8JNF5DuGxNKXETWPafk8LIxuCw9MG9QVm1OBvLQ=; b=kFy1kXZsTbLLBCbsiGGWAs+8l1QpJOl1JFf9q7J4MV7Vsp3ZpA9AGSIHscCrpJ8SNkjuIeWE8bSOpxdMOcm/5I9anlIezO1h6xdrJzWP/S+d21togowseeXyjrlQrVpWEKhKEGHHN5VqtY5dsymw36qSsuJD1tsxDgmFTZobMw4= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=pburton@wavecomp.com; Received: from localhost (4.16.204.77) by BN7PR08MB4931.namprd08.prod.outlook.com (2603:10b6:408:28::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1101.14; Wed, 5 Sep 2018 17:47:12 +0000 Date: Wed, 5 Sep 2018 10:47:10 -0700 From: Paul Burton To: Mike Rapoport Cc: Serge Semin , Ralf Baechle , James Hogan , Huacai Chen , Michal Hocko , linux-mips@linux-mips.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH RESEND] mips: switch to NO_BOOTMEM Message-ID: <20180905174709.pz2rmyt2oob6bxpz@pburton-laptop> References: <1535356775-20396-1-git-send-email-rppt@linux.vnet.ibm.com> <20180830214856.cwqyjksz36ujxydm@pburton-laptop> <20180831211747.GA31133@rapoport-lnx> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180831211747.GA31133@rapoport-lnx> User-Agent: NeoMutt/20180716 X-Originating-IP: [4.16.204.77] X-ClientProxiedBy: BN6PR03CA0011.namprd03.prod.outlook.com (2603:10b6:404:23::21) To BN7PR08MB4931.namprd08.prod.outlook.com (2603:10b6:408:28::17) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 80bbd258-a63f-49aa-235a-08d613579c8d X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:(7020095)(4652040)(8989137)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(5600074)(711020)(2017052603328)(7153060)(7193020);SRVR:BN7PR08MB4931; X-Microsoft-Exchange-Diagnostics: 1;BN7PR08MB4931;3:yjJH/KRQdRM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XqJt1UJGAeO5k6yKyw6cNmD8jTJf/Nnz3SR7bvPCJsxerVb04KJPqRc1q+Smac4Ybf/j4D9x;4:N4sKgt85XJc/BRv4CSu5JPu11bMBTenuEPyDrBeNYh1EWmEEZ2Bg//4nok5T3yJd8wzo78Ic1xx9fLo4edfokPrhMN8Ei/Ou0L6nSpEtmvVTdOBiY0v/J7Lr39JFcWcpPZA7vbcoqq8OeOm5gc5ZteSMtwYUzGYvyiJacsnSao/QDAAZLCI841UhqxmP3QfR6a7ZR+K5Mt6GoVK9nbZKVfzfHLSTpCX2h4q/pA22P9x71JCqjgl6pyfX8/f0NC/dtAIDPpzoHETAQ0gvngvnEpNTYsaNhlmziq170bQx/HxM4XRjkgUH9vPjwhEAFC0h X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(104084551191319); X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6040522)(2401047)(8121501046)(5005006)(93006095)(3231311)(944501410)(52105095)(3002001)(10201501046)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123564045)(20161123562045)(20161123558120)(201708071742011)(7699016);SRVR:BN7PR08MB4931;BCL:0;PCL:0;RULEID:;SRVR:BN7PR08MB4931; X-Forefront-PRVS: 078693968A X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(6069001)(7916004)(396003)(136003)(376002)(346002)(39850400004)(366004)(199004)(189003)(8676002)(386003)(3846002)(14444005)(6116002)(26005)(23726003)(7736002)(47776003)(66066001)(305945005)(9686003)(105586002)(229853002)(575784001)(97736004)(76506005)(1076002)(6486002)(186003)(16526019)(42882007)(58126008)(8936002)(68736007)(316002)(478600001)(2906002)(52116002)(33716001)(476003)(50466002)(956004)(81166006)(16586007)(486006)(81156014)(6246003)(54906003)(11346002)(6496006)(106356001)(6916009)(446003)(25786009)(5660300001)(44832011)(76176011)(4326008)(39060400002)(33896004)(53936002);DIR:OUT;SFP:1102;SCL:1;SRVR:BN7PR08MB4931;H:localhost;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; Received-SPF: None (protection.outlook.com: wavecomp.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;BN7PR08MB4931;23:zpvm69b0VsTtrx+bjEMjIj+028W6tk7rLoXKj8MW3?= =?us-ascii?Q?5J/MJQP8QPo7SpAQaftxymtk7Lx/SblUrFFeaNvW+W5zXiIzi0Vp8bbE8smU?= =?us-ascii?Q?O//rPywprr32S2mkP7JFDgYY+qQywXg57u5Ig7LDNJAoQ3xSHKImuqW11fIf?= =?us-ascii?Q?gjCG4VqKWQfKRiBBOws9pNGSvLi3M9pWDZAeyl5SIOkCKxjhe2VGfCmIQmop?= =?us-ascii?Q?wXV0H5wzdSB0u4zOrMWn5NZReK5qiFusDGrzT3U8i+cx9AxL6P0G2pJf+0t8?= =?us-ascii?Q?R67lB7qfHdJ0f7fuxH1WO9wpRzubF4OI2a5ed2664p58nBuKxuRsmhIRpJTm?= =?us-ascii?Q?KsKBqoK0pSutvvdbAU8aiBMamJ51DRVgbocm/eWWGFF5fQqk96BrKQeoeTna?= =?us-ascii?Q?pkROjFZpBzCouGELXYfj1nhcSbOkujuiYqOViR0IsWvOwNwoqT4SAIuU94ty?= =?us-ascii?Q?3O9FjAP13m0nQw3J4drkNbMIU4dcUgBAsUK/RRO+gWJxUKQFxU4ttV/D3GTw?= =?us-ascii?Q?0kxmfWmpdDE0Ly9/K93/xGtV2SIxmrPVDEaxVlSp0V/sMvk+cSYirIn+Hlam?= =?us-ascii?Q?M4/EfRlLefow2brAwYLEEcs7PoRbi1mE7sVmjBOCixinyXQkldpO2d/QIzlJ?= =?us-ascii?Q?/qCZFbmTxcZvHQc4frpKSWD61jajWwpFcz/37rJ6Sx/JVm8qwX5h+NvGomJ4?= =?us-ascii?Q?KDhxqBMQACcgOkR/33oEiW7Ze+zsmxFOuUHhS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: NSPM X-OriginatorOrg: mips.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Sep 2018 17:47:12.6559 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 80bbd258-a63f-49aa-235a-08d613579c8d X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 463607d3-1db3-40a0-8a29-970c56230104 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN7PR08MB4931 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Mike, On Sat, Sep 01, 2018 at 12:17:48AM +0300, Mike Rapoport wrote: > On Thu, Aug 30, 2018 at 02:48:57PM -0700, Paul Burton wrote: > > On Mon, Aug 27, 2018 at 10:59:35AM +0300, Mike Rapoport wrote: > > > MIPS already has memblock support and all the memory is already registered > > > with it. > > > > > > This patch replaces bootmem memory reservations with memblock ones and > > > removes the bootmem initialization. > > > > > > Signed-off-by: Mike Rapoport > > > --- > > > > > > arch/mips/Kconfig | 1 + > > > arch/mips/kernel/setup.c | 89 +++++----------------------------- > > > arch/mips/loongson64/loongson-3/numa.c | 34 ++++++------- > > > arch/mips/sgi-ip27/ip27-memory.c | 11 ++--- > > > 4 files changed, 33 insertions(+), 102 deletions(-) > > > > Thanks for working on this. Unfortunately it breaks boot for at least a > > 32r6el_defconfig kernel on QEMU: > > > > $ qemu-system-mips64el \ > > -M boston \ > > -kernel arch/mips/boot/vmlinux.gz.itb \ > > -serial stdio \ > > -append "earlycon=uart8250,mmio32,0x17ffe000,115200 console=ttyS0,115200 debug memblock=debug mminit_loglevel=4" > > [ 0.000000] Linux version 4.19.0-rc1-00008-g82d0f342eecd (pburton@pburton-laptop) (gcc version 8.1.0 (GCC)) #23 SMP Thu Aug 30 14:38:06 PDT 2018 > > [ 0.000000] CPU0 revision is: 0001a900 (MIPS I6400) > > [ 0.000000] FPU revision is: 20f30300 > > [ 0.000000] MSA revision is: 00000300 > > [ 0.000000] MIPS: machine is img,boston > > [ 0.000000] Determined physical RAM map: > > [ 0.000000] memory: 10000000 @ 00000000 (usable) > > [ 0.000000] memory: 30000000 @ 90000000 (usable) > > [ 0.000000] earlycon: uart8250 at MMIO32 0x17ffe000 (options '115200') > > [ 0.000000] bootconsole [uart8250] enabled > > [ 0.000000] memblock_reserve: [0x00000000-0x009a8fff] setup_arch+0x224/0x718 > > [ 0.000000] memblock_reserve: [0x01360000-0x01361ca7] setup_arch+0x3d8/0x718 > > [ 0.000000] Initrd not found or empty - disabling initrd > > [ 0.000000] memblock_virt_alloc_try_nid: 7336 bytes align=0x40 nid=-1 from=0x00000000 max_addr=0x00000000 early_init_dt_alloc_memory_arch+0x20/0x2c > > [ 0.000000] memblock_reserve: [0xbfffe340-0xbfffffe7] memblock_virt_alloc_internal+0x120/0x1ec > > > > > > It looks like we took a TLB store exception after calling memset() with > > a bogus address from memblock_virt_alloc_try_nid() or something inlined > > into it. > > Memblock tries to allocate from the top and the resulting address ends up > in the high memory. > > With the hunk below I was able to get to "VFS: Cannot open root device" > > diff --git a/arch/mips/kernel/setup.c b/arch/mips/kernel/setup.c > index 4114d3c..4a9b0f7 100644 > --- a/arch/mips/kernel/setup.c > +++ b/arch/mips/kernel/setup.c > @@ -577,6 +577,8 @@ static void __init bootmem_init(void) > * Reserve initrd memory if needed. > */ > finalize_initrd(); > + > + memblock_set_bottom_up(true); > } That does seem to fix it, and some basic tests are looking good. I notice you submitted this as part of your larger series to remove bootmem - are you still happy for me to take this one through mips-next? Thanks, Paul