Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp283574imm; Tue, 24 Jul 2018 19:14:00 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfbnYJSbXyZjHt+Mo9QOx21EFWEgJJA66zioGiCq+iuhFDFj28LaOEfW3Lsu+/Cl8kl4ICG X-Received: by 2002:a17:902:6845:: with SMTP id f5-v6mr19074353pln.173.1532484840394; Tue, 24 Jul 2018 19:14:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532484840; cv=none; d=google.com; s=arc-20160816; b=MR+5v2yx9tgXa9dSgvUHpIIREM2/gI/XAf70gJZwj8b5bb98wj+b+3I/k6xQ24iVTl g0tBNOphWPSh9KKf5AA4ySpEr/yG8ZaLMvG4Ji1zqVw/3JkiQQxu7mmmgrjNz3y6rikZ lncIpCyM7lJjoaQQbYm81ChRWUA8OquQravA4pv4r/1wriLPnvAF+n2CgwB1Pr266Yl+ eaZFU0Z/w2SgEJ6rR2KduOqr0aA0z3feiBodEB2TAmW7PFid5AfQmglJD2GSPmBsKQDL +0HA1db5+EF5a1aiBSXQ+keBzxjIfKrh4F2VYRn6v6MJkYUdMo79IGy/Mc/KaKqSJ2Ut stww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dmarc-filter:dkim-signature:dkim-signature :arc-authentication-results; bh=tHaps+hc8bn5PQfbDGyHbf7+iXnBjN2MTHWt0QX1Z98=; b=Z1xoDDXPNDRhKTLtdA2Mwyo5z8cBUsIAVj6qDw3Xx77wyyFkBlEdQbklCxgykrllZt 52tkmWjMRWxLjz194UuN8L05rDVaQQT99iV3BCUWtEp1nzFURilLQYeZu0LH2hKeMAqJ o3iUJKy3yiAl08a7Se6jz36rbBW/ok3Ssx5ouE6FaPeTEZiJLkMTVodJNRNQIr0To106 KDv6XRGvV8rGWv0eQmQWjXyIdjbxSA04TnStZvauYZtEGgHeDu77qXMvNfjfL/61vEWJ 2+diq5MgFKmJZTQ3QiO2wlEqNHW7FYHdxFQi38EEuC8jXktYSGEl0kvNs2ooAMIZ2FOc Ou+A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b="V4AXN/vb"; dkim=pass header.i=@codeaurora.org header.s=default header.b="V4AXN/vb"; 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 d33-v6si12014499pgd.245.2018.07.24.19.13.44; Tue, 24 Jul 2018 19:14:00 -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=@codeaurora.org header.s=default header.b="V4AXN/vb"; dkim=pass header.i=@codeaurora.org header.s=default header.b="V4AXN/vb"; 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 S2388506AbeGYDWT (ORCPT + 99 others); Tue, 24 Jul 2018 23:22:19 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:55610 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388472AbeGYDWT (ORCPT ); Tue, 24 Jul 2018 23:22:19 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id EA05A60B62; Wed, 25 Jul 2018 02:12:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1532484777; bh=dzNv+tT+RRl7deAxm/0RQ+DmYdgGN6G4D4ZgY9N+PqU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=V4AXN/vb3x7aHsj4CiiIjGBzZH5Wlq4FdfIgv+QTGo3rHzOHsYJtn4qWXvm7rozuA 9O4BjuSS604E68hJqO3DP8GxGSFL0E8lJn2jnjn0io1VIgmL0aJsr2AcM+fwpCc0X6 gAkz/lTIl/SDjcMHw7nDxRiWTPsXjPBUkYP99Esw= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.8 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.0 Received: from codeaurora.org (i-global254.qualcomm.com [199.106.103.254]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: rkuo@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id DBCE56021A; Wed, 25 Jul 2018 02:12:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1532484777; bh=dzNv+tT+RRl7deAxm/0RQ+DmYdgGN6G4D4ZgY9N+PqU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=V4AXN/vb3x7aHsj4CiiIjGBzZH5Wlq4FdfIgv+QTGo3rHzOHsYJtn4qWXvm7rozuA 9O4BjuSS604E68hJqO3DP8GxGSFL0E8lJn2jnjn0io1VIgmL0aJsr2AcM+fwpCc0X6 gAkz/lTIl/SDjcMHw7nDxRiWTPsXjPBUkYP99Esw= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org DBCE56021A Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=rkuo@codeaurora.org Date: Tue, 24 Jul 2018 21:12:55 -0500 From: Richard Kuo To: Mike Rapoport Cc: Michal Hocko , linux-hexagon@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] hexagon: switch to NO_BOOTMEM Message-ID: <20180725021255.GF12771@codeaurora.org> References: <1531726998-10971-1-git-send-email-rppt@linux.vnet.ibm.com> <20180723212339.GA12771@codeaurora.org> <20180724054704.GA16933@rapoport-lnx> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180724054704.GA16933@rapoport-lnx> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jul 24, 2018 at 08:47:04AM +0300, Mike Rapoport wrote: > On Mon, Jul 23, 2018 at 04:23:39PM -0500, Richard Kuo wrote: > > > > On Mon, Jul 16, 2018 at 10:43:18AM +0300, Mike Rapoport wrote: > > > This patch adds registration of the system memory with memblock, eliminates > > > bootmem initialization and converts early memory reservations from bootmem > > > to memblock. > > > > > > Signed-off-by: Mike Rapoport > > > > Sorry for the delay, and thanks for this patch. > > > > I think the first memblock_reserve should use ARCH_PFN_OFFSET instead of > > PHYS_OFFSET. > > memblock_reserve gets physical address rather than a pfn. > > If I read arch/hexagon/include/asm/mem-layout.h correctly, the PHYS_OFFSET > *is* the physical address of the RAM and ARCH_PFN_OFFSET is the first pfn: > > #define PHYS_PFN_OFFSET (PHYS_OFFSET >> PAGE_SHIFT) > #define ARCH_PFN_OFFSET PHYS_PFN_OFFSET > > Did I miss something? Sorry, I should have been more clear. In the size calculation, it's subtracting the unshifted PHYS_OFFSET from the start page number, which I'm pretty sure is wrong. Thanks, Richard Kuo -- Employee of Qualcomm Innovation Center, Inc. Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project