Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp4827816imj; Wed, 13 Feb 2019 01:38:08 -0800 (PST) X-Google-Smtp-Source: AHgI3IbJXKuy7CdBjHQcRXP3e1Dbs34cmKS+wCUVuiOdkAI+xpKT7UUgxLQbug+h0684cZpd7qxV X-Received: by 2002:a17:902:b089:: with SMTP id p9mr2854878plr.271.1550050688230; Wed, 13 Feb 2019 01:38:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550050688; cv=none; d=google.com; s=arc-20160816; b=UAEcxX/mKav+/2Da4Ad4lkbHmZ/tcq6/rv3nmOMnoL367w2m1xBpbl5ttH09MyQbeQ s2FebWTP8ZoNq+Icd2t4DJlzXIapwE3JZ8KrXdd1/8ggfRQB0yu4sKMEpVxcRzqkxBNX IbnJkk/ZHcw6ea0ykSItYKyyYKDNSWfLYCXs5/GREuKRTBxevzLDqFba8zu16UbXQkFN ayPt11rY4Szv/qV+4AjdNBi+HmJ+U7wJJsoSz16yltPtjkixrdr76CJbmy8yC5Hr6Exi bUIQ4E9itKogqtfJiw+IqANCwze98jqvi5FFX73q9/TCd4cexZauryjHxK5vpBzeIUEi g4Zg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :wdcipoutbound:content-language:accept-language:message-id:date :thread-index:thread-topic:subject:cc:to:from:dkim-signature :dkim-signature; bh=hBFZS2yCZ2xeXn+3PyLxQ8lCtlcxVvcaboaNsE+1chk=; b=YaR4S5ytSFcTYITM24qPugztEj/ecdqufC1gPj5qaBF+ktUMyDHUc7ejIT99R2Hn8A xnyRC812hWYtQM1nGoQq0fPc49QZ0wZo6nDy4mDrtXSrEZI4usBdyRe5OyH7jxXMmmXB ZMllOtrATVu3qO4673IdKgSOnRVTi2p7sxSoIzn99HOzgsCXpuWXOTY2HKPPHIoIsQ8J JD+j9TYS1dsJy2ScmC3zrK7xjKh1pw40fXJAKykFf8NZGp/zSLiOZSEgtr0XGJGi5v4D PEw392MULMfHW4X6KAld4uIu4Un0ihge+OKiKrtlVaS2BsJ4uQES3GRA4DfHlGT+Ab+H vUcQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@wdc.com header.s=dkim.wdc.com header.b=QvtpjMzx; dkim=pass header.i=@sharedspace.onmicrosoft.com header.s=selector1-wdc-com header.b=JHDD7+1Z; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=wdc.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s5si14928296plp.139.2019.02.13.01.37.44; Wed, 13 Feb 2019 01:38: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=fail header.i=@wdc.com header.s=dkim.wdc.com header.b=QvtpjMzx; dkim=pass header.i=@sharedspace.onmicrosoft.com header.s=selector1-wdc-com header.b=JHDD7+1Z; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=wdc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733022AbfBMGb7 (ORCPT + 99 others); Wed, 13 Feb 2019 01:31:59 -0500 Received: from esa2.hgst.iphmx.com ([68.232.143.124]:25911 "EHLO esa2.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728793AbfBMGb7 (ORCPT ); Wed, 13 Feb 2019 01:31:59 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1550039546; x=1581575546; h=from:to:cc:subject:date:message-id: content-transfer-encoding:mime-version; bh=zgY0C0W+/2m7wtDucSuNDsJmmd7DjD9EpKzfDF75gOY=; b=QvtpjMzx4RP53swqR8I3v6kSIB7OhAuHSHQWykaGvTaToae6azCRmG5S Q9gJ94ZmQVrINcf3xTwWLxcXDpehc6nnvxzQKMyb13tPpH8uX4FqVZzCQ N84AhdWcAxMywLhNKziLvlZJRhx0DhRam+YiNdIRYfKp6zVhHesO0N5RJ 08aH6VLYdMDTHbfgnz8HE1X0cpiijgeIFfUuM3rx3JqzXVPE3GyIixaoy WycWkE8aM1U+i5HqXuO9tvLt1RWwmJSCIPrw1K50w4lwIv5+1XEiAJy7p jJUksZ7qitFHLYwTidmKLscZNqxIod1KSYUp+dBANrb/nNN/YLPxt4wjm w==; X-IronPort-AV: E=Sophos;i="5.58,364,1544457600"; d="scan'208";a="199287553" Received: from mail-co1nam05lp2054.outbound.protection.outlook.com (HELO NAM05-CO1-obe.outbound.protection.outlook.com) ([104.47.48.54]) by ob1.hgst.iphmx.com with ESMTP; 13 Feb 2019 14:32:25 +0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sharedspace.onmicrosoft.com; s=selector1-wdc-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=hBFZS2yCZ2xeXn+3PyLxQ8lCtlcxVvcaboaNsE+1chk=; b=JHDD7+1ZW+7roliFnN9PqMR2RG0gecFRxIIUi59wPCYb/jgSETNJWb/y3RQwU2M+p5GAeE5YUOcdyyChAIDySmGmCy4nJRh/ItZXpwmfr/MrxuYMYkflmc4ewff1b9lBQ5w/Gx2XziEoYw8I+p1tpgMKfFETqCfSj+mdEt5eh6E= Received: from DM6PR04MB6059.namprd04.prod.outlook.com (20.178.226.89) by DM6PR04MB5515.namprd04.prod.outlook.com (20.178.224.158) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1601.22; Wed, 13 Feb 2019 06:31:57 +0000 Received: from DM6PR04MB6059.namprd04.prod.outlook.com ([fe80::d006:5be7:c3f:ba6c]) by DM6PR04MB6059.namprd04.prod.outlook.com ([fe80::d006:5be7:c3f:ba6c%2]) with mapi id 15.20.1601.023; Wed, 13 Feb 2019 06:31:57 +0000 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 v4 0/6] Fixmap support and MM cleanups Thread-Topic: [PATCH v4 0/6] Fixmap support and MM cleanups Thread-Index: AQHUw2XRghsXOYeqT0GN1LpVy53Myg== Date: Wed, 13 Feb 2019 06:31:56 +0000 Message-ID: <20190213063127.28703-1-anup.patel@wdc.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: MA1PR0101CA0027.INDPRD01.PROD.OUTLOOK.COM (2603:1096:a00:22::13) To DM6PR04MB6059.namprd04.prod.outlook.com (2603:10b6:5:129::25) x-ms-exchange-messagesentrepresentingtype: 1 x-mailer: git-send-email 2.17.1 x-originating-ip: [129.253.179.161] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: a61f71f1-bbc5-4afd-c7a0-08d6917cf367 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600110)(711020)(4605077)(4618075)(2017052603328)(7153060)(7193020);SRVR:DM6PR04MB5515; x-ms-traffictypediagnostic: DM6PR04MB5515: x-ms-exchange-purlcount: 1 wdcipoutbound: EOP-TRUE x-microsoft-exchange-diagnostics: =?iso-8859-1?Q?1;DM6PR04MB5515;23:Bfgj999h/eSrY5/d0VgLRDWt5sLabpLq7iAnFn3?= =?iso-8859-1?Q?574Jr4DVk9HyNJzg34yAPlDZi6ZmJ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?iso-8859-1?Q?SOylisSU3Nq6Iiin4XDWM7MvBWjvsk92o10dTcu7gdYz8ASLxn2X79xSTQ?= =?iso-8859-1?Q?WQ9winJd0E+7DGm6h4+O6/YXK9SKEvMIpKkZFmvFo2MpP6hKkAw12c+kiX?= =?iso-8859-1?Q?tX9qyUKf0f74UumMKMZvpZJVFuVKgzr2KkefA8jwNzjbblGyRU/CS6dL0c?= =?iso-8859-1?Q?ZdIz4LiLhpwSnA89m1SoBpeJh1MjwWo3u7L24IY9tr/WFpBrAtZ+NkEI9R?= =?iso-8859-1?Q?ZkELIcFRbPR1Om5YzsqezhK4uvibXsI33fH3MbqSeQPfWs7HHtdzb8k4ZR?= =?iso-8859-1?Q?4CfYFX+wVeoWu4Oo7KHefpMkTxm+UdaHWwlUoF3IHMqhdMKZIqDrDajJ8w?= =?iso-8859-1?Q?6gujmxmpgjEp8hyFk0w5u0u?= x-microsoft-antispam-prvs: x-forefront-prvs: 094700CA91 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(136003)(366004)(39860400002)(346002)(396003)(376002)(199004)(54534003)(189003)(1076003)(6512007)(2171002)(478600001)(72206003)(966005)(386003)(6346003)(2616005)(102836004)(6506007)(476003)(2906002)(6306002)(256004)(50226002)(4326008)(97736004)(14454004)(6486002)(110136005)(25786009)(6436002)(68736007)(316002)(44832011)(486006)(99286004)(36756003)(8936002)(186003)(6116002)(106356001)(81156014)(81166006)(8676002)(3846002)(86362001)(26005)(105586002)(71200400001)(71190400001)(66066001)(305945005)(53936002)(52116002)(7736002)(54906003);DIR:OUT;SFP:1102;SCL:1;SRVR:DM6PR04MB5515;H:DM6PR04MB6059.namprd04.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; authentication-results: spf=none (sender IP is ) smtp.mailfrom=Anup.Patel@wdc.com; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: U4dhIJV9o1F1jPoeI+FmOsSBGJJZHOThJi9ZkDinq2RiXPpj8PpfoISk2C0ADx90zGjJvNXTLmlUCItNTt+VMaUKM+/MIrxe1rXfPE8cHyUu+r0+A11NcJuuHn1S4odDZghPe2j3teuJtalmz0KpsGHll/bQtGUvbFS5xtBKEBt1mOajyGSMcVkaXvg3pDJ82MunvwouIQueVQ6TaAGi5Dv6ej51Z5nDyvwAJCiWa5qt0x7wvKYgHIT0jlOxkZ+YVV4iAor+BE/45s1b6g1iUiVBlWcJ/jrxfj/ewMUmPJPl668Ei+0iJea6IsyEuq0KKri+C3/ggaa66Q2QU3k7GYD4V74Ar0ToA9G1R3crp4L3AUPGw+FlbWGqdJqfW93OWWRs4MrYRaV/gZo4agjCYNB39ZRmgNJ/fx9geJV9x44= Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: wdc.com X-MS-Exchange-CrossTenant-Network-Message-Id: a61f71f1-bbc5-4afd-c7a0-08d6917cf367 X-MS-Exchange-CrossTenant-originalarrivaltime: 13 Feb 2019 06:31:53.7461 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-id: b61c8803-16f3-4c35-9b17-6f65f441df86 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR04MB5515 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=3Duart8250,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-rc6 and can be found at riscv_fixmap_v4 branch of: https://github.com/avpatel/linux.git. Changes since v3: - Re-worked and simplified PATCH6 Changes since v2: - Fixed commit description of PATCH6 - Ensured commit description of all PATCH use upto 72 characters per line Changes since v1: - Use more characters per line in changelog of PATCH3 - Removed #ifndef __ASSEMBLY__ from PATCH5 - Use more characters per line in commets of PATCH5 - Added PATCH6 to implement keepinitrd kernel parameter Anup Patel (6): 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 RISC-V: Free-up initrd in free_initrd_mem() arch/riscv/Kconfig | 3 + arch/riscv/include/asm/fixmap.h | 44 +++++++++++ arch/riscv/include/asm/pgtable.h | 1 + arch/riscv/kernel/setup.c | 107 +++----------------------- arch/riscv/mm/init.c | 124 ++++++++++++++++++++++++++++++- 5 files changed, 180 insertions(+), 99 deletions(-) create mode 100644 arch/riscv/include/asm/fixmap.h --=20 2.17.1