Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2533350pxb; Mon, 18 Jan 2021 22:33:20 -0800 (PST) X-Google-Smtp-Source: ABdhPJxUwORgmU9v48e2e2+RZoIDP/pW6a8TrPJGuoGRs6y2IDltW5aQ/3xgQcVlr3lvO/Hc+5Ar X-Received: by 2002:a50:fb96:: with SMTP id e22mr2132465edq.118.1611038000075; Mon, 18 Jan 2021 22:33:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611038000; cv=none; d=google.com; s=arc-20160816; b=xHmZuKyP3WBsE1RNhpR+hF05jDobCMkke8pazZhP7KcvsxDitZP8ielOBZnYn7cLXa 5cG7Dygu0m/v/fqJL78WeJHAmyj5HRUElCW5Kv4b+uEG8EQM6CwAKZOhUEW/SQUYh1jT 11ZnqF+JF4q0DaxDE5ouAPYrMOyV1AT9JL38yqIDRGALOCxsjlvZejuBk17VVJhE0Ylh hdm82xPvJCdri9nvNZWbtw+DuWJiL6pMXb2ACGl8ILcDy7vylIOH9T1sRGXwKM1snb1J zdfMx0MQkf77iQ69VWEHBh6SE/KaDc8YMTacRLXXtLAmfw3h6DjedXpTjqhivkyzka/c FacQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from:dkim-signature; bh=ZEKQ1WAwKzbbYdatkwT70bwg6YBWiUDjW0MLlsn8Uuc=; b=Xxhg6jMj0rpXn9HhTfbqMToBwgqJPrOWTdL9vTUo1prQYiG7ZA3xfOokVOqp5T3a8s zjimxNzdmkCS1FiPRWRIj6W+osHG6LddrdOA8ebca36IoGg7fgeTxkjivMdEKmFqmIJz m2/TBNeZELtwt0wO9oN6QJGbXB55wD6HEKZA7mUbnBkqgAGURVXM4atGnmyqmoeTFSH6 WTpbijI1Qxv5txVzr51SVxBDAlWAdJJhAKJyOKRC0nHQ3dfFVxXCXBjfGJHeaIzWoBSB REF2f5LcY5Hk/FKh4Sz8j0KGJh0baiXiTtGlSyO2zOooMXCyyhQu6KJcovTKswYSjQ34 FDQQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=UxTR3H2n; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a11si7416956eje.119.2021.01.18.22.32.56; Mon, 18 Jan 2021 22:33:20 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=UxTR3H2n; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729976AbhASG3L (ORCPT + 99 others); Tue, 19 Jan 2021 01:29:11 -0500 Received: from mailgw02.mediatek.com ([1.203.163.81]:21176 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726122AbhASGUd (ORCPT ); Tue, 19 Jan 2021 01:20:33 -0500 X-UUID: a8d39a1e821b4ed68879dc6bccd930cf-20210119 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=MIME-Version:Content-Transfer-Encoding:Content-Type:In-Reply-To:References:Message-ID:Date:Subject:CC:To:From; bh=ZEKQ1WAwKzbbYdatkwT70bwg6YBWiUDjW0MLlsn8Uuc=; b=UxTR3H2n3EbTig9JgJpGpvSqFKKzoRgCzmKE34mXMpuRP8opG7tZTJGvpNsZmn0xNFzFvK1FhVQs0lagvMewwHNU82VpZ+USYaNRyaOJdjNK0TZGg2f+sFTJlcJv7R7qYT468tq6mF0EhYbnSXB6iFhOF0XgXw7z99Pr21RGzmo=; X-UUID: a8d39a1e821b4ed68879dc6bccd930cf-20210119 Received: from mtkcas35.mediatek.inc [(172.27.4.253)] by mailgw02.mediatek.com (envelope-from ) (mailgw01.mediatek.com ESMTP with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 956507277; Tue, 19 Jan 2021 14:18:59 +0800 Received: from MTKMBS31N1.mediatek.inc (172.27.4.69) by MTKMBS31N2.mediatek.inc (172.27.4.87) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 19 Jan 2021 14:18:57 +0800 Received: from MTKMBS31N1.mediatek.inc ([fe80::e1b3:15a3:610e:3f13]) by MTKMBS31N1.mediatek.inc ([fe80::e1b3:15a3:610e:3f13%23]) with mapi id 15.00.1497.000; Tue, 19 Jan 2021 14:18:57 +0800 From: =?utf-8?B?WWFxaWkgV3UgKOatpuS6muWlhyk=?= To: Ikjoon Jang , =?utf-8?B?Q2h1bmZlbmcgWXVuICjkupHmmKXls7Ap?= CC: =?utf-8?B?WmhhbnlvbmcgV2FuZyAo546L5oiY5YuHKQ==?= , "linux-usb@vger.kernel.org" , open list , =?utf-8?B?VGlhbnBpbmcgRmFuZyAo5pa55aSp5bmzKQ==?= , "moderated list:ARM/Mediatek SoC support" Subject: =?utf-8?B?562U5aSNOiBbUkZDIFBBVENIIHYzIDEvNV0gdXNiOiB4aGNpLW10azogaW1w?= =?utf-8?Q?rove_bandwidth_scheduling_with_multi-TT?= Thread-Topic: [RFC PATCH v3 1/5] usb: xhci-mtk: improve bandwidth scheduling with multi-TT Thread-Index: AQHW2EW0LI3uxv407kyMe1LV9lLZ66ok6nqAgAm1fsA= Date: Tue, 19 Jan 2021 06:18:57 +0000 Message-ID: <4c43a06844ac48eebbca6ec0141dcb5d@MTKMBS31N1.mediatek.inc> References: <1608629682-8535-1-git-send-email-chunfeng.yun@mediatek.com> In-Reply-To: Accept-Language: en-US Content-Language: zh-CN X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [172.27.4.253] x-tm-snts-smtp: 9B0878420FBC1150B190857DA2E5B52E519532C2F5037BEBB8B34BD773E374A32000:8 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org SEkgQ2h1bmZlbmcNCgnor7flm57lpI3osLfmrYzku6XkuIvkuInkuKrpl67popjvvJoNCglRdWVz dG9uOiBBcmUgdGhlcmUgYW55IHJlYXNvbnMgZm9yIGRvaW5nIHRoaXM/IGNhbiBvbmx5IG9uZSBz cGxpdCBwYWNrZXQgYmUgc2NoZWR1bGVkIGluIGEgdS1mcmFtZSBmb3IgaXNvY2hyb25vdXMgb3V0 PyBUaGlzIGxvb2tzIGxpa2Ugb3ZlcmtpbGwuDQoJQW5zd2VyOiBXZSB3aWxsIGNhbGN1bGF0ZSB0 aGUgbnVtYmVyIG9mIHVmcmFtZXMgYmFzZWQgb24gdGhlIGlzb2Mgb3V0IGVwIG1heHAuIEV4Y2Vw dCBmb3IgdGhlIGxhc3QgdWZyYW1lLCBhbGwgb3RoZXIgY29uc3VtZWQgYmFuZHdpZHRoIGlzIDE4 OC4gQnV0IHRvIGJlIHNhZmUsIHdlIGFsc28gY291bnQgdGhlIGJhbmR3aWR0aCAJY29uc3VtZWQg YnkgdGhlIGxhc3QgU1MgYXMgMTg4Lg0KDQoJUXVlc3Rvbjogc2FtZSBoZXJlLiBJdCB3b3VsZCBi ZSBtdWNoIGJldHRlciB0byB1bmRlcnN0YW5kIGlmIHlvdSBjYW4gcHJvdmlkZSBzb21lIGNvdW50 ZXJleGFtcGxlcyBvZiBzY2hlZHVsZSB0aGF0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gICAgICAgICAgICAgICAgICAgICAg aWYgKHRlc3RfYml0KG9mZnNldCArIGksIHR0LT5zc19iaXRfbWFwKSkNCj4gICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICByZXR1cm4gLUVSQU5HRTsNCj4NCj4gKyAgICAgICAgICAgICAg ICAgICAgICAgaWYgKHRlc3RfYml0KG9mZnNldCArIGksIHR0LT5jc19iaXRfbWFwKSkNCj4gKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gLUVSQU5HRTsNCj4gKyAgICAgICAg ICAgICAgIH0NCg0KQXJlIHRoZXJlIGFueSByZWFzb25zIGZvciBkb2luZyB0aGlzPw0KV2h5IGNh biBvbmx5IG9uZSBzcGxpdCBwYWNrZXQgYmUgc2NoZWR1bGVkIGluIGEgdS1mcmFtZSBmb3IgaXNv Y2hyb25vdXMgb3V0Pw0KVGhpcyBsb29rcyBsaWtlIG92ZXJraWxsLg0KDQo+ICAgICAgICAgfSBl bHNlIHsNCj4gICAgICAgICAgICAgICAgIHUzMiBjc19jb3VudCA9IERJVl9ST1VORF9VUChzY2hf ZXAtPm1heHBrdCwgDQo+IEZTX1BBWUxPQURfTUFYKTsNCj4NCj4gQEAgLTQyOCw4ICs0MzMsMTAg QEAgc3RhdGljIGludCBjaGVja19zY2hfdHQoc3RydWN0IHVzYl9kZXZpY2UgKnVkZXYsDQo+ICAg ICAgICAgICAgICAgICBpZiAoY3NfY291bnQgPiA3KQ0KPiAgICAgICAgICAgICAgICAgICAgICAg ICBjc19jb3VudCA9IDc7IC8qIEhXIGxpbWl0ICovDQo+DQo+IC0gICAgICAgICAgICAgICBmb3Ig KGkgPSAwOyBpIDwgY3NfY291bnQgKyAyOyBpKyspIHsNCj4gLSAgICAgICAgICAgICAgICAgICAg ICAgaWYgKHRlc3RfYml0KG9mZnNldCArIGksIHR0LT5zcGxpdF9iaXRfbWFwKSkNCj4gKyAgICAg ICAgICAgICAgIGlmICh0ZXN0X2JpdChvZmZzZXQsI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AgICAgICAgYmFzZSA9IHNjaF9lcC0+b2Zmc2V0 ICsgaSAqIHNjaF9lcC0+ZXNpdDsNCj4gLSAgICAgICAgICAgICAgIGZvciAoaiA9IDA7IGogPCBz Y2hfZXAtPm51bV9idWRnZXRfbWljcm9mcmFtZXM7IGorKykNCj4gLSAgICAgICAgICAgICAgICAg ICAgICAgc2V0X2JpdChiYXNlICsgaiwgdHQtPnNwbGl0X2JpdF9tYXApOw0KPiArICAgICAgICAg ICAgICAgZm9yIChqID0gMDsgaiA8IHNjaF9lcC0+bnVtX2J1ZGdldF9taWNyb2ZyYW1lczsgaisr KSB7DQo+ICsgICAgICAgICAgICAgICAgICAgICAgIGlmICh1c2VkKQ0KPiArICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgIHNldF9iaXQoYmFzZSArIGosIHR0LT5zcGxpdF9iaXRfbWFwKTsN Cj4gKyAgICAgICAgICAgICAgICAgICAgICAgZWxzZQ0KPiArICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgIGNsZWFyX2JpdChiYXNlICsgaiwgdHQtPnNwbGl0X2JpdF9tYXApOw0KPiArICAg ICAgICAgICAgICAgfQ0KPiArDQo+ICsgICAgICAgICAgICAgICBpZiAoc2NoX2VwLT5lcF90eXBl ID09IElTT0NfT1VUX0VQKSB7DQo+ICsgICAgICAgICAgICAgICAgICAgICAgIGZvciAoaiA9IDA7 IGogPCBzY2hfZXAtPm51bV9idWRnZXRfbWljcm9mcmFtZXM7IGorKykgew0KPiArICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgIGlmICh1c2VkKSB7DQo+ICsgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICBzZXRfYml0KGJhc2UgKyBqLCB0dC0+c3NfYml0X21hcCk7DQo+ ICsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzZXRfYml0KGJhc2UgKyBq LCB0dC0+Y3NfYml0X21hcCk7DQo+ICsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICB0dC0+ZnNfYnVzX2J3W2Jhc2UgKyBqXSArPQ0KPiArICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICBzY2hfZXAtPmJ3X2Nvc3RfcGVyX21pY3JvZnJhbWU7 DQo+ICsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHsNCj4gKyAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNsZWFyX2JpdChiYXNlICsgaiwgdHQtPnNz X2JpdF9tYXApOw0KPiArICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2xl YXJfYml0KGJhc2UgKyBqLCB0dC0+Y3NfYml0X21hcCk7DQo+ICsgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICB0dC0+ZnNfYnVzX2J3W2Jhc2UgKyBqXSAtPQ0KPiArICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzY2hfZXAtPmJ3X2Nvc3Rf cGVyX21pY3JvZnJhbWU7DQo+ICsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQ0KPiAr ICAgICAgICAgICAgICAgICAgICAgICB9DQo+ICsgICAgICAgICAgICAgICB9IGVsc2Ugew0KPiAr ICAgICAgICAgICAgICAgICAgICAgICBpZiAodXNlZCkNCj4gKyAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICBzZXRfYml0KGJhc2UsIHR0LT5zc19iaXRfbWFwKTsNCj4gKyAgICAgICAgICAg ICAgICAgICAgICAgZWxzZQ0KPiArICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNsZWFy X2JpdChiYXNlLCB0dC0+c3NfYml0X21hcCk7DQo+ICsNCj4gKyAgICAgICAgICAgICAgICAgICAg ICAgZm9yIChqID0gMDsgaiA8IHNjaF9lcC0+Y3NfY291bnQ7IGorKykgew0KPiArICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgIGlmICh1c2VkKSB7DQo+ICsgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICBzZXRfYml0KGJhc2UgKyAyICsgaiwgDQo+ICsgdHQtPmNzX2Jp dF9tYXApOw0KPiArDQo+ICsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0 dC0+ZnNfYnVzX2J3W2Jhc2UgKyAyICsgal0gKz0NCj4gKyAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgc2NoX2VwLT5id19jb3N0X3Blcl9taWNyb2ZyYW1lOw0K PiArICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7DQo+ICsgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjbGVhcl9iaXQoYmFzZSArIDIgKyBqLCB0dC0+ Y3NfYml0X21hcCk7DQo+ICsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0 dC0+ZnNfYnVzX2J3W2Jhc2UgKyAyICsgal0gLT0NCj4gKyAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgc2NoX2VwLT5id19jb3N0X3Blcl9taWNyb2ZyYW1lOw0K PiArICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0NCj4gKyAgICAgICAgICAgICAgICAg ICAgICAgfQ0KPiArICAgICAgICAgICAgICAgfQ0KPiAgICAgICAgIH0NCj4NCj4gLSAgICAgICBs aXN0X2FkZF90YWlsKCZzY2hfZXAtPnR0X2VuZHBvaW50LCAmdHQtPmVwX2xpc3QpOw0KPiArICAg ICAgIGlmICh1c2VkKQ0KPiArICAgICAgICAgICAgICAgbGlzdF9hZGRfdGFpbCgmc2NoX2VwLT50 dF9lbmRwb2ludCwgJnR0LT5lcF9saXN0KTsNCj4gKyAgICAgICBlbHNlDQo+ICsgICAgICAgICAg ICAgICBsaXN0X2RlbCgmc2NoX2VwLT50dF9lbmRwb2ludCk7DQo+IC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G9mZnNldCk7DQo+ICAgICAgICAgICAgICAgICAgICAgICAgIGlm IChyZXQpDQo+ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29udGludWU7IEBAIC00 OTgsNyArNTYxLDcgQEAgc3RhdGljIA0KPiBpbnQgY2hlY2tfc2NoX2J3KHN0cnVjdCB1c2JfZGV2 aWNlICp1ZGV2LA0KPiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHR0X29mZnNldF9v ayA9IHRydWU7DQo+ICAgICAgICAgICAgICAgICB9DQo+DQo+IC0gICAgICAgICAgICAgICBpZiAo KG9mZnNldCArIHNjaF9lcC0+bnVtX2J1ZGdldF9taWNyb2ZyYW1lcykgPiBzY2hfZXAtPmVzaXQp DQo+ICsgICAgICAgICAgICAgICBpZiAoKG9mZnNldCArIHNjaF9lcC0+bnVtX2J1ZGdldF9taWNy b2ZyYW1lcykgPiANCj4gKyBib3VuZGFyeSkNCj4gICAgICAgICAgICAgICAgICAgICAgICAgYnJl YWs7DQo+DQo+ICAgICAgICAgICAgICAgICB3b3JzdF9idyA9IGdldF9tYXhfYncoc2NoX2J3LCBz Y2hfZXAsIG9mZnNldCk7IEBAIA0KPiAtNTMyLDcgKzU5NSw3IEBAIHN0YXRpYyBpbnQgY2hlY2tf c2NoX2J3KHN0cnVjdCB1c2JfZGV2aWNlICp1ZGV2LA0KPiAgICAgICAgICAgICAgICAgaWYgKCF0 dF9vZmZzZXRfb2spDQo+ICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAtRVJBTkdFOw0K Pg0KPiAtICAgICAgICAgICAgICAgdXBkYXRlX3NjaF90dCh1ZGV2LCBzY2hfZXApOw0KPiArICAg ICAgICAgICAgICAgdXBkYXRlX3NjaF90dCh1ZGV2LCBzY2hfZXAsIDEpOw0KPiAgICAgICAgIH0N Cj4NCj4gICAgICAgICAvKiB1cGRhdGUgYnVzIGJhbmR3aWR0aCBpbmZvICovIEBAIC02OTYsMTIg Kzc1OSwxMiBAQCB2b2lkIA0KPiB4aGNpX210a19kcm9wX2VwX3F1aXJrKHN0cnVjdCB1c2JfaGNk ICpoY2QsIHN0cnVjdCB1c2JfZGV2aWNlICp1ZGV2LA0KPg0KPiAgICAgICAgIGxpc3RfZm9yX2Vh Y2hfZW50cnkoc2NoX2VwLCAmc2NoX2J3LT5id19lcF9saXN0LCBlbmRwb2ludCkgew0KPiAgICAg ICAgICAgICAgICAgaWYgKHNjaF9lcC0+ZXAgPT0gZXApIHsNCj4gLSAgICAgICAgICAgICAgICAg ICAgICAgdXBkYXRlX2J1c19idyhzY2hfYncsIHNjaF9lcCwgMCk7DQo+IC0gICAgICAgICAgICAg ICAgICAgICAgIGxpc3RfZGVsKCZzY2hfZXAtPmVuZHBvaW50KTsNCj4gICAgICAgICAgICAgICAg ICAgICAgICAgaWYgKGlzX2ZzX29yX2xzKHVkZXYtPnNwZWVkKSkgew0KPiAtICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgIGxpc3RfZGVsKCZzY2hfZXAtPnR0X2VuZHBvaW50KTsNCj4gKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1cGRhdGVfc2NoX3R0KHVkZXYsIHNjaF9lcCwg MCk7DQo+ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZHJvcF90dCh1ZGV2KTsNCj4g ICAgICAgICAgICAgICAgICAgICAgICAgfQ0KPiArICAgICAgICAgICAgICAgICAgICAgICB1cGRh dGVfYnVzX2J3KHNjaF9idywgc2NoX2VwLCAwKTsNCj4gKyAgICAgICAgICAgICAgICAgICAgICAg bGlzdF9kZWwoJnNjaF9lcC0+ZW5kcG9pbnQpOw0KPiAgICAgICAgICAgICAgICAgICAgICAgICBr ZnJlZShzY2hfZXApOw0KPiAgICAgICAgICAgICAgICAgICAgICAgICBicmVhazsNCj4gICAgICAg ICAgICAgICAgIH0NCj4gZGlmZiAtLWdpdCBhL2RyaXZlcnMvdXNiL2hvc3QveGhjaS1tdGsuaCBi L2RyaXZlcnMv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