Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp40654ybd; Fri, 21 Jun 2019 21:14:54 -0700 (PDT) X-Google-Smtp-Source: APXvYqzLxLJyjoTF/rw8ycA6AouqoVpQV+ndCLGW4wQpTBbOj0V3vi4yeEqg6s1EEVKG4fyh0G6j X-Received: by 2002:a63:8b41:: with SMTP id j62mr7919481pge.299.1561176893994; Fri, 21 Jun 2019 21:14:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561176893; cv=none; d=google.com; s=arc-20160816; b=HkHJlcaaNNCKNzHiuoxCuZXiOZPwYCbFlYMc5TuymGfxytlQFnnKajnRLX4Yti8Vsc M9asX9mWOqIvynsdLLLwzX/gP9NOHXUnPSKEHXuYdJTfEiheiAyZ/lg+qCZD/PugLwoe NuzRs0J7gBvY9KtkQjCUizk5XRuKe0SAQ/YBfmZUB7/s7iN626/c7emc5SDj8pgfBFpy YVOuvmiurV3JUrnHm4/WoJp5pvtXaNrEUCHo1ZsJI5I3NmrMhEEY7KjaFH3QCLeWN1OF tamx6xPCJ5dDFbg5PeCMVHOiZ0ffb6zSKG0gxfGBYrZbOhIF6yNIEdFPa+fLbJh8Yvi+ Aj5w== 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=UnNxgzz45jXanekL0G0iIwxvOLwF76KDyFR4BupDUBg=; b=zv1+aowgj0bn0WP+RKvRsUI9O19jSshbXEFiuAexKIvdsK3Evl8ZfCP6hlD/CPeERB rYKV5d2pN59XVHeKn7EOjBh3SmjjLwFNlAhdrK9fbchQ7iKz9x3HwsHcy9cOkaXPSMIN mkTRo1ymn5kJkAYqtUrZAFw+OH/a3cCreZ90w9kNxoD1O+6kLhCo4yG+SyTwTt4goGCm zBvGpm4xiqhmvQet5V18gmpzwy0u0ga8TSnKmnf+XPA3axcQR9nvuqAdZUEU3bd2pH0q KvuC2iP+Fol4qPzukTT48X2siRw44IKkki1e1YlpDNxVxOpRF6siZtJSKOhEcjkYsUu9 Tjdg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@brainfault-org.20150623.gappssmtp.com header.s=20150623 header.b=DlB6oG9V; 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 i1si4025582pgq.13.2019.06.21.21.14.11; Fri, 21 Jun 2019 21:14:53 -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=DlB6oG9V; 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 S1726075AbfFVEOI (ORCPT + 99 others); Sat, 22 Jun 2019 00:14:08 -0400 Received: from mail-wr1-f67.google.com ([209.85.221.67]:35316 "EHLO mail-wr1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725929AbfFVEOI (ORCPT ); Sat, 22 Jun 2019 00:14:08 -0400 Received: by mail-wr1-f67.google.com with SMTP id m3so8390788wrv.2 for ; Fri, 21 Jun 2019 21:14:07 -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=UnNxgzz45jXanekL0G0iIwxvOLwF76KDyFR4BupDUBg=; b=DlB6oG9VvsR/BRBZyLkN0QQkvG07sO3eJyod1fWS76wH/Nf6Zijqk/4rKrboH9aoCR G1d+knbtufM28yqt/GYYFu4qEU0JsCmEPgTMV7W356ufFI2/G/xKexgOv8fG+9baXvN5 6bdblZ/bBKtztU58TxVfw7aMaSxN+9Tg/rSuwEvkG4tkqYE6BAqyZjN8r8L/wrscBvmF Kez0b3Ghd4SYlU0YX70osvFUAMVm9Fd9k0XUGkdWwYmyXBewi9CHE+7j6rwSZrKNJSNo 8Plt41Zx/TSsXGmBtiQlo+f9tDDnB7EUUDBtzdnD/rs5uekSljtr7TmSKfTIHbnU6nJD KPFA== 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=UnNxgzz45jXanekL0G0iIwxvOLwF76KDyFR4BupDUBg=; b=lbrUF0EL+AYvgspl4shaqUsvud9V37mk1GGGy5BnQYP4Ja0iCkniknbTcICvJpbTKr a2EejKB4PHo075yosR2Za7DeZy2g0DP+XqceOA2DgMiiTLbdxNCQ2ZJeFNLvN0vFpf5Q 3AmCKg7XHzfhwbgQj2gdj7U5kxXLn4wik84xwJzr7A0R/rXiKcyB9CSoESB4N2QWwMl+ leE9rYy5NUn/NmwcaonWd31O0gOM4Tcibdk08P7BJ+1IdgRFYk+d3k/pUNjq3tjj2xhd 3jW9JEaJs13JR9PlcDEdlpBLtBuliROMuc30sBz4AOGJJqV/oKf9R+WtWRanzcPLyyHf 8D1g== X-Gm-Message-State: APjAAAXaDdeJ5F8+vdZM70roYcj6Q4hSqK6euAupVixbthDlRlk8QN+T 5zgspL6gbBc6UCw+BwOgYi4idXBgz2WyNdMTmjYoPw== X-Received: by 2002:a5d:5448:: with SMTP id w8mr65875480wrv.180.1561176846303; Fri, 21 Jun 2019 21:14:06 -0700 (PDT) MIME-Version: 1.0 References: <20190607060049.29257-1-anup.patel@wdc.com> In-Reply-To: <20190607060049.29257-1-anup.patel@wdc.com> From: Anup Patel Date: Sat, 22 Jun 2019 09:43:54 +0530 Message-ID: Subject: Re: [PATCH v5 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 Fri, Jun 7, 2019 at 11:31 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.2-rc3 and tested on SiFive Unleashed board > and QEMU virt machine. > > These patches can be found in riscv_setup_vm_v5 branch of > https//github.com/avpatel/linux.git > > Changes since v4: > - Added dtb_early_va which points to DTB for early parsing > > 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 | 8 + > arch/riscv/kernel/head.S | 17 +- > arch/riscv/kernel/setup.c | 6 +- > arch/riscv/mm/init.c | 331 ++++++++++++++++++++++------ > 6 files changed, 292 insertions(+), 80 deletions(-) > > -- > 2.17.1 Hi All, Any comments on this series? Regards, Anup