Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp8890145ybi; Thu, 6 Jun 2019 23:03:49 -0700 (PDT) X-Google-Smtp-Source: APXvYqwYVXMZDVrsY9IsmPXU8+P4UMs+7UXiT5bmiwYGnxpdpKsGHcC+Bys8bveOmVLFofnp/Cuv X-Received: by 2002:a65:5241:: with SMTP id q1mr1231177pgp.298.1559887429062; Thu, 06 Jun 2019 23:03:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559887429; cv=none; d=google.com; s=arc-20160816; b=BgySfnQNoMAt47RHIG7NQBPevZAjlW5uI9e/wOR4tPXW89+aEq8V8BPolvnZvHQLeO I+3KoNXqVJN9Afvoy2SDxTMnMdXcX8aRdmw6aBRzE+3Ot2m7PmRFGNwluLYqpJRwsX44 0ti80+emsKAHz/KMQ6WkYVWiZnilHSEdsArFoj5NsE4WQsaD8CK+FzmEc1x9iUHCg16L k3BatcHgnCGBZ2zEkoMRQIz+DOUbBvi4N3rp7URM35rLb6eaY7qfQeOo4FmyVqOfmyI1 V2j2LlQ+tZOUOnNqV2q2hTBolGpztVmXH9k26wIPX5d3FAjLulkyd4TR8TxhmaNwClsC XzgA== 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:in-reply-to :references:message-id:date:thread-index:thread-topic:subject:cc:to :from:dkim-signature:dkim-signature; bh=hkfooRm+YqDFOX2UeODT1sUKAjQGpjOctDza3yvn9/Q=; b=paliyHSa3/UFL+Zp4OqKnJ6OmcllAnMlWa7rAyHUrPRMCNaah7Pye1zdetdFJyPF3A YRgvBCD5qZRiN6J6P3HenB2C3v2CxjsarJuPfCdKevpPWnuHQ4mHmFR74/SY8Lf/GQzp z+8cTTTGRcvyalVtI0v16+5fC+le3h52BncbjELiE2sp1CUkXdyQp28WjAupGcWowIKP vD9m96pZFc8fBQV1otP5UavPb2k2Vbw+F3xRBjPYzwFSEiCLggjx4LGKxFAeBLH6H8LQ l97pFWuZePSr3vfLxdJp/uNyUy2fI1iWtIhROdz7xYFo7nWfbepgwNIz1jKdNcSvgATI skjw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@wdc.com header.s=dkim.wdc.com header.b=CvvnQno6; dkim=pass header.i=@sharedspace.onmicrosoft.com header.s=selector2-sharedspace-onmicrosoft-com header.b=U3OXmTLT; 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 d92si1042010pld.262.2019.06.06.23.03.32; Thu, 06 Jun 2019 23:03: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=fail header.i=@wdc.com header.s=dkim.wdc.com header.b=CvvnQno6; dkim=pass header.i=@sharedspace.onmicrosoft.com header.s=selector2-sharedspace-onmicrosoft-com header.b=U3OXmTLT; 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 S1727036AbfFGGBi (ORCPT + 99 others); Fri, 7 Jun 2019 02:01:38 -0400 Received: from esa1.hgst.iphmx.com ([68.232.141.245]:2240 "EHLO esa1.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726664AbfFGGBh (ORCPT ); Fri, 7 Jun 2019 02:01:37 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1559887297; x=1591423297; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=hkfooRm+YqDFOX2UeODT1sUKAjQGpjOctDza3yvn9/Q=; b=CvvnQno6PrnuYuPYKIkyn3EyHvKoAWc1JKKphh5Bg1hr9ASg7Uhp+12h AEOZAKyAkIJw9gimsYddPWR7cqeQZmqNDeSgNeV6oi0+vNGhGWvRWRk0u zT5eKhC6Vi9cT1qKu51XG/RcD8H7ILCPQzJGRYRn5zzc6PSPcftjxd2B6 ATqOZfzpMME+FJKwhycRBp6N+ZmD8wQp2nlHxcXq9XSw9zTWUUfZFW7tU Q0KAmpTvHt1nl+9+N5ftwA2JrgvYRN6HyIlccAcHgRSH1CO8W0HopqOia o84vFMA2SV58QN7O1pgS0IfjHs1QZUdDjx09eHkZgQ1ECHBs0Sf91psUm Q==; X-IronPort-AV: E=Sophos;i="5.63,562,1557158400"; d="scan'208";a="216314737" Received: from mail-sn1nam01lp2055.outbound.protection.outlook.com (HELO NAM01-SN1-obe.outbound.protection.outlook.com) ([104.47.32.55]) by ob1.hgst.iphmx.com with ESMTP; 07 Jun 2019 14:01:36 +0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sharedspace.onmicrosoft.com; s=selector2-sharedspace-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=hkfooRm+YqDFOX2UeODT1sUKAjQGpjOctDza3yvn9/Q=; b=U3OXmTLTLUvaOtDIY99OTwN2mQHH+23krn04ikXDXmuAmhUCibqmE8aiNiB/AS/F9W19jDJfKNz8GlGomI+CuYL6KRGVD5mia5+5dyhiYBnor3jnRgwk0kgNN5eyjk6jlmU4FeobVAq+t58vOfK9JutG/Kqo4jzxIJvmPpko4BQ= Received: from MN2PR04MB6061.namprd04.prod.outlook.com (20.178.246.15) by MN2PR04MB5920.namprd04.prod.outlook.com (20.179.21.161) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1965.14; Fri, 7 Jun 2019 06:01:34 +0000 Received: from MN2PR04MB6061.namprd04.prod.outlook.com ([fe80::98ab:5e60:9c5c:4e0e]) by MN2PR04MB6061.namprd04.prod.outlook.com ([fe80::98ab:5e60:9c5c:4e0e%7]) with mapi id 15.20.1943.026; Fri, 7 Jun 2019 06:01:34 +0000 From: Anup Patel To: Palmer Dabbelt , Albert Ou CC: Atish Patra , Christoph Hellwig , Paul Walmsley , Mike Rapoport , "linux-riscv@lists.infradead.org" , "linux-kernel@vger.kernel.org" , Anup Patel Subject: [PATCH v5 2/2] RISC-V: Setup initial page tables in two stages Thread-Topic: [PATCH v5 2/2] RISC-V: Setup initial page tables in two stages Thread-Index: AQHVHPZ1MEIeiSWDykO5didT7ZnaQw== Date: Fri, 7 Jun 2019 06:01:34 +0000 Message-ID: <20190607060049.29257-3-anup.patel@wdc.com> References: <20190607060049.29257-1-anup.patel@wdc.com> In-Reply-To: <20190607060049.29257-1-anup.patel@wdc.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: BYAPR07CA0099.namprd07.prod.outlook.com (2603:10b6:a03:12b::40) To MN2PR04MB6061.namprd04.prod.outlook.com (2603:10b6:208:d8::15) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Anup.Patel@wdc.com; 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: 90e999e8-8f88-4416-d816-08d6eb0d97fe x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600148)(711020)(4605104)(1401327)(4618075)(2017052603328)(7193020);SRVR:MN2PR04MB5920; x-ms-traffictypediagnostic: MN2PR04MB5920: wdcipoutbound: EOP-TRUE x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:7219; x-forefront-prvs: 0061C35778 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(366004)(346002)(376002)(39860400002)(396003)(136003)(189003)(199004)(68736007)(256004)(6512007)(54906003)(14444005)(2906002)(386003)(81156014)(71200400001)(52116002)(81166006)(76176011)(110136005)(72206003)(53946003)(476003)(26005)(2616005)(53936002)(8936002)(8676002)(99286004)(7736002)(4326008)(30864003)(2171002)(305945005)(6506007)(102836004)(50226002)(71190400001)(14454004)(186003)(25786009)(478600001)(486006)(6436002)(86362001)(6116002)(3846002)(6486002)(66476007)(64756008)(66446008)(66556008)(66946007)(73956011)(1076003)(446003)(316002)(66066001)(11346002)(44832011)(5660300002)(36756003)(2004002);DIR:OUT;SFP:1102;SCL:1;SRVR:MN2PR04MB5920;H:MN2PR04MB6061.namprd04.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: xWBjjJAXFUO4rG1GFnYmBBAthvFuN05nkvt6H+4gzUJdfSmSmYtFY/igoqdOXzo/DHXYpVKXgHDD3YcmUA8SgcnYekDzecXoLzpzBU0Z7i0QhxGsETcEHHGP3sTpvmTXv2oa+ZEog8TIDuAuYIHDz+fX0hXlB0oXUKI6d1aYXjNDXznzfZiA5ekNBz+7H58w4Z84BCRWw9J5p63LnfMtjd25iq5DxwMImq/FQSvHsKGbWp0hNPMGkVm+Pj5ND79cVp4jpsfFkRS03HPGk61vy+6vtoNBIFNDfVPtqkcs5Y4S5Um5XqsIHucnh+7fbaJgdc/Rwo/kQdrQ6YW3clO2gdC95V+GtMrkZ9kZquNq7wcZPapQGtVtAa9XyneZI9pdSProiDPC2FPzB0bYNDbBMrl7lF8jt+1DzHE/YtBBrEk= Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 MIME-Version: 1.0 X-OriginatorOrg: wdc.com X-MS-Exchange-CrossTenant-Network-Message-Id: 90e999e8-8f88-4416-d816-08d6eb0d97fe X-MS-Exchange-CrossTenant-originalarrivaltime: 07 Jun 2019 06:01:34.0814 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: b61c8803-16f3-4c35-9b17-6f65f441df86 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: Anup.Patel@wdc.com X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR04MB5920 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Q3VycmVudGx5LCB0aGUgc2V0dXBfdm0oKSBkb2VzIGluaXRpYWwgcGFnZSB0YWJsZSBzZXR1cCBp biBvbmUtc2hvdA0KdmVyeSBlYXJseSBiZWZvcmUgZW5hYmxpbmcgTU1VLiBEdWUgdG8gdGhpcywg dGhlIHNldHVwX3ZtKCkgaGFzIHRvIG1hcA0KYWxsIHBvc3NpYmxlIGtlcm5lbCB2aXJ0dWFsIGFk ZHJlc3NlcyBzaW5jZSBpdCBkb2VzIG5vdCBrbm93IHNpemUgYW5kDQpsb2NhdGlvbiBvZiBSQU0u IFRoaXMgbWVhbnMgd2UgaGF2ZSBrZXJuZWwgbWFwcGluZ3MgZm9yIG5vbi1leGlzdGVudA0KUkFN IGFuZCBhbnkgYnVnZ3kgZHJpdmVyIChvciBrZXJuZWwpIGNvZGUgZG9pbmcgb3V0LW9mLWJvdW5k IGFjY2Vzcw0KdG8gUkFNIHdpbGwgbm90IGZhdWx0IGFuZCBjYXVzZSB1bmRlcnRlcm1pbmlzdGlj IGJlaGF2aW91ci4NCg0KRnVydGhlciwgdGhlIHNldHVwX3ZtKCkgY3JlYXRlcyBQTUQgbWFwcGlu Z3MgKGkuZS4gMk0gbWFwcGluZ3MpIGZvcg0KUlY2NCBzeXN0ZW1zLiBUaGlzIG1lYW5zIGZvciBQ QUdFX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