Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp1725237img; Sat, 23 Mar 2019 10:27:09 -0700 (PDT) X-Google-Smtp-Source: APXvYqwmc1pntGBXOJSszp2+RDU4vgun2olX3syzQidBqRIapFh31/lIijq2MVL7J6W97ZGJyQrT X-Received: by 2002:a65:63cd:: with SMTP id n13mr15076230pgv.193.1553362029017; Sat, 23 Mar 2019 10:27:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553362029; cv=none; d=google.com; s=arc-20160816; b=m/zXromVtcgdzab3NGjdvFRpYceDIXCoLqTzkoc+9SvHSo9FVjF5K4dXgIEvC6CUm2 4m1riF4lpCPSTsx3qOldXILif1FH1Yfuy7MNgN1V2eo8P2Wk7RUnnmjxur6XjuZW5Lzi RpSsIIHpZ0ic12saw6uVSbnDVnhrYY3nllK0icV5lONf3wAiMtA1+x4gblL4/0nJ2CJ7 czaOtjbyRYQPufCeTaDnnC27HiOujY3+eb4eOovAJstmjcNUhjr+A+ed2zviCxNjuII5 xr7UCzk+hQY7iIAWz7MRO89E/cnTdPfaZ2OlFrHWVlMhfZZDnQdPGY39RXJjY3ixdqRG yRJg== 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:dkim-signature; bh=1RnHrJKLinOTdv/ak7f9kAq9n9lscJauEZ8R2hd/aAU=; b=Yqj91Z9f8Cv2L1bxaIFGZFHsOG0ad55oLkIfv5rsjhODWwhVz7XEHmkt07ReZaKmeV avrQFz9QNhUujUhXbNCqKrwPTtDx99sy3PuhcHr0wftYwn/8C0DaTgxKkC2y1yn0xtTk DMggiYvJpqcN97T81nPUO8esivpqXQC1439s2UVVfCr7RoWOwbADtb/1fCZaosky0jlo BY0zx3xHsu5afDb46I6Ab9V6EeNWv4b/W39mDKm0bZEHBfNYjK5PDJWp6vEx2c4XprW1 JmSNnuphjPFgEch5Vj0XgQ2BjZG2+BmRMyaMP3sVC4B0lALs5RZNRjZUgWFDrvmsJSBy 8opA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=o1aVf4sK; 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 j18si9537532pll.5.2019.03.23.10.26.53; Sat, 23 Mar 2019 10:27:09 -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=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=o1aVf4sK; 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 S1727926AbfCWRYX (ORCPT + 99 others); Sat, 23 Mar 2019 13:24:23 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:52274 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727298AbfCWRYW (ORCPT ); Sat, 23 Mar 2019 13:24:22 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=1RnHrJKLinOTdv/ak7f9kAq9n9lscJauEZ8R2hd/aAU=; b=o1aVf4sKUfhE3CxCL3N82L9vI PgqjFQLZrS109Q+b/SadUTNorpVj7Xomf3oA0YFopNadCHCaKstj68XjHqtEQKGXYFQMpDfiyeq9Y oAihEUodyXtlx2PtqZ7JJcS/yCKSoE8dzzCU0KsWbVKZ2lJ9KPPmGQFXflZzj5nncgd2avgI+okaF TCssDWOgMKrCNb34M/RO1kj16oxjXEDf5TtmXL3Az/25XkcJUgJA3PBZ1n6yN6BFzfAlibhv+P0R1 UiWU+n3ZpGFlwie/a5pNTFZp11QE7D0Yfh1izZpClwGS5M960+z2MxKBkway67B6Xj3i6c8tmf5tD eYZPKLvUQ==; Received: from hch by bombadil.infradead.org with local (Exim 4.90_1 #2 (Red Hat Linux)) id 1h7kNZ-0003jE-92; Sat, 23 Mar 2019 17:24:21 +0000 Date: Sat, 23 Mar 2019 10:24:21 -0700 From: Christoph Hellwig To: Mike Rapoport Cc: Anup Patel , Albert Ou , Palmer Dabbelt , "linux-kernel@vger.kernel.org" , Christoph Hellwig , Atish Patra , Paul Walmsley , "linux-riscv@lists.infradead.org" Subject: Re: [PATCH v2 3/5] RISC-V: Allow booting kernel from any 4KB aligned address Message-ID: <20190323172421.GA14080@infradead.org> References: <20190321094710.16552-1-anup.patel@wdc.com> <20190321094710.16552-4-anup.patel@wdc.com> <20190323154012.GA25149@rapoport-lnx> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190323154012.GA25149@rapoport-lnx> User-Agent: Mutt/1.9.2 (2017-12-15) X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Mar 23, 2019 at 05:40:12PM +0200, Mike Rapoport wrote: > I have no general objection, but I presume the patch will be significantly > simplified if the addition of 4K pages support will follow the removal of > the trampoline_pd_dir. > > That said, I didn't look into the details, since they will change > substantially, only some comments on the Kconfig part. > > On the high level, have you considered using large pages in setup_vm() and > the remapping everything with 4K pages in setup_vm_final()? This might > save you the whole ops-> churn. That would be a great start. That being said the current tiny memory RISC-V devices don't even have a MMU, so the kernel pagetable mapping isn't even relevant for them. I'm just not sure adding more complexity in the early boot path for a borderline case (MMU and tiny memory with a tiny kernel image) is reall worth all the complexity.