Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp916810ybl; Wed, 4 Dec 2019 13:12:57 -0800 (PST) X-Google-Smtp-Source: APXvYqxFTuuorV3OpzRp+E46q3uWtgRhE987QV+vJu7meQVv5veMnumhvjgETJvMi8Ux8Lem+0KQ X-Received: by 2002:a9d:27c4:: with SMTP id c62mr4227703otb.292.1575493977079; Wed, 04 Dec 2019 13:12:57 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1575493977; cv=pass; d=google.com; s=arc-20160816; b=W9pFu4y2WZ+v4o6qIG7MZfNgTBaZZTt/gLwSvD7MQFz+B+F+aNiY2hDm1spTCJ2Mkl hop3k3dzcIu85YjhWbE1OgaYks6GEXpExKY9+1jqNUWvtrDvs4iBKn2StxQTbovC6evz /C50+bmPqbf34dQZQbY93ePJihoq/b+qrU196kGOIJoV474YBxV3cGA0fyXGoWlEDnh4 oGJFW2UJZxqNYwr9UHpysK4Db+EAmlxi4L9LstSHg5Dfui98J/pQ6hetSeguh0TGb/9o AlRtm9IMc0rBixkRhhYt6Y3saiw8m5Tx2oKu3heHEg+UYtODiYQKnrXc04sTU6H/4SLn tcqQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-id:wdcipoutbound:content-language:accept-language :in-reply-to:references:message-id:date:thread-index:thread-topic :subject:cc:to:from:dkim-signature:ironport-sdr:dkim-signature; bh=NBZzdoehiQFGGo2a8ac2oadyP2pwwn8fJ4bZ/yxhelU=; b=H6D4MIE/ZBMwRrIaysrBMgj+BL0prjDhdo/xipOrkOZEHIms7OEy90Wy1qj94wLQ12 PSgpoH48RGOcdibJHdSNdtjScqkPp+tmwj6hDMQyiGgvb4tH+edGtWtYGx1J2O2dQbw1 nCV5o9In0jLtXDBKb5yOw7vGVfr3tYDBIsFXnrujVed6IvIoQefliXvg/KcDnwD3OyXj SF5KVDNGKwfUlGMOfrrNpPefzLv9prx4/kke9hSqUEek089ShV10tuBl+M1rZUUkcWsn +undVmfNYpt5ldQrh1UjjNbVUR+u/pCo3SSD2YISlxssJJBN6KFXCgf2C97dn29Q/3/Q fmYw== ARC-Authentication-Results: i=2; mx.google.com; dkim=fail header.i=@wdc.com header.s=dkim.wdc.com header.b=KptP3Dm8; dkim=pass header.i=@sharedspace.onmicrosoft.com header.s=selector2-sharedspace-onmicrosoft-com header.b=hb3XitQN; arc=pass (i=1 spf=pass spfdomain=wdc.com dkim=pass dkdomain=wdc.com dmarc=pass fromdomain=wdc.com); 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 90si3460645otc.28.2019.12.04.13.12.40; Wed, 04 Dec 2019 13:12:57 -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=KptP3Dm8; dkim=pass header.i=@sharedspace.onmicrosoft.com header.s=selector2-sharedspace-onmicrosoft-com header.b=hb3XitQN; arc=pass (i=1 spf=pass spfdomain=wdc.com dkim=pass dkdomain=wdc.com dmarc=pass fromdomain=wdc.com); 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 S1728089AbfLDVK2 (ORCPT + 99 others); Wed, 4 Dec 2019 16:10:28 -0500 Received: from esa5.hgst.iphmx.com ([216.71.153.144]:53269 "EHLO esa5.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727930AbfLDVK2 (ORCPT ); Wed, 4 Dec 2019 16:10:28 -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=1575493828; x=1607029828; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-id:content-transfer-encoding: mime-version; bh=NBZzdoehiQFGGo2a8ac2oadyP2pwwn8fJ4bZ/yxhelU=; b=KptP3Dm8kltbCfHrUqIz/xN8/KwlfKT1on8zmcEeEI/g0d+JCoVc0JSU ubXT+2ALYUaDdj26+e8tqTVADXfUVhVsuRNAFFArgVe9zfPJnobDGZOg4 VukFDObbzRV5eO4u1zNnzJasFlb+MRn4/LipmL6csWJTGvI0G2eNl4zwW PqHpn5G3dJ7jqC88jDTzAbDGPf2UaM0a2FjW/2mrP2Z1BFQKGU6OFM+5s UhlD188X7vCTe/AUfa3pWGXPaRIyV6vFjxI/UzqOd6K23COm9xMtv8+TX IU+XPa1aa+UXgM5GerELNAx8Yvg5O+Pp9YYfoP0VXbbpclS8CBEIteP0D A==; IronPort-SDR: 5LybH5v6E+NwHHGBqiv92N79/e5pFvsDTeckIR1Cv2vtlWfPae87tGTyqXwumCoKh/jR4fhUue 6e+CJY1wjcMOjqpIvMOMNt9aHRN9O7zSWbYAm3pjLeKslVvNjp/gA4SwAOPUpmMcWWUZSfz0Tj jVjOnmdFY4R4WZsRpME3tBmFZS6FY1UDsX8AXTcIb7eKZa/lXOX1LM1TnDQRBV0vRWbA/6w2gQ Od4CWr3LcDaWLIFusDvU/YspzhL62/9FQflIs9Hujy//txjABX2Hc4EZBOJzLJtoMhnGNsxVkh UVs= X-IronPort-AV: E=Sophos;i="5.69,278,1571673600"; d="scan'208";a="125403690" Received: from mail-dm6nam11lp2172.outbound.protection.outlook.com (HELO NAM11-DM6-obe.outbound.protection.outlook.com) ([104.47.57.172]) by ob1.hgst.iphmx.com with ESMTP; 05 Dec 2019 05:10:18 +0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TzPj1pXw4WS9ECKN75ndRXz6dClvAmipPH2O1dDSZDPLREHkbTtbkd5UlnK7YJ/NBE4dfLpbyUjE135t0Rns0vysWxEvyKS9iuSl+XQITrPCprRKjsJJ43A/WpiHMsgdm4I6ICBMpb2kaKzjesOwDivie3/6Ygmw2MoybPnnduIMI9whSB8ARhToaiRAavuo6lXn8NRlb9DBN807tYJ5gZ9d6kV9XXvM+pFdTRT+mCq1LgvOCbvr3OFH9bnVEWkDK7Zu/+FOnCV8g6IO6mxBFcaT3irGIWn+ghWVxHzPhrds3FJ9U9ftchmX3udZJqLKCL6oEJqxk3yxoc/h0lh9Wg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=NBZzdoehiQFGGo2a8ac2oadyP2pwwn8fJ4bZ/yxhelU=; b=YmxYwMjc1IVoyBXCmG9w/PJiazRQBUkqZRXSCpmHNP36bMYq0M9x4b1G7HJvibAxJI2/ssJgayTRlmWax5idyk8sbUv64JR+DgtoypjAJsxJ0E1Brmp+u/kR1/vs20hrV/IiuiUyOBmv/8GC6UjgqT1c6hR2DpLlO0zzYQvvKXboToOf4jJ/LbfySBvo5V6jloN0QSbtoR/TwLDKwHX9JsWVF2p6Npbsdns9AAcG1aIAMZi1J+0kFCn/7EAnj0895K9W8qhyr1ciDJXqsjPEMup+Z4JbQO2pL4Ba5xkMo1iaAfHdXKIog92srolbL4NFlzCzRTVq/JUlHwDTEqt89Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=wdc.com; dmarc=pass action=none header.from=wdc.com; dkim=pass header.d=wdc.com; arc=none 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=NBZzdoehiQFGGo2a8ac2oadyP2pwwn8fJ4bZ/yxhelU=; b=hb3XitQNRnHPk8nQyZsaSOSQJ6KaV47epkIbWY59T4Zqpe6WtTMxFDcrGEv/JokEcK0s9aD7dUV6KjtfEOwnVOIzr/uwG1Noe1amA/Xv2H7F87iVUT39UQGE5nj6wLWSCP9t0scx53CvbrLdyL7og/bVxpoQtG/Jafd/w4n5rtU= Received: from BYAPR04MB3990.namprd04.prod.outlook.com (52.135.215.29) by BYAPR04MB5910.namprd04.prod.outlook.com (20.179.59.158) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2495.20; Wed, 4 Dec 2019 21:10:17 +0000 Received: from BYAPR04MB3990.namprd04.prod.outlook.com ([fe80::1d22:29b6:df03:86f7]) by BYAPR04MB3990.namprd04.prod.outlook.com ([fe80::1d22:29b6:df03:86f7%3]) with mapi id 15.20.2495.014; Wed, 4 Dec 2019 21:10:16 +0000 From: Atish Patra To: "anup@brainfault.org" CC: "linux-riscv@lists.infradead.org" , "han_mao@c-sky.com" , "rppt@linux.ibm.com" , "paul.walmsley@sifive.com" , "aou@eecs.berkeley.edu" , "palmer@dabbelt.com" , "tglx@linutronix.de" , "alexios.zavras@intel.com" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH v5 4/4] RISC-V: Implement new SBI v0.2 extensions Thread-Topic: [PATCH v5 4/4] RISC-V: Implement new SBI v0.2 extensions Thread-Index: AQHVpIx7/NA8MPSl1UucFdV7P1NXC6ehmBuAgAABxYCACOt5gA== Date: Wed, 4 Dec 2019 21:10:16 +0000 Message-ID: References: <20191126190503.19303-1-atish.patra@wdc.com> <20191126190503.19303-5-atish.patra@wdc.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Atish.Patra@wdc.com; x-originating-ip: [199.255.44.175] x-ms-publictraffictype: Email x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: 66ee4200-ceb6-4661-9859-08d778fe5cc7 x-ms-traffictypediagnostic: BYAPR04MB5910: x-microsoft-antispam-prvs: wdcipoutbound: EOP-TRUE x-ms-oob-tlc-oobclassifiers: OLM:972; x-forefront-prvs: 0241D5F98C x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(4636009)(376002)(39860400002)(396003)(366004)(346002)(136003)(199004)(189003)(99286004)(6246003)(6506007)(71200400001)(25786009)(2616005)(3846002)(186003)(86362001)(6436002)(53546011)(6512007)(36756003)(4326008)(5640700003)(71190400001)(76176011)(229853002)(6486002)(26005)(8936002)(2351001)(64756008)(102836004)(7416002)(1730700003)(6116002)(81156014)(11346002)(76116006)(30864003)(4001150100001)(81166006)(2906002)(6916009)(5660300002)(316002)(478600001)(305945005)(66446008)(66946007)(54906003)(2501003)(91956017)(7736002)(66556008)(14454004)(118296001)(8676002)(66476007);DIR:OUT;SFP:1102;SCL:1;SRVR:BYAPR04MB5910;H:BYAPR04MB3990.namprd04.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: exQzPBK8frmbOgiYlLjKB5OxdSVZrzUNexcX8OqqqiY/bavDwkiZA/Q6jjkFxnIscU3R1sXwa0zHV9qI+8H2mYEUJJMadMLkn25paukl55bemyYr1v2KlciMNUv6ryCwuEelD8COS2YsikxfDArXYFMHBDK296Y6y5WZWuZq5g7tmbhPCMi6CMATVlPDVnobZFp4OzaO3w84oRYEChP76cB/mv/Q7n3skVIGOVaowvaj/6/x7wYmdl2ZOu9PpEOKIQjV8gTRbakCezW3iz+a72u8YjP4IJvdhuBYH2lyaDWTS5b6SBycDoIKiidQ8sRxpRGvwl/dtXkmyBlJFNvT4KdSegpv+sfFeuVT3qdgovoAEJXoZCgy8bpPnQpdyHbVuIgivXrtXqzajQ5qDxNqBHGPix6EU8Au30IGsvjVaPXSfESX9rYfCWzUok2lk3WR x-ms-exchange-transport-forked: True Content-Type: text/plain; charset="utf-8" Content-ID: Content-Transfer-Encoding: base64 MIME-Version: 1.0 X-OriginatorOrg: wdc.com X-MS-Exchange-CrossTenant-Network-Message-Id: 66ee4200-ceb6-4661-9859-08d778fe5cc7 X-MS-Exchange-CrossTenant-originalarrivaltime: 04 Dec 2019 21:10:16.8286 (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: VTtb1nsmf+3uev+VVXHdqd4XDi0yD4/+iexchkTxgb3q2++2717q2d2Y2HDCqFHsQkfVlQdQmCTRzsTRQRdjqA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR04MB5910 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org T24gRnJpLCAyMDE5LTExLTI5IGF0IDEwOjI3ICswNTMwLCBBbnVwIFBhdGVsIHdyb3RlOg0KPiBP biBGcmksIE5vdiAyOSwgMjAxOSBhdCAxMDoyMSBBTSBBbnVwIFBhdGVsIDxhbnVwQGJyYWluZmF1 bHQub3JnPg0KPiB3cm90ZToNCj4gPiBIaSBBdGlzaCwNCj4gPiANCj4gPiBGb3VuZCBmZXcgYnVn cyB3aGlsZSBwbGF5aW5nIHdpdGggdGhpcyBwYXRjaC4NCj4gPiANCj4gPiBTZWUgYmVsb3cgLi4u Lg0KPiA+IA0KPiA+IE9uIFdlZCwgTm92IDI3LCAyMDE5IGF0IDEyOjM1IEFNIEF0aXNoIFBhdHJh IDxhdGlzaC5wYXRyYUB3ZGMuY29tPg0KPiA+IHdyb3RlOg0KPiA+ID4gRmV3IHYwLjEgU0JJI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CB1bnNpZ25lZCBsb25n ICpoYXJ0X21hc2ssDQo+ID4gPiArICAgICAgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBs b25nIHN0YXJ0LA0KPiA+ID4gKyAgICAgICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgbG9u ZyBzaXplKTsNCj4gPiA+ICtpbnQgc2JpX3JlbW90ZV9oZmVuY2VfZ3ZtYV92bWlkKGNvbnN0IHVu c2lnbmVkIGxvbmcgKmhhcnRfbWFzaywNCj4gPiA+ICsgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgdW5zaWduZWQgbG9uZyBzdGFydCwNCj4gPiA+ICsgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgdW5zaWduZWQgbG9uZyBzaXplLA0KPiA+ID4gKyAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICB1bnNpZ25lZCBsb25nIHZtaWQpOw0KPiA+ID4gK2ludCBzYmlfcmVtb3RlX2hm ZW5jZV92dm1hKGNvbnN0IHVuc2lnbmVkIGxvbmcgKmhhcnRfbWFzaywNCj4gPiA+ICsgICAgICAg ICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGxvbmcgc3RhcnQsDQo+ID4gPiArICAgICAgICAg ICAgICAgICAgICAgICAgICB1bnNpZ25lZCBsb25nIHNpemUpOw0KPiA+ID4gK2ludCBzYmlfcmVt b3RlX2hmZW5jZV92dm1hX2FzaWQoY29uc3QgdW5zaWduZWQgbG9uZyAqaGFydF9tYXNrLA0KPiA+ ID4gKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBsb25nIHN0YXJ0LA0K PiA+ID4gKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBsb25nIHNpemUs DQo+ID4gPiArICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGxvbmcgYXNp ZCk7DQo+ID4gPiAgaW50IHNiaV9wcm9iZV9leHRlbnNpb24obG9uZ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Qo+ID4gPiArICAgICAgICAgICAgICAgYnJlYWs7DQo+ID4gPiArICAgICAgIGNh c2UgU0JJX0VYVF9SRkVOQ0VfUkVNT1RFX0hGRU5DRV9HVk1BX1ZNSUQ6DQo+ID4gPiArICAgICAg ICAgICAgICAgcmV0ID0gc2JpX2VjYWxsKGV4dCwgZmlkLCBobWFza192YWwsIDAsIHN0YXJ0LA0K PiA+ID4gKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzaXplLCBhcmc0LCAwKTsNCj4g PiA+ICsgICAgICAgICAgICAgICBicmVhazsNCj4gPiA+ICsgICAgICAgY2FzZSBTQklfRVhUX1JG RU5DRV9SRU1PVEVfSEZFTkNFX1ZWTUE6DQo+ID4gPiArICAgICAgICAgICAgICAgcmV0ID0gc2Jp X2VjYWxsKGV4dCwgZmlkLCBobWFza192YWwsIDAsIHN0YXJ0LA0KPiA+ID4gKyAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICBzaXplLCAwLCAwKTsNCj4gPiA+ICsgICAgICAgICAgICAgICBi cmVhazsNCj4gPiA+ICsgICAgICAgY2FzZSBTQklfRVhUX1JGRU5DRV9SRU1PVEVfSEZFTkNFX1ZW TUFfQVNJRDoNCj4gPiA+ICsgICAgICAgICAgICAgICByZXQgPSBzYmlfZWNhbGwoZXh0LCBmaWQs IGhtYXNrX3ZhbCwgMCwgc3RhcnQsDQo+ID4gPiArICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgIHNpemUsIGFyZzQsIDApOw0KPiA+ID4gKyAgICAgICAgICAgICAgIGJyZWFrOw0KPiA+ID4g KyAgICAgICBkZWZhdWx0Og0KPiA+ID4gKyAgICAgICAgICAgICAgIHByX2VycigidW5rbm93biBm dW5jdGlvbiBJRCBbJWx1XSBmb3IgU0JJDQo+ID4gPiBleHRlbnNpb24gWyVsdV1cbiIsDQo+ID4g PiArICAgICAgICAgICAgICAgICAgICAgICBmaWQsIGV4dCk7DQo+ID4gPiArICAgICAgICAgICAg ICAgcm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pOw0KPiA+ID4gKyAgICAgICAgICAgICAgIGlmIChzYmlfcHJvYmVfZXh0ZW5z aW9uKFNCSV9FWFRfVElNRSkgPiAwKSB7DQo+ID4gPiArICAgICAgICAgICAgICAgICAgICAgICBf X3NiaV9zZXRfdGltZXIgPSBfX3NiaV9zZXRfdGltZXJfdjAyOw0KPiA+ID4gKyAgICAgICAgICAg ICAgICAgICAgICAgcHJfaW5mbygiU0JJIHYwLjIgVElNRSBleHRlbnNpb24NCj4gPiA+IGRldGVj dGVkXG4iKTsNCj4gPiA+ICsgICAgICAgICAgICAgICB9IGVsc2UNCj4gPiA+ICsgICAgICAgICAg ICAgICAgICAgICAgIF9fc2JpX3NldF90aW1lciA9DQo+ID4gPiBfX3NiaV9zZXRfdGltZXJfZHVt bXlfd2FybjsNCj4gPiBUaGlzIHNob3VsZCBiZToNCj4gPiANCj4gPiAjaWYgSVNfRU5BQkxFRChS SVNDVl9TQklfVjAxKQ0KPiA+ICAgICAgICAgICAgICAgICAgICAgICAgX19zYmlfcmZlbmNlICAg ID0gX19zYmlfc2V0X3RpbWVyX3YwMTsNCj4gPiAjZWxzZQ0KPiA+ICAgICAgICAgICAgICAgICAg ICAgICAgX19zYmlfcmZlbmNlICAgID0NCj4gPiBfX3NiaV9zZXRfdGltZXJfZHVtbXlfd2FybjsN Cj4gPiAjZW5kaWYNCj4gDQo+IEluc3RlYWQgb2YgdGhpcywganVzdCBkbyB0aGUgZm9sbG93aW5n Og0KPiAgICAgICAgICAgICAgICAgICAgICAgICBfX3NiaV9yZmVuY2UgICAgPSBfX3NiaV9zZXRf dGltZXJfdjAxOw0KPiANCj4gPiA+ICsgICAgICAgICAgICAgICBpZiAoc2JpX3Byb2JlX2V4dGVu c2lvbihTQklfRVhUX0lQSSkgPiAwKSB7DQo+ID4gPiArICAgICAgICAgICAgICAgICAgICAgICBf X3NiaV9zZW5kX2lwaSAgPSBfX3NiaV9zZW5kX2lwaV92MDI7DQo+ID4gPiArICAgICAgICAgICAg ICA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