Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp1058526pxu; Thu, 17 Dec 2020 00:45:57 -0800 (PST) X-Google-Smtp-Source: ABdhPJxQ/7sV7y6of1TUe6LGU4tCEFtGrrIndQdwWwpRwMELOKV2tl/4qrwSzO+II2Q7Xz1jM+0G X-Received: by 2002:a17:906:391b:: with SMTP id f27mr33257696eje.195.1608194756939; Thu, 17 Dec 2020 00:45:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608194756; cv=none; d=google.com; s=arc-20160816; b=z7wTWyYv7LUMkLqI6AAX75OZ+1JNLhGCmuz2ho/sc8BEs47Fdun5OPdM8vGlRp76gg WrhMhburXPnwkXAPZ+Al6DyxFCLC9rhPphZYIkf8ufxxzrcC4BNePPG8YS481f79H7qG 4ogxe0UCCk0rCDJkpaKxs5MPj1xpNggsSPOQmCJD6HKzlLNNvm1c7mNc1gm27iVlRiUh hZxbWNY+ww24cgj0qtivYCl54gpRMsMYCkNTHl3EoTGeApvKGLv9AgPOX+YXgiHru83+ TPpYk7UKGgkBwJUeDZyVaONVgaQqGZttljk6sTgYi03mh0gZbah+WpVCDFXE0PUrn42n llIA== 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=UyvM0JTI1ydl5VSsasQuRjR8gmnzoIsqUBzYnVc9TT4=; b=Gck+kqI5PbEsUFflaMVEt5zpaWBNpmkpMxD0F9F1tvw5Q4bD6mYAv4jy0Mjq6K6+PQ 0IyNarh69OFJYDIAc9DKwdFJDiK9H6X+f/raH61lLSQCgtsRGO/xXQ7fhNMf3zlq/2Nm 5u5bOyL/rtWV0s/y3HfbNKj6Ou+bfjzV4H3CFNvuCyxjtj2jA+bfdVdqwmetHpCeH4hL 8J4uqmjrhLZCZ5+Bxg/fSGoE1lWbMo+yQH2df+QcheZwVq5BTQfYceZwy19E20jikxjM 0It6J2dscN1IciIZBGB9WBdgboYuGHfreNbPep4dA7lgciyXKP7FjwmT9fnvGxEZyYph NrjA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@atishpatra.org header.s=google header.b=DhBrBRow; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d1si4002931edy.296.2020.12.17.00.45.34; Thu, 17 Dec 2020 00:45:56 -0800 (PST) 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=@atishpatra.org header.s=google header.b=DhBrBRow; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726964AbgLQIo3 (ORCPT + 99 others); Thu, 17 Dec 2020 03:44:29 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39534 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726703AbgLQIo3 (ORCPT ); Thu, 17 Dec 2020 03:44:29 -0500 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 C2981C061794 for ; Thu, 17 Dec 2020 00:43:48 -0800 (PST) Received: by mail-il1-x12d.google.com with SMTP id t9so25135082ilf.2 for ; Thu, 17 Dec 2020 00:43:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=atishpatra.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=UyvM0JTI1ydl5VSsasQuRjR8gmnzoIsqUBzYnVc9TT4=; b=DhBrBRowc9Z5HNcivJKgo5Rgre54UgzfTuKotHhpYXeHMfLn/rSA6EWV22SH84v1Au G8H2yxl6OMBVCvcSb1o6KoKt7WWxlqZBmsxvIVA0nrcPm20JiGHJzZXEPt9IwlF4z+mx Pb5kzGLNCjg2bLlDY2NTZcdtfAc61ZNxfiUXw= 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=UyvM0JTI1ydl5VSsasQuRjR8gmnzoIsqUBzYnVc9TT4=; b=uWd/KHOoKLJe9QN9NccNz9Ko5sBTIQWQXhz/Z3QzAKiS2X7nmxTtK3pGeY9r+f337k ZJMjsE8lTuOz2/CA2irArKDUcqtR0+gLhpcDnUbfVUhgGUg9IYADkbl+vaUUvtIVEc6X erwZxRWQVz2yUMpfSgkOs1TxrPAuJF0hB89K2tMnWvQNj9xYLF+xziddcY9CNlAMTAd0 AFxRTS5ZAW5Z3BhiTLs7i2hW0BoVu9q9bQ8ZzM02WMncmvcWD/QYqjO7U/wA33jp3iIp RffgapDU4ZToLkvRb/H9YJOjkEbMAckuXOJoR/vS52QCMB2pjKcdj5RkcZzVPef4+ZBj YXsA== X-Gm-Message-State: AOAM531YfXSiIMCaP+LdJoRP4u3/qbiCFgz8uVbR/kW0FTz6ig5VPRYP oU6IsBBQi/l5Hl8KPtdiIbgg45cn0uJQv1EOG3OCGhEzHWWF X-Received: by 2002:a92:d84a:: with SMTP id h10mr47862427ilq.77.1608194628256; Thu, 17 Dec 2020 00:43:48 -0800 (PST) MIME-Version: 1.0 References: <20201217074855.1948743-1-atish.patra@wdc.com> In-Reply-To: From: Atish Patra Date: Thu, 17 Dec 2020 00:43:37 -0800 Message-ID: Subject: Re: [PATCH] RISC-V: Fix usage of memblock_enforce_memory_limit To: Bin Meng Cc: Atish Patra , Albert Ou , Anup Patel , linux-kernel , Palmer Dabbelt , Paul Walmsley , Andrew Morton , linux-riscv , Mike Rapoport Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Dec 17, 2020 at 12:12 AM Bin Meng wrote: > > Hi Atish, > > On Thu, Dec 17, 2020 at 3:49 PM Atish Patra wrote: > > > > memblock_enforce_memory_limit accepts the maximum memory size not the last > > address. Fix the function invocation correctly. > > > > Fixes: 1bd14a66ee52 ("RISC-V: Remove any memblock representing unusable memory area") > > > > Signed-off-by: Atish Patra > > --- > > arch/riscv/mm/init.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > Thank you for working on this. > > Tested with QEMU 5.2.0 on 32-bit 'virt' and 'sifive_u', with > fw_jump.bin used as the -bios. fw_dynamic should also work unless you are using more than 1G of memory. Linux kernel can only support 1G of memory for RV32. The current Kconfig is bit misleading and I will send a patch to update the description. However, kernel should be able to ignore any memory beyond what it can address and continue. I will investigate more. > 32-bit 'virt' boots, but 32-bit 'sifive_u' still does not boot, which > should be another issue because reverting the original 1bd14a66ee52 it > still does not help 'sifive_u'. > Are you using more than 1G of memory ? Let me know if the kernel boots if you use 1G. > Tested-by: Bin Meng > > I believe the following tag should also be added and patch cc'ed to > stable-kernel: > > Reported-by: Bin Meng > Cc: # 5.10 > > Regards, > Bin > > _______________________________________________ > linux-riscv mailing list > linux-riscv@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-riscv -- Regards, Atish