Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp6828208yba; Wed, 1 May 2019 22:03:47 -0700 (PDT) X-Google-Smtp-Source: APXvYqwwM+C86wFi/HMUKADqGedQsxVFJkPDyzagt+fni7fwKmK0qKhAgEOIftcPq1TR5DvfT+Hn X-Received: by 2002:a63:da51:: with SMTP id l17mr1840315pgj.115.1556773427288; Wed, 01 May 2019 22:03:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556773427; cv=none; d=google.com; s=arc-20160816; b=Fcdp1jZwNz3rd8HfisasBdRgXwubMPuy3XiI0ttRYyfmKto9QBbVKUQB4p2Om+284R 7Wpo04VYpVjOJz8Jdo9ygyH0ziG5aZYCPVRizKC3Ab9xsxQqh4flaXEALrZX3yRmcEd4 y1Vj/+ZDrvsCxJOYvaokCTSur8Gma1KYcpOZowYcssbZC8CND7knaRTChRQYU32xb/Tr eDfFz8uCKcNWvO8DMDRhn4BhPxOQ0hYbnwFz14EeukJ7xexNrL9GIODjVBDnisVN5ytN 7iQ8i00JprGjhmyEogKgg9P/ChJ2AP59+kjb8QsFtn2ObdiQL8ZaA4jU3NTihRtQZv9f xbuA== 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=hudxt7lduVUFNlHFN6S8+Siw1PK1toL0YJqfIpGbsYw=; b=VQvZCJaM+zy2sKJ43QAdCvqHR9aZjaqZSvUAR/QlWyOitsq1NTO3SqAKnKaEK06QLK 81/fsOULcfOLa8C6Pxgu2sNChAkysk8iHVniCGJWJPBU6DJPPQ7oXVeFNKbh/IO9gqLK lPG6GnZPaOlg8PxjJ4bi8l8hGgE7f38ehqZ4IAz5U6XySWFvGJ1WBH4vU6Sy1tMUIkA2 vJpG5BpapHHgiiAVCRddmxFNdyic4lsD1F6o4ntakruF7BM3z1uI20/AKRzPO6LHN5ra DaMqgNzzH5c2FswuH0qase9zc/wtzMJn4Z47Ol7j5dh4pPIHSxjmOVd6jgJ8QJF2HTwl jO7Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@wdc.com header.s=dkim.wdc.com header.b="D6oXyOx/"; dkim=pass header.i=@sharedspace.onmicrosoft.com header.s=selector1-wdc-com header.b=LnFgAVng; 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 136si39851358pgb.552.2019.05.01.22.03.31; Wed, 01 May 2019 22:03:47 -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="D6oXyOx/"; dkim=pass header.i=@sharedspace.onmicrosoft.com header.s=selector1-wdc-com header.b=LnFgAVng; 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 S1726207AbfEBFCi (ORCPT + 99 others); Thu, 2 May 2019 01:02:38 -0400 Received: from esa4.hgst.iphmx.com ([216.71.154.42]:47504 "EHLO esa4.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725616AbfEBFCh (ORCPT ); Thu, 2 May 2019 01:02: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=1556773357; x=1588309357; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=hudxt7lduVUFNlHFN6S8+Siw1PK1toL0YJqfIpGbsYw=; b=D6oXyOx/1xIFclGYFuagr6gEKGDAC1/IHXe892XwPK2L8FDTUBhR9a/Y GiMJLcyxKbRc0amkJqnj0SKT/v2gUuTJC+zJ7zzA+QKXAXjII9z2dJ6oM Z7ZS4qb4bauvhrFEpvo8gvaEuv14hjcW7jmQKXDolpLyLmuhgKM/jk4kj oU8krJwwq2Xmjb9uomOfED1l9gtLLPBCrRZSFey5ByLHhp62PuvaKx2v1 hqrwB1o8Kt1z3MKcOwmgns9bnkmwg1hDMei3VcsHlHWo9qm1DSp8afXWg ajc8UXwZnPLpRFBcaSbWyhnRwLq4WNMkKdOH0/tqDs3Ol/BBhg9rbx7+u w==; X-IronPort-AV: E=Sophos;i="5.60,420,1549900800"; d="scan'208";a="107321531" Received: from mail-bn3nam04lp2051.outbound.protection.outlook.com (HELO NAM04-BN3-obe.outbound.protection.outlook.com) ([104.47.46.51]) by ob1.hgst.iphmx.com with ESMTP; 02 May 2019 13:02:36 +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=hudxt7lduVUFNlHFN6S8+Siw1PK1toL0YJqfIpGbsYw=; b=LnFgAVngObiOn9uVgDgQaxyWh9E16+keaHdZeJspv0CacDyz0q+UBoI+x2++N/2xYHtnI5RihNRTLpmVhd1KdQ7dhh8zyN4R3LFw43066EsEeKV67RFmBChFi3+LH42hiRM/GiOjTL6NCN6IUujNDSitBR8Wpo38RExa5XWRdHQ= Received: from MN2PR04MB6061.namprd04.prod.outlook.com (20.178.246.15) by MN2PR04MB5582.namprd04.prod.outlook.com (20.178.248.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1856.11; Thu, 2 May 2019 05:02:34 +0000 Received: from MN2PR04MB6061.namprd04.prod.outlook.com ([fe80::c500:5fd2:9194:e38]) by MN2PR04MB6061.namprd04.prod.outlook.com ([fe80::c500:5fd2:9194:e38%3]) with mapi id 15.20.1835.015; Thu, 2 May 2019 05:02: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 v4 1/2] RISC-V: Fix memory reservation in setup_bootmem() Thread-Topic: [PATCH v4 1/2] RISC-V: Fix memory reservation in setup_bootmem() Thread-Index: AQHVAKRAl0Mwp2Ao5UCsXvDdaQGVog== Date: Thu, 2 May 2019 05:02:33 +0000 Message-ID: <20190502050206.23373-2-anup.patel@wdc.com> References: <20190502050206.23373-1-anup.patel@wdc.com> In-Reply-To: <20190502050206.23373-1-anup.patel@wdc.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: BYAPR07CA0049.namprd07.prod.outlook.com (2603:10b6:a03:60::26) 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: 58e66b71-89f0-4ab3-304e-08d6cebb62f5 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600141)(711020)(4605104)(4618075)(2017052603328)(7193020);SRVR:MN2PR04MB5582; x-ms-traffictypediagnostic: MN2PR04MB5582: wdcipoutbound: EOP-TRUE x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:2582; x-forefront-prvs: 0025434D2D x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(366004)(136003)(376002)(39860400002)(396003)(346002)(189003)(199004)(5660300002)(1076003)(6436002)(486006)(305945005)(66066001)(476003)(71200400001)(71190400001)(26005)(44832011)(81156014)(86362001)(81166006)(8676002)(11346002)(102836004)(54906003)(446003)(2171002)(25786009)(186003)(110136005)(316002)(6486002)(386003)(50226002)(72206003)(6506007)(8936002)(53936002)(256004)(73956011)(36756003)(76176011)(3846002)(6116002)(2906002)(4326008)(68736007)(2616005)(66946007)(99286004)(7736002)(14454004)(6512007)(478600001)(66446008)(64756008)(66556008)(66476007)(52116002);DIR:OUT;SFP:1102;SCL:1;SRVR:MN2PR04MB5582;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: oau2JSBfxc+sHfMGGTYUiLwzR3iET+dgatSOPM26DxLsKqQE/pEdtqzJ7HEyocsJF/7pNBzbFtaRT1jPlptWVIIPeP28E6nHZtXMqH9PP5ENGKoSQiUVp642SJ9wZNtlMTA/JlgJ77DGOmM6sl5cKJp4nLT0li0iAeY+eg4JbA1+v6Hz3+OvmEfqlqlANh4OYEBYKMZ8tz28m2EOVLe/vJgvPGLfZmENpPAMBWoQAqA7pgNGJDedbMN/J91Hn7wteOlBir4b5LWTw18RESPkqvPZLGv1uSLwxhgtVAvCRmK7Hnq2nLmx2G1Fje64hjC+O0IuX+LK6wqUrwDcEufDiSgDS5n2xZTVG77CZcZzzCHyaWO8e697VRkYS68JGnIhlxux95EqxRZom65v1x1Ky+b/0gHpuH6eGxW4ZXVKON8= 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: 58e66b71-89f0-4ab3-304e-08d6cebb62f5 X-MS-Exchange-CrossTenant-originalarrivaltime: 02 May 2019 05:02:34.0060 (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-Transport-CrossTenantHeadersStamped: MN2PR04MB5582 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Q3VycmVudGx5LCB0aGUgc2V0dXBfYm9vdG1lbSgpIHJlc2VydmVzIG1lbW9yeSBmcm9tIFJBTSBz dGFydCB0byB0aGUNCmtlcm5lbCBlbmQuIFRoaXMgcHJldmVudHMgdXMgZnJvbSBleHBsb3Jpbmcg d2F5cyB0byB1c2UgdGhlIFJBTSBiZWxvdw0KKG9yIGJlZm9yZSkgdGhlIGtlcm5lbCBzdGFydCBo ZW5jZSB0aGlzIHBhdGNoIHVwZGF0ZXMgc2V0dXBfYm9vdG1lbSgpDQp0byBvbmx5IHJlc2VydmUg bWVtb3J5IGZyb20gdGhlIGtlcm5lbCBzdGFydCB0byB0aGUga2VybmVsIGVuZC4NCg0KU3VnZ2Vz dGVkLWJ5OiBNaWtlIFJhcG9wb3J0IDxycHB0QGxpbnV4LmlibS5jb20+DQpTaWduZWQtb2ZmLWJ5 OiBBbnVwIFBhdGVsIDxhbnVwLnBhdGVsQHdkYy5jb20+DQpSZXZpZXdlZC1ieTogQ2hyaXN0b3Bo IEhlbGx3aWcgPGhjaEBsc3QuZGU+DQotLS0NCiBhcmNoL3Jpc2N2L21tL2luaXQuYyB8IDE0ICsr KysrKystLS0tLS0tDQogMSBmaWxlIGNoYW5nZWQsIDcgaW5zZXJ0aW9ucygrKSwgNyBkZWxldGlv bnMoLSkNCg0KZGlmZiAtLWdpdCBhL2FyY2gvcmlzY3YvbW0vaW5pdC5jIGIvYXJjaC9yaXNjdi9t bS9pbml0LmMNCmluZGV4IGJjN2I3N2UzNGQwOS4uYWI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