Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp2484705ybl; Thu, 29 Aug 2019 08:48:19 -0700 (PDT) X-Google-Smtp-Source: APXvYqwEeSanqnDYTvQizWLI74SLOWOns5oWswHYlqD4HNHyNCJVcA+aMOawOBw8GCdfD7JXA6Q2 X-Received: by 2002:a62:83c9:: with SMTP id h192mr11974485pfe.57.1567093699041; Thu, 29 Aug 2019 08:48:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567093699; cv=none; d=google.com; s=arc-20160816; b=QmEV2rXyBry18l2TUfX2smgl7UuarJOsqDvyD5OFewrnDiahHVqOM/9xEKqI6umlSt slxoUK3f0s31cMjnQAdfMpwk62qAyyKSImGPhEQNq8F09WhrmdT/x2uRQEzB2s3IUBjT MBT7avgw4ZvhlxRtg4yjBydAA/0ocOGLqQEC+r5Asajwbx59XSlftDxOQWyodXLWymkc MXX+pojl6gFtsq1Ca2Q+3ooDnG0NyRmD+vJXT+wdWX3x85c9YdvBOi6bpOdKvQcKWbFQ kFOG953a5vlpWg12UQidCgQyKoO7ZA2Ow0vrCfV+xWR15hDDBRg4XFx54WqAjd78en0E i7BA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:subject:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to; bh=l/oXoDmUsr/Gi6su0SJv0eXeqn+ZMG9IUQBHSSxq/7Y=; b=gZuWZ7LJQmia7ZaLWnRWQ0izjyhsiUKZS7jXZUPJwNQ1eD0ipq9LPEBl8yJyQoAyZ+ O6vxSfTYhnwz9DMswbKV6xu9l5TC4CIo95ACbhbVoKKys9cRsGaKlHl0RkJ1Y1pyo3rc w4T5pTpvd8GQc/iSqiAxZ7wsFXoXXwh8NeLrECu1+3TPKhQ0o+tjI70aS5FG4lheOxU6 ggNa3tpa5KV9yPpo2Vjlw3uMszjLXdBetzVL43vRAZZW7vZ8rmK69T04OtmQXFPI1mxE L/P4B8v6lg5Kn9aMIf4UHCLqjGuuocIwv+c6VZHPX+FKrKjNjJ9HulsNPyjydrJUUG/n Ywag== ARC-Authentication-Results: i=1; mx.google.com; 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 k15si2228842pls.115.2019.08.29.08.48.03; Thu, 29 Aug 2019 08:48:19 -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; 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 S1728042AbfH2Pqy (ORCPT + 99 others); Thu, 29 Aug 2019 11:46:54 -0400 Received: from ale.deltatee.com ([207.54.116.67]:36818 "EHLO ale.deltatee.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726283AbfH2Pqx (ORCPT ); Thu, 29 Aug 2019 11:46:53 -0400 Received: from s0106ac1f6bb1ecac.cg.shawcable.net ([70.73.163.230] helo=[192.168.11.155]) by ale.deltatee.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1i3MdF-0003si-By; Thu, 29 Aug 2019 09:46:46 -0600 To: Mike Rapoport Cc: Rob Herring , Albert Ou , Andrew Waterman , Palmer Dabbelt , linux-kernel@vger.kernel.org, Michael Clark , Zong Li , Olof Johansson , Greentime Hu , linux-riscv@lists.infradead.org, Stephen Bates , Christoph Hellwig References: <20190828214054.3562-1-logang@deltatee.com> <20190829062123.GA16471@rapoport-lnx> From: Logan Gunthorpe Message-ID: <80a6c33f-6914-ee5f-7456-e1bf3d8801e0@deltatee.com> Date: Thu, 29 Aug 2019 09:46:37 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <20190829062123.GA16471@rapoport-lnx> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-SA-Exim-Connect-IP: 70.73.163.230 X-SA-Exim-Rcpt-To: hch@lst.de, sbates@raithlin.com, linux-riscv@lists.infradead.org, greentime.hu@sifive.com, olof@lixom.net, zong@andestech.com, michaeljclark@mac.com, linux-kernel@vger.kernel.org, palmer@sifive.com, andrew@sifive.com, aou@eecs.berkeley.edu, robh@kernel.org, rppt@linux.ibm.com X-SA-Exim-Mail-From: logang@deltatee.com X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on ale.deltatee.com X-Spam-Level: X-Spam-Status: No, score=-8.9 required=5.0 tests=ALL_TRUSTED,BAYES_00, GREYLIST_ISWHITE autolearn=ham autolearn_force=no version=3.4.2 Subject: Re: [PATCH v6] RISC-V: Implement sparsemem X-SA-Exim-Version: 4.2.1 (built Tue, 02 Aug 2016 21:08:31 +0000) X-SA-Exim-Scanned: Yes (on ale.deltatee.com) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2019-08-29 12:21 a.m., Mike Rapoport wrote: > On Wed, Aug 28, 2019 at 03:40:54PM -0600, Logan Gunthorpe wrote: >> Implement sparsemem support for Risc-v which helps pave the >> way for memory hotplug and eventually P2P support. >> >> Introduce Kconfig options for virtual and physical address bits which >> are used to calculate the size of the vmemmap and set the >> MAX_PHYSMEM_BITS. >> >> The vmemmap is located directly before the VMALLOC region and sized >> such that we can allocate enough pages to populate all the virtual >> address space in the system (similar to the way it's done in arm64). >> >> During initialization, call memblocks_present() and sparse_init(), >> and provide a stub for vmemmap_populate() (all of which is similar to >> arm64). >> >> [greentime.hu@sifive.com: >> fixed pfn_valid, FIXADDR_TOP and fixed a bug rebasing onto v5.3] >> Signed-off-by: Greentime Hu >> Signed-off-by: Logan Gunthorpe >> Reviewed-by: Palmer Dabbelt >> Reviewed-by: Christoph Hellwig >> Cc: Albert Ou >> Cc: Andrew Waterman >> Cc: Olof Johansson >> Cc: Michael Clark >> Cc: Rob Herring >> Cc: Zong Li > > Reviewed-by: Mike Rapoport Thanks! Logan