Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp4754105yba; Mon, 20 May 2019 03:13:49 -0700 (PDT) X-Google-Smtp-Source: APXvYqzki7bBlJeTa0PDPn5QF2bYl5RAmJ0cBazbmdywOS8QNkoXF3UEF6weuU100WYiFhpzsKpd X-Received: by 2002:a63:b00e:: with SMTP id h14mr70958713pgf.321.1558347229849; Mon, 20 May 2019 03:13:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558347229; cv=none; d=google.com; s=arc-20160816; b=zys7E5BaeNK9wECRh6Y+7BSjP3yRsPEjd2mcitvY6sTtVaDK4IZYYea7c0GzqJtRNQ saAgfL8jWFUp27F5GPugyijHBczRGOwdz6etYa0LKD+9kb7+ir+Q46p4znLpYV5iiLSR j7haDbE0e2ex2WwspGEfFNbygPOpGMkQKcp6/Twe8PemxEDZkr4UioD1W5FS3olEFt2F qlBmf0Dp7hiYMP8BETU9Y4lI+WjxRskVh6ZZwEyi8ebUuGznXkHkkmnAWpd/rALCrJE5 9qr5VRZaQ0TCF+kpw92r/MOMgcPZdnCx8kaz7kPcatwBWtBpRpCAPmT43dbvpVV86SS5 kgpA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=Fm9ij16sdpD8iaSclUBxPmiCBICgn7uQ/6l6aDbLE7U=; b=y25atF5FELkwyQWYOy8BuLVzj92xgyi+H0Ma4s6e7l1mb5FzN7CQyRRet299NSvWEu k40VW3sXMXuWPjYzwI8xgbzDA83229uXOfFzWlBdkAgtTaytbdddds/on+M8AVo4oOUL toL8K6infmG9u80xkyAZ/JgKhxfojp2/GJf1ApvZjHHQD4VYJYHIQCj/D6B+DFiXv47T 398gOnqJ5/EjdNvR27nTchvkWkoffe/H2MPdr3tR3StfRl1ezmxbFOgvQ+05c7ROQ3DF 9v+62xeisFaKdv5Tz1oDq1hRGrRhGRP/zUywO9fYjAuXzFoOZmQ0WkV2/dVUxuFrE4V3 8Ipw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@brainfault-org.20150623.gappssmtp.com header.s=20150623 header.b=Wcdu8OQJ; 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 z18si16629963pgu.169.2019.05.20.03.13.32; Mon, 20 May 2019 03:13:49 -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=@brainfault-org.20150623.gappssmtp.com header.s=20150623 header.b=Wcdu8OQJ; 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 S1730263AbfETIpK (ORCPT + 99 others); Mon, 20 May 2019 04:45:10 -0400 Received: from mail-wm1-f67.google.com ([209.85.128.67]:53892 "EHLO mail-wm1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727618AbfETIpJ (ORCPT ); Mon, 20 May 2019 04:45:09 -0400 Received: by mail-wm1-f67.google.com with SMTP id 198so12333088wme.3 for ; Mon, 20 May 2019 01:45:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brainfault-org.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Fm9ij16sdpD8iaSclUBxPmiCBICgn7uQ/6l6aDbLE7U=; b=Wcdu8OQJzMjiiXg3qHrtp1i7mlTWP5r5NSt5tnnFBrs+IHpyYY4dSKG5aZ4xSgFttO PdBkfMt1sUS+zn8zVhYiC/5wYPoxSDHLL1wRmDP8EGfesv5rRhg88YD4CwGAdBHRHx9q Z2n+wAu9/LLZf20saY/0VPKHWc31kOV7Nm/utQ3F+yG1wSbd1Frs7mi3z/rV1vqehYEg EQirCb0ad9Dm1iJJK4MTp7mSSUcnHVT66Hl9+ig5Qmgt7tCepfNAiJEz/t4UhRgECTLW +/IK7NDp8pgK6RfQgvApqvMibOdJpxeYo9EGlip2UxdcwayONNBrVbhUdlBWV4RqExGO oJsw== 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=Fm9ij16sdpD8iaSclUBxPmiCBICgn7uQ/6l6aDbLE7U=; b=sk7SE5gHU2RkN0rvUXboxyVHRlHe/mArczu7XRpmvu6/1s+sPiJYFK96qVi5suFG9s xJeEWGTitk+vKLouGEa7s2TGqEbdqdnim3Jr8SiBLDVF8wThBcP/BYJC0GSHjK7hlLgr WbreJU3J1GFipHXoSbtFiYPEndcJk176AFAdI22R98nkEyHoix2AKv95L/iPi/S9fqp0 WYN9f5ZkZz84umol37a48acvRDekkLsm4sgzUn4fMSaFasIhbzoZmIEKxRK5aByh3VCE Ls7urJkIRiYJmP4ZtIyqEVwI21vIZcJUI6KHOPsNSmG+PL3r28YOqS4JukKSHpz1PbTj HJmg== X-Gm-Message-State: APjAAAUd+rcHmo5bgxB8xcLZ6hReSQtrFkQsGis9U/zVCLgIpg/GXzqF etdCAoKxxVVbrIHy6CPQ+IPUuHW6n6aRf5KYw1SBHlV+ X-Received: by 2002:a1c:eb0c:: with SMTP id j12mr4257302wmh.55.1558341907386; Mon, 20 May 2019 01:45:07 -0700 (PDT) MIME-Version: 1.0 References: <20190502050206.23373-1-anup.patel@wdc.com> In-Reply-To: <20190502050206.23373-1-anup.patel@wdc.com> From: Anup Patel Date: Mon, 20 May 2019 14:14:56 +0530 Message-ID: Subject: Re: [PATCH v4 0/2] Two-stagged initial page table setup To: Anup Patel Cc: Palmer Dabbelt , Albert Ou , Atish Patra , Christoph Hellwig , Paul Walmsley , Mike Rapoport , "linux-riscv@lists.infradead.org" , "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, May 2, 2019 at 10:32 AM Anup Patel wrote: > > This patchset implements two-stagged initial page table setup using fixmap > to avoid mapping non-existent RAM and also reduce high_memory consumed by > initial page tables. > > The patchset is based on Linux-5.1-rc7 and tested on SiFive Unleashed board > and QEMU virt machine. > > These patches can be found in riscv_setup_vm_v4 branch of > https//github.com/avpatel/linux.git > > Changes since v3: > - Changed patch series subject. > - Dropped PATCH1 because it's already merged > - Dropped PATCH3 because trampoline page table handles a corner case > for 32bit systems where load address range overlaps kernel virtual > address range > - Revamped PATCH for 4K aligned booting into two-stagged initial page > table setup > > Changes since v2: > - Dropped PATCH2 because we have separate fix for Linux-5.1-rcX > - Moved PATCH5 to PATCH2 > - Moved PATCH4 to PATCH3 > - The "Booting kernel from any 4KB aligned address" is now PATCH4 > > Changes since v1: > - Add kconfig option BOOT_PAGE_ALIGNED to enable 4KB aligned booting > - Improved initial page table setup code to select best/biggest > possible mapping size based on load address alignment > - Added PATCH4 to remove redundant trampoline page table > - Added PATCH5 to fix memory reservation in setup_bootmem() > > Anup Patel (2): > RISC-V: Fix memory reservation in setup_bootmem() > RISC-V: Setup initial page tables in two stages > > arch/riscv/include/asm/fixmap.h | 5 + > arch/riscv/include/asm/pgtable-64.h | 5 + > arch/riscv/include/asm/pgtable.h | 7 + > arch/riscv/kernel/head.S | 17 +- > arch/riscv/kernel/setup.c | 4 +- > arch/riscv/mm/init.c | 327 ++++++++++++++++++++++------ > 6 files changed, 289 insertions(+), 76 deletions(-) > > -- > 2.17.1 Hi All, Any comments on this patchset? Regards, Anup