Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3754624imu; Mon, 7 Jan 2019 08:52:08 -0800 (PST) X-Google-Smtp-Source: ALg8bN5LzI3xXpjJkK1dzDee2d4vcCyuQA7k6e96rZeWcg/2PhBa6kaRe5qJ6/K5nby49c02mtMa X-Received: by 2002:a63:f30d:: with SMTP id l13mr30805989pgh.399.1546879928361; Mon, 07 Jan 2019 08:52:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1546879928; cv=none; d=google.com; s=arc-20160816; b=BEAq8yxlBmvoRtvQJ+YktEVRcFo7H1jqh4R0/HhuVZ/xT+KYNaBltJYwSpwo93akxJ 0qEeiBBH+Ky+gREBdtKQiwBNg8kzAZcTyNIaEcFxl71YYLzXIUzzumEoxTm3FpcJIFW7 XI0X2/YddUNmzPjFooCLrnXxp5kmSOM+BCQNxhu90zmibIzR5TlH6Fkn+YPCvJINgj/t kKOMrV5/st1Em4PTjOC2dWqPT7s5trFNLWno1qoe7wXvTtXkwin2ST8hsxt/NfHrMTvq a5Hwin2QuYDL+TuUyF4gBk0ACS+zhlqUZdvDdQCe4TUkBv60+RPL+fpJNPaM/kx8Gsaq QJLQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=r+bbCVvJkcdWrVFRIVDVXamcKKSHxagP8W8Jb1FDxYQ=; b=jh0bMebxIwWEvIHBH/WAuiY2KUq2ZWOTUpAXBMYrIoXN3svGDEG2nqr0RIyZRaEQbr /p6F4dM82QlhJpnohmTAXVhea3S2l+whF3Bbn7wuG/wr/VwQfmbksXEmz1vNCrrG1fpv yWiBmFag6Blfmz84d+0Goh3ZcCIBv8eypaCJ/UYG3C3KvA+VE5Aw1nDVW42GMJPW+aLX aK0PXlWzwQlISDzLYJIOB5zeNvu0JBERZ9WnP7DwgTK2ZySWQQ9N6b9OGvPWDx9OcqC3 XJuNMChznpga2PN6x5YgxJ7y68W4nkGyjJEUTlm1zrKJKhuK7iiRz+SQGCpGgY+Wa/EB FCwA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@brainfault-org.20150623.gappssmtp.com header.s=20150623 header.b=z9XzDcy1; 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 76si7732306pfw.66.2019.01.07.08.51.52; Mon, 07 Jan 2019 08:52:08 -0800 (PST) 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=z9XzDcy1; 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 S1728717AbfAGQLJ (ORCPT + 99 others); Mon, 7 Jan 2019 11:11:09 -0500 Received: from mail-pl1-f194.google.com ([209.85.214.194]:39346 "EHLO mail-pl1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727002AbfAGQLJ (ORCPT ); Mon, 7 Jan 2019 11:11:09 -0500 Received: by mail-pl1-f194.google.com with SMTP id 101so354415pld.6 for ; Mon, 07 Jan 2019 08:11:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brainfault-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=r+bbCVvJkcdWrVFRIVDVXamcKKSHxagP8W8Jb1FDxYQ=; b=z9XzDcy1of7BfEH5zq2Cyro9679+pORefM33EwJ3aDSKyRGyQVC4wwnZhQqrR/wLJ2 Dkh3o3WhR0+c6bIz8qG8vJxFPl6fabgFbSLjADfnBaya0dQXFM/50nnB3IrBWaUm1UiN QCSm8JKj4IZNxQTjdr0AER3VKQxTByh9N6pJ3E1gs7qhK3zlXlTpkln5gd0mLF7EeBVI GHIaObfwAplHtBf7G1oR+op4X5rGcOmDl90N/2Btt0qzyD7zNXdCuLltw/LRp4lN3EbM r05NglnIfPDp1rZ9JGDfQ3f5GXz2TyCEh+HAOdUh86CO3zUdiotNx1J5w74eWR/9focA Vv1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=r+bbCVvJkcdWrVFRIVDVXamcKKSHxagP8W8Jb1FDxYQ=; b=a4RRPAUNmZFfwUtnqdETE/5PXtUo3kmZTTWVFRM0+oeKta5Oq9Ew+PVaTL7ByRvB2n ofJ1yaMETZ61DQJCiDsrJlO7igH8uc0EBx/DZ/dABbB3vagGqmue9Kr8Ywo+4SFzTHlY Slcf+mHie0O4QeVppTV8r8GcUirnpt064dEab2scpH4EOvUE2LG19mspRM2UQwLZjogZ dEUD53oMDs8DBoX/ZcujkxxKWoD949ME5dw9DgnEUX8mlHnvNKsX3N2ntcoOUb6+t8Gp Ka+rY9MEdBvoKsJoA2J+GJaw1nL2SlGgwFn0w4GLFR1QkuhF5cgvOxELYe0Ip4WLSflw EVlQ== X-Gm-Message-State: AJcUukehZiVD5sYN2BjMYZQCvDd6dHJWhFN7v380mpHQ5UOCB4mR56aA SH+yGkb/tO2UrC8XyvGNGrf8ww== X-Received: by 2002:a17:902:280b:: with SMTP id e11mr62036116plb.269.1546877468236; Mon, 07 Jan 2019 08:11:08 -0800 (PST) Received: from localhost.localdomain ([49.207.48.214]) by smtp.gmail.com with ESMTPSA id a10sm93243512pfi.138.2019.01.07.08.11.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 07 Jan 2019 08:11:07 -0800 (PST) From: Anup Patel To: Palmer Dabbelt , Albert Ou Cc: Atish Patra , Paul Walmsley , Christoph Hellwig , linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, Anup Patel Subject: [PATCH 0/5] Fixmap support and MM cleanups Date: Mon, 7 Jan 2019 21:40:42 +0530 Message-Id: <20190107161047.10516-1-anup@brainfault.org> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patchset does: 1. Moves MM related code from kernel/setup.c to mm/init.c 2. Implements compile-time fixed mappings Using fixed mappings available, we can now get earlyprints even without SBI calls. For example, we can use kernel parameter "earlycon=uart8250,mmio,0x10000000" to get early prints on QEMU virt machine without using SBI calls. The patchset is tested on QEMU virt machine. It is based on Linux-5.0-rc1 and can be found at riscv_fixmap_v1 branch of: https://github.com/avpatel/linux.git. Anup Patel (5): RISC-V: Move free_initrd_mem() to kernel/setup.c RISC-V: Setup init_mm before parse_early_param() RISC-V: Move setup_bootmem() to mm/init.c RISC-V: Move setup_vm() to mm/init.c RISC-V: Implement compile-time fixed mappings arch/riscv/Kconfig | 3 + arch/riscv/include/asm/fixmap.h | 52 +++++++++++++ arch/riscv/include/asm/pgtable.h | 1 + arch/riscv/kernel/setup.c | 106 +++----------------------- arch/riscv/mm/init.c | 123 ++++++++++++++++++++++++++++++- 5 files changed, 186 insertions(+), 99 deletions(-) create mode 100644 arch/riscv/include/asm/fixmap.h -- 2.17.1