Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp1043695pxu; Thu, 17 Dec 2020 00:14:24 -0800 (PST) X-Google-Smtp-Source: ABdhPJw0XGycSY/5O4xm0BGxiqjMrthmofEfGUirNsc0ar16izqCOSG6uTZkcTmqKsLMdzohopVD X-Received: by 2002:a05:6402:40e:: with SMTP id q14mr4583211edv.85.1608192863991; Thu, 17 Dec 2020 00:14:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608192863; cv=none; d=google.com; s=arc-20160816; b=TRUpvFDnk3YvpVhCZiMnShaXYHWitEBlg0YM9r4q4oF00T4mIiWxzv9fK2bS2aberO kIwpr44wn9/ghHVYD0+z1W7B0bqIllZ1uIcIGWkImcLVUvkK4ixcSICswc4/Va2Tn4Q1 jE3hR7nC91P+iKkNRh+pxkz6Mn5T6Z/Sr2WK8e9SpwbPP8dpQtfWvZU2rpSDLKacr8W/ 7tl8W5tyCKlGOxo2s4pCfRy18TAUDqJgMPBQPHOYpPgFRAx69YthVqBIyPcnB0ALmT3K SrrenlXeDpPNzlBbM5JjGg3w1sh/rv4V4JIxm3uDECtMG1TdogCBTX8X1MeVrYLp0EPj Shdg== 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=skHxIoVLp+SMbkm5xPTdyHQT8ReVVH2SXONfbEQLh1M=; b=DgsER6NeLjtyT5EraCNiYtv/22COAINlkA/mLcEKoz1lTFCyrhtk0+9NYcv9uwCF1u H/wnGLfXTFBFRtdrbsZyu8uMx6ekzYFAKSXUM+AWCJtOq/bBgTgndH2k9138mYv7Kc1M O5FJuLXnphAng5r58K+0p640z6vkFszNDnJ/qH/g0MBasSu58X3Gv4rY4wMUgIlEa/I7 cAvwYJc0mAOJUgrQslQ0Wevqf662guL0wXdBILGugzzk+kqDp63jB/f7kkLWRQzzaJkl TtcE1xtuDjsqDkSRNx2pWdRaLP0D2VT0z39J1r+1vJFSZrZisM+aUBtdueDzR4XSgqFb egtg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=nkAk6mee; 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 a29si4173051edm.401.2020.12.17.00.14.01; Thu, 17 Dec 2020 00:14:23 -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=@gmail.com header.s=20161025 header.b=nkAk6mee; 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 S1727119AbgLQIM5 (ORCPT + 99 others); Thu, 17 Dec 2020 03:12:57 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34708 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726416AbgLQIM5 (ORCPT ); Thu, 17 Dec 2020 03:12:57 -0500 Received: from mail-yb1-xb31.google.com (mail-yb1-xb31.google.com [IPv6:2607:f8b0:4864:20::b31]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 51533C0617A7 for ; Thu, 17 Dec 2020 00:12:16 -0800 (PST) Received: by mail-yb1-xb31.google.com with SMTP id w135so25034744ybg.13 for ; Thu, 17 Dec 2020 00:12:16 -0800 (PST) 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=skHxIoVLp+SMbkm5xPTdyHQT8ReVVH2SXONfbEQLh1M=; b=nkAk6meeSPTfVQoOzH9Vuel7uag9F+3v09xDADuWoDZ8tt5O1O7CEDXKgxZJfL/xjU NZbOXd8a7l37cmWJ/CL8ayHgLoa34/91MjagQyqIuqM5qxHkPIlcFX2rbXNIkklhmrxo eYgjAQxKtvUhD0lJq0rnDodlHWW9w0aaMBPptummXcfIMqJOkIPcWQqSPPi30t7WX/gO bk95oBIyqQhv/Gpr/43oxRlW38BM9StTXQY3K6SRkU+l9Y7jbOSL5lMFO2d8cQS27TYA Nlc5hCBpbrrSvLHSHnNJ2LGt27oxWCz5800FiYwDMBEBL0IiGx438wYhd68KY1GUo8C0 +K+Q== 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=skHxIoVLp+SMbkm5xPTdyHQT8ReVVH2SXONfbEQLh1M=; b=HARHMwBoIXVtiMmiscPa7h+2T9q/jQTCAgkKOQfTWZ1iAIvEXxcouEqYxcUT4yIpb9 QLJHkzboW5OqlH5qFYAKmf9q+wL1uuf2PkG1mXU3PyHJMHI2HqaANOFyIvUsa2kEXdLF PWh8xsIu5UWeDMcDkZs+san4e9xdeQU15OgqZwBoT5Q2W54Q+W/oYVuk1QTS+P0NEA8Z xxMUqMGpDE1nFFSM1AJQHpgFBRy3SR9ERaJLymMmRhfwoq7axpDa6JVYYAPWesyXwavg elzizMp6hzpl9jbv7DsTl9j8UXtoa/jNZB1LjfueFBteW2EoNWS+K1JuUUlUzrEtCaRT uzoA== X-Gm-Message-State: AOAM531qbqIyvhvX9vck+kEb0h44jC7spGfSJt7VGbbent5DYvD2M3iC FMS2wpKGtA2JkqK4szSRShYRCfD9QTQalL3TlsI= X-Received: by 2002:a05:6902:210:: with SMTP id j16mr57375188ybs.122.1608192735719; Thu, 17 Dec 2020 00:12:15 -0800 (PST) MIME-Version: 1.0 References: <20201217074855.1948743-1-atish.patra@wdc.com> In-Reply-To: <20201217074855.1948743-1-atish.patra@wdc.com> From: Bin Meng Date: Thu, 17 Dec 2020 16:12:04 +0800 Message-ID: Subject: Re: [PATCH] RISC-V: Fix usage of memblock_enforce_memory_limit To: Atish Patra Cc: linux-kernel , Albert Ou , Andrew Morton , Anup Patel , linux-riscv , Mike Rapoport , Palmer Dabbelt , Paul Walmsley Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. 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'. 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