Received: by 2002:a25:5b86:0:0:0:0:0 with SMTP id p128csp750687ybb; Thu, 28 Mar 2019 11:25:33 -0700 (PDT) X-Google-Smtp-Source: APXvYqwRhS1z5eH97aoPLYndbn1uB2Nc2YJGklqdeiSYqEHwv09FBzt/OGHfCBVsT5ltKKCqSMvV X-Received: by 2002:a17:902:988e:: with SMTP id s14mr31875534plp.167.1553797533263; Thu, 28 Mar 2019 11:25:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553797533; cv=none; d=google.com; s=arc-20160816; b=SjVB2Bjfs+0P3ASsMvRRsdV0M8fJJjBASzm8KJGGkn03g/H3cXenJNrRKjBKhV6Kyz oenJsvSHBm6Ol1poIVsBmdo44n6BRtr2vID/8ks1rGUlWHDYWjHMzfnnx64K684Hl65Y YHZSA2lZka8aSKFJOJClIXkxKY5AQj6QZRZyqKiDJy3cu02NKElgwS0LNa4XuOZnSQfp onMNqsIoHJ/Z2xDLA2E47EUFX0ptIbi+R90OVQQXJClQ74rlBNpcYJOAMaZtCVX+YuJ5 sS+GQ5kSxnyemYlnTGW252LqyAZT7cUgk16XHPKEdhqcngz9jIK3sZ8UhQtWfwZGCooB pHbA== 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=72Xnrenkhoc+VNl7EJvLn0XW+MU6HV4f+9x6b3foAsY=; b=z+RD+jCMKmXKACRWv0P7JzfW6mzY28hZ77WDq3KjirxqH1ArYegbbYWygD61xzSbau v+8bePA+69w8xMujNE3WYke+P1+xboRmuh5L0y0V9IVF0uQBj1g/pTQaaz3NKT4o7yTS IvsJ68s8FxjNN3I43WjXELK9OnrXCdzZ3YXJEHeY+b5bhgMD4wqtD2aySe2sj2aoCQ7a v2AUOc+qn8Cwx4Xmu6W8PUq1K15HKoLWXoi8xZ321lePEwbJ07kUgSguzn0LhUh77eBp vhFNYZYJXNGEALUzu0MprfFjXQnSPPEz6XZ7q9fM/iYl4QUlkc/Y5WogeVijhJfRuu20 7X5g== 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 i37si13018093pgb.436.2019.03.28.11.25.17; Thu, 28 Mar 2019 11:25:33 -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 S1726057AbfC1SYm (ORCPT + 99 others); Thu, 28 Mar 2019 14:24:42 -0400 Received: from ale.deltatee.com ([207.54.116.67]:39754 "EHLO ale.deltatee.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725851AbfC1SYm (ORCPT ); Thu, 28 Mar 2019 14:24:42 -0400 Received: from guinness.priv.deltatee.com ([172.16.1.162]) by ale.deltatee.com with esmtp (Exim 4.89) (envelope-from ) id 1h9Zha-0006cz-4x; Thu, 28 Mar 2019 12:24:35 -0600 To: Anup Patel Cc: Albert Ou , Palmer Dabbelt , "linux-kernel@vger.kernel.org List" , Stephen Bates , Atish Patra , Anup Patel , Paul Walmsley , linux-riscv@lists.infradead.org, Mike Rapoport , Christoph Hellwig , Zong Li References: <20190327213643.23789-1-logang@deltatee.com> <20190327213643.23789-5-logang@deltatee.com> From: Logan Gunthorpe Message-ID: Date: Thu, 28 Mar 2019 12:24:31 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-CA Content-Transfer-Encoding: 7bit X-SA-Exim-Connect-IP: 172.16.1.162 X-SA-Exim-Rcpt-To: zongbox@gmail.com, hch@lst.de, rppt@linux.ibm.com, linux-riscv@lists.infradead.org, paul.walmsley@sifive.com, anup.patel@wdc.com, atish.patra@wdc.com, sbates@raithlin.com, linux-kernel@vger.kernel.org, palmer@sifive.com, aou@eecs.berkeley.edu, anup@brainfault.org 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 4/7] RISC-V: Update page tables to cover the whole linear mapping 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-03-28 4:03 a.m., Anup Patel wrote: > I understand that this patch is inline with your virtual memory layout cleanup > but the way we map virtual memory in swapper_pg_dir is bound to change. > > We should not be mapping complete virtual memory in swapper_pd_dir() > rather we should only map based on amount of RAM available. > > Refer, https://www.lkml.org/lkml/2019/3/24/3 > > The setup_vm() should only map vmlinux_start to vmlinux_end plus the > FDT. Complete virtual memory mapping should be done after we have > done early parsing of FDT when we know available memory banks in > setup_vm_final() (called from paging_init()) That makes sense, but I think a lot of it sounds a out of the scope of what I'm doing in this patch set. I could attempt to update my patchset so instead of expanding the linear region on boot, we add the page tables in arch_add_memory. That would make more sense when considering the direction you want to head with setup_vm. Logan