Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A1D59C4332F for ; Mon, 6 Dec 2021 05:27:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236871AbhLFFbS (ORCPT ); Mon, 6 Dec 2021 00:31:18 -0500 Received: from mail-eopbgr1300103.outbound.protection.outlook.com ([40.107.130.103]:28105 "EHLO APC01-HK2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S229448AbhLFFbR (ORCPT ); Mon, 6 Dec 2021 00:31:17 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fK3PaCTOqhmOJUoA1xfYl4/78UcXOzHdew0+rJvtqueJt3SJJLBFa23/+TPUzo9+SZyiucPJNgZceSahckD0BlGgF/koUiPfp4G+3Be5Qw/C/zvQvqRVT2VXa0zR9EmKQ9sEuqZMj8VuOT8u/SteTdkCE78Uu7fwVCfHu5gN2VDk2Gp8/OP76e33LLDHkPmdbMeuDXrSEnv4JqeERlfPMbokHuopniQ5qhp9gXkHQxvTr0oCPQS/BypY53qhuMyAhcpEvG5B7QchykrAheFkqR62mQAyQDT7RsHnso8vjzEanaatvY0S4tzAJZYim8U/AHnVWycuftSyx6kcNGying== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=BcR89AI0It8qsYGiFbGIKqCsrMa7lmACFbXFp+yjVIY=; b=aM8D2nuf0GpGYFcEqWkjGY/v2HpbO05cQDe+fmpp4l9Oqq8m27fPjxgP60hLo9d8aIhO4quo9oT7ZkhGyeKQ8hxGZ3YWpvhqCONEog5ZailBVP+D4EOSsoy2mG2X+KmoNDISbFAVMBhuWVSAMvrL7dhDx7qdBfDsVpJyoD4bejCxM9ipH2TJ4W+4NEGwZ6+95f+9Wboz9YscGXjLqHg0urmGWasLyMGsmp8am63hUg+OmhvChVhP4RmvEe3qs9axUHh0F3Gg1HJo4tbqOx9nUlWQ8HgYQFOMmkKrgma1539W6N8qHc1/2ux9soxju7Z3k6Ih/ugKdh6Hxj9TOubG8w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=aspeedtech.com; dmarc=pass action=none header.from=aspeedtech.com; dkim=pass header.d=aspeedtech.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aspeedtech.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=BcR89AI0It8qsYGiFbGIKqCsrMa7lmACFbXFp+yjVIY=; b=Q9MTJbVnFIbnqB2n0HCtH0rbwD2ReM7JVjge1Y4n8q/Cy2L6G1kn9eS2+zH6LXmXWMwNqE1vjKu3sFYr92ukBiPILaAwpZwLtCxrWodamVlW4m6mPu579CKM6roIb0ubNmHXxPPxPmTo2X72ajjErIr/8pR8mKFIXVjTuPUIbTipIh0HXbKC81nAJmluT2ogODYKzrAysNYUWSaH3sRcgUI4sUNHReBVYpEmPIomPzNajLdTdgiHdno/EdSF8LgLMYiiUbz1y5TwOfFrIr5fua+WQKTo6uWN+9b1HDPmzXs9JhEjVisFbvGG7cEoiJGq7DhTk6WBT45/I1Fu1QhKLA== Received: from HK0PR06MB3362.apcprd06.prod.outlook.com (2603:1096:203:8b::10) by HK0PR06MB2131.apcprd06.prod.outlook.com (2603:1096:203:4d::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4755.11; Mon, 6 Dec 2021 05:27:44 +0000 Received: from HK0PR06MB3362.apcprd06.prod.outlook.com ([fe80::7941:2fad:3c82:52eb]) by HK0PR06MB3362.apcprd06.prod.outlook.com ([fe80::7941:2fad:3c82:52eb%3]) with mapi id 15.20.4755.021; Mon, 6 Dec 2021 05:27:44 +0000 From: Billy Tsai To: Iwona Winiarska , "linux-kernel@vger.kernel.org" , "openbmc@lists.ozlabs.org" , Greg Kroah-Hartman CC: "linux-aspeed@lists.ozlabs.org" , "linux-doc@vger.kernel.org" , Dave Hansen , Zev Weiss , Jae Hyun Yoo , Jonathan Corbet , Pierre-Louis Bossart , Guenter Roeck , "devicetree@vger.kernel.org" , Jean Delvare , Arnd Bergmann , Rob Herring , Borislav Petkov , Dan Williams , Andy Shevchenko , "linux-arm-kernel@lists.infradead.org" , "linux-hwmon@vger.kernel.org" , Tony Luck , Andrew Jeffery , Randy Dunlap , Olof Johansson Subject: Re: [PATCH v4 05/13] peci: Add peci-aspeed controller driver Thread-Topic: [PATCH v4 05/13] peci: Add peci-aspeed controller driver Thread-Index: AQHX4HQCKrBLVejdoE+1iQYtwHjqf6wliS8A Date: Mon, 6 Dec 2021 05:27:43 +0000 Message-ID: <71D27F36-8BB7-4C30-99C5-CCA4F9A30945@aspeedtech.com> References: <20211123140706.2945700-1-iwona.winiarska@intel.com> <20211123140706.2945700-6-iwona.winiarska@intel.com> In-Reply-To: <20211123140706.2945700-6-iwona.winiarska@intel.com> Accept-Language: zh-TW, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=aspeedtech.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 28b7858c-52d8-438c-6fff-08d9b8792171 x-ms-traffictypediagnostic: HK0PR06MB2131: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:7691; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: UxUIND2oJkfuuyh43fakt1Yy44jNrU1Q1lX36UBcvgvZpE1dGr5vuW4a/B0guk6Hmah9aLnD0NpOCi9qFRTH7eIJchsaflDhUhzCPDLgEipbT0N+xaCKDZ+GecCqjo+XrsigRAe4b8FuGoBRitXAWcaglNzTChM2xaAWl8e29vJpoiFnBhGkcgTLcxUElDN8eSEksbv0vsqGt28Z45LhOKNq+gBalR9MW161J1sz0SW0hflZl1gfGIIIHg6/DoOSxiZiovXZrbQMKl3WXsqxuWNkZrwaXsXupoHzJKqyFmzgvrbm0PZGtj/KhpTC7iKVB1X2dNfEyJ1N677Gd+gQSZych6E+Y6umon0l7J9FogisBPeUfRGCM/NG4duIp5bu5eSqqzROY2UUs5cI14NMLBM9CvwSu8hU3NDjhNaGuScrDpfJeeImjvwtyAZTnF5KEGM4kFY1VkJV+IIT+vuzCL91rRvHbWpgoKq6I2sMD/3FwWEQpyXyZGS2ORnaCI5p+LovyAkKOiuuX0lzKoPFggmRJDAnbR9R4F+BV0520FaKst0vD7NRrHHCHPr7IxdZ4ljdBmHYbNw5E+rpC1u94bAn1b1dbO2HaW5p0EzuMSchNEuZm3yCaWYopOVNsH5Js35c8leEqi9Iqb1l//AFaF03gCO11XTgJSI/HeCzpuqhCjRbBNRbK+NQic0VfGNBP9zoOO7Cm/SybFMREaHkoBwxWIGcu6soVWN71g4jszI1bdIKKcTbldAHfnZGoEUC x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:HK0PR06MB3362.apcprd06.prod.outlook.com;PTR:;CAT:NONE;SFS:(376002)(136003)(346002)(39840400004)(396003)(366004)(66476007)(2906002)(122000001)(66556008)(76116006)(33656002)(54906003)(86362001)(83380400001)(66446008)(30864003)(6512007)(110136005)(66946007)(64756008)(316002)(8936002)(36756003)(7416002)(4326008)(8676002)(26005)(6486002)(38070700005)(38100700002)(71200400001)(2616005)(508600001)(53546011)(6506007)(5660300002)(186003)(45980500001);DIR:OUT;SFP:1102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RXQlIwZ0I1WC9UQTdTOU56?= =?utf-8?B?azRrR0hDcnVyaEJvR0xXWGwwdnFzRlNlZTZFRXFTbFpuLzh4RXUzeWRERjNR?= =?utf-8?B?WUJuYUlBbE1VTXNieTVpN2g5My8vMmdKZ3BZcHNCK3Jpa2t1SWFVU01ieUpP?= =?utf-8?B?SWFtNDNqR2UvNi9kYzBvR3d0M0hUOUxUMnZTVFhtK0tWVlp2MSt1Tkg4UUpI?= =?utf-8?B?a2F2anVhK25kdmVad1Z2dWFYbUtLSjJ1N0V4dTNPYTBiN0V1U0R4d3BzdkVp?= =?utf-8?B?TVJlSmhJbVBpVFd5MXhRZkNENFUyMWUvMm96c05WK0E2ZktxMGorUXcxOTBL?= =?utf-8?B?WnN5TG5kTzNqRGNJa3plRUZvOE12eExxZ3FDTEZYVHdQY1JJM0VOdHBFaHFh?= =?utf-8?B?SGZ3bGlwOU5CdmpzK2hNMkR4M3d2aGcyTXo2dmpTcjBKeEdQbTR2WWlmZ1Zp?= =?utf-8?B?b3VmSDlJQlI5S2FqcVJhenc3SG92a2dYb3lYSXB4NDNTTEdxNGVxNXlrd253?= =?utf-8?Q?JkMGYCS+ggYzmU4l3098j9nF3sPQvlkoD5K01hBcbg=3D?= Content-Type: text/plain; charset="utf-8" Content-ID: <8B4465647D56A94D95CFDE63A9974F3A@apcprd06.prod.outlook.com> Content-Transfer-Encoding: base64 MIME-Version: 1.0 X-OriginatorOrg: aspeedtech.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: HK0PR06MB3362.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 28b7858c-52d8-438c-6fff-08d9b8792171 X-MS-Exchange-CrossTenant-originalarrivaltime: 06 Dec 2021 05:27:43.9202 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 43d4aa98-e35b-4575-8939-080e90d5a249 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: P9AyKL+x7asX3CIWmu1udcE2EnaX5MryMtjh31ns3azWyCEfBM1aTRNHF0KJUAC5hRBHclsfGn+fBC2Cp0S+NrlQKW9l/GnNBLQZ98itta4= X-MS-Exchange-Transport-CrossTenantHeadersStamped: HK0PR06MB2131 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org SGksDQoNCkFmdGVyIHJldmlld2luZyB0aGUgcGF0Y2gsIEkgaGF2ZSBzb21lIHN1Z2dlc3Rpb25z IGZvciB5b3UuIFBsZWFzZSBzZWUgdGhlIHJlcGx5IGlubGluZS4NCg0KT24gMjAyMS8xMS8yMywg MTA6MTEgUE0sICJvcGVuYm1jIG9uIGJlaGFsZiBvZiBJd29uYSBXaW5pYXJza2EiIDxvcGVuYm1j LWJvdW5jZXMrYmlsbHlfdHNhaT1hc3BlZWR0ZWNoLmNvbUBsaXN0cy5vemxhYnMub3JnIG9uIGJl aGFsZiBvZiBpd29uYS53aW5pYXJza2FAaW50ZWwuY29tPiB3cm90ZToNCg0KICAgID4gICBGcm9t OiBKYWUgSHl1biBZb28gPGphZS5oeXVuLnlvb0BsaW51eC5pbnRlbC5jb20+DQpBZGQgdGhlIGRl ZmluZSBmb3IgdGhlIGJ1cyBmcmVxdWVuY3kNCiAgICAgICAgI2RlZmluZSBBU1BFRURfUEVDSV9C VVNfRlJFUVVFTkNZX01JTgkJMjAwMA0KICAgICAgICAjZGVmaW5lIEFTUEVFRF9QRUNJX0JVU19G UkVRVUVOQ1lfREVGQVVMVAkyMDAwDQogICAgICAgICNkZWZpbmUgQVNQRUVEX1BFQ0lfQlVTX0ZS RVFVRU5DWV9NQVgJCTEwMDAwMDANCg0KICAgPiAgICtzdHJ1Y3QgYXNwZWVkX3BlY2kgew0KICAg ID4gICArCXN0cnVjdCBwZWNpX2NvbnRyb2xsZXIgKmNvbnRyb2xsZXI7DQogICAgPiAgICsJc3Ry dWN0IGRldmljZSAqZGV2Ow0KICAgID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DQogICAgPiAg ICsJICogVGltaW5nIG5lZ290aWF0aW9uIHBlcmlvZCBzZXR0aW5nLg0KICAgID4gICArCSAqIFRo ZSB1bml0IG9mIHRoZSBwcm9ncmFtbWVkIHZhbHVlIGlzIDQgdGltZXMgb2YgUEVDSSBjbG9jayBw ZXJpb2QuDQogICAgPiAgICsJICovDQogICAgPiAgICsJdmFsID0gRklFTERfUFJFUChBU1BFRURf UEVDSV9UX05FR09fTVNHX01BU0ssIHByaXYtPm1zZ190aW1pbmcpOw0KICAgID4gICArCXZhbCB8 PSBGSUVMRF9QUkVQKEFTUEVFRF9QRUNJX1RfTkVHT19BRERSX01BU0ssIHByaXYtPmFkZHJfdGlt aW5nKTsNCiAgICA+ICAgKwl3cml0ZWwodmFsLCBwcml2LT5iYXNlICsgQVNQRUVEX1BFQ0lfVElN SU5HX05FR09USUFUSU9OKTsNCiAgICA+ICAgKw0KICAgID4gICArCS8qIENsZWFyIGludGVycnVw dHMgKi8NCiAgICA+ICAgKwl2YWwgPSByZWFkbChwcml2LT5iYXNlICsgQVNQRUVEX1BFQ0lfSU5U X1NUUykgfCBBU1BFRURfUEVDSV9JTlRfTUFTSzsNCiAgICA+ICAgKwl3cml0ZWwodmFsLCBwcml2 LT5iYXNlICsgQVNQRUVEX1BFQ0lfSU5UX1NUUyk7DQogICAgPiAgICsNCiAgICA+ICAgKwkvKiBT ZXQgdGltaW5nIG5lZ290aWF0aW9uIG1vZGUgYW5kIGVuYWJsZSBpbnRlcnJ1cHRzICovDQogICAg PiAgICsJdmFsID0gRklFTERfUFJFUChBU1BFRURfUEVDSV9USU1JTkdfTkVHT19TRUxfTUFTSywg QVNQRUVEX1BFQ0lfMVNUX0JJVF9PRl9BRERSX05FR08pOw0KICAgID4gICArCXZhbCB8PSBBU1BF RURfUEVDSV9JTlRfTUFTSzsNCiAgICA+ICAgKwl3cml0ZWwodmFsLCBwcml2LT5iYXNlICsgQVNQ RUVEX1BFQ0lfSU5UX0NUUkwpOw0KICAgID4g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9kZS1hc3NlcnQgdGhlIHJl c2V0IGZvciBzb2x2aW5nIHRoZSBoYW5nIGlzc3VlLg0KRm9yIGJhY2t3YXJkIGNvbXBhdGlibGUs IEkgc3VnZ2VzdCB0byBhZGQgdGhlIHJlc2V0IGFzc2VydC9kZS1hc3NlcnQgaW4gdGhpcyBwbGFj ZS4NCiAgICAgICAgaWYgKEZJRUxEX0dFVChBU1BFRURfUEVDSV9DTURfU1RTX01BU0ssIGNtZF9z dHMpKSB7DQogICAgICAgICAgICAgICAgICAgICAgICByZXNldF9jb250cm9sX2Fzc2VydChwcml2 LT5yc3QpOw0KICAgICAgICAgICAgICAgICAgICAgICAgcmVzZXRfY29udHJvbF9kZWFzc2VydChw cml2LT5yc3QpOw0KICAgICAgICAgICAgICAgICAgICAgICAgYXNwZWVkX3BlY2lfaW5pdF9yZWdz KHByaXYpOw0KICAgICAgICB9DQoNCiAgICA+ICAgKwlyZXR1cm4gcmVhZGxfcG9sbF90aW1lb3V0 KHByaXYtPmJhc2UgKyBBU1BFRURfUEVDSV9DTUQsDQogICAgPiAgICsJCQkJICBjbWRfc3RzLA0K ICAgID4gICArCQkJCSAgIShjbWRfc3RzICYgQVNQRUVEX1BFQ0lfQ01EX0lETEVfTUFTSyksDQog ICAgPiAgICsJCQkJICBBU1BFRURfUEVDSV9JRExFX0NIRUNLX0lOVEVSVkFMX1VTLA0KICAgID4g ICArCQkJCSAgQVNQRUVEX1BFQ0lfSURMRV9DSEVDS19USU1FT1VUX1VTKTsNCiAgICA+ICAgK30N CiAgICA+ICAgKw0KICAgID4gICArc3RhdGljIGludCBhc3BlZWRfcGVjaV94ZmVyKHN0cnVjdCBw ZWNpX2NvbnRyb2xsZXIgKmNvbnRyb2xsZXIsDQogICAgPiAgICsJCQkgICAgdTggYWRkciwgc3Ry dWN0IHBlY2lfcmVxdWVzdCAqcmVxKQ0KICAgID4gICArew0KICAgID4gICArCXN0cnVjdCBhc3Bl ZWRfcGVjaSAqcHJpdiA9IGRldl9nZXRfZHJ2ZGF0YShjb250cm9sbGVyLT5kZXYucGFyZW50KTsN CiAgICA+ICAgKwl1bnNpZ25lZCBsb25nIHRpbWVvdXQgPSBtc2Vjc190b19qaWZmaWVzKHByaXYt PmNtZF90aW1lb3V0X21zKTsNCiAgICA+ICAgKwl1MzIgcGVjaV9oZWFkOw0KICAgID4gICArCWlu dCByZXQ7DQogICAgPiAgICsNCiAgICA+ICAgKwlpZiAocmVxLT50eC5sZW4gPiBBU1BFRURfUEVD SV9EQVRBX0JVRl9TSVpFX01BWCB8fA0KICAgID4gICArCSAgICByZXEtPnJ4LmxlbiA+IEFTUEVF RF9QRUNJX0RBVEFfQlVGX1NJWkVfTUFYKQ0KICAgID4gICArCQlyZXR1cm4gLUVJTlZBTDsNCiAg ICA+ICAgKw0KICAgID4gICArCS8qIENoZWNrIGNvbW1hbmQgc3RzIGFuZCBidXMgaWRsZSBzdGF0 ZSAqLw0KICAgID4gICArCXJldCA9IGFzcGVlZF9wZWNpX2NoZWNrX2lkbGUocHJpdik7DQogICAg PiAgICsJaWYgKHJldCkNCiAgICA+ICAgKwkJcmV0dXJuIHJldDsgLyogLUVUSU1FRE9VVCAqLw0K ICAgID4gICArDQogICAgPiAgICsJc3Bpbl9sb2NrX2lycSgmcHJpdi0+bG9jayk7DQogICAgPiAg ICsJcmVpbml0X2NvbXBsZXRpb24oJnByaXYtPnhmZXJfY29tcGxldGUpOw0KICAgID4gICArDQog ICAgPiAgICsJcGVjaV9oZWFkID0gRklFTERfUFJFUChBU1BFRURfUEVDSV9UQVJHRVRfQUREUl9N QVNLLCBhZGRyKSB8DQogICAgPiAgICsJCSAgICBGSUVMRF9QUkVQKEFTUEVFRF9QRUNJX1dSX0xF Tl9NQVNLLCByZXEtPnR4LmxlbikgfA0KICAgID4gICArCQkgICAgRklFTERfUFJFUChBU1BFRURf UEVDSV9SRF9MRU5fTUFTSywgcmVxLT5yeC5sZW4pOw0KICAgID4gICArDQogICAgPiAgICsJd3Jp dGVsKHBlY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hleF9kdW1wX2J5dGVzKCJSWCA6ICIsIERVTVBfUFJFRklYX05PTkUsIHJl cS0+cnguYnVmLCByZXEtPnJ4Lmxlbik7DQogICAgPiAgICsjZW5kaWYNCiAgICA+ICAgKwlyZXR1 cm4gMDsNCiAgICA+ICAgK30NCiAgICA+ICAgKw0KICAgID4gICArc3RhdGljIGlycXJldHVybl90 IGFzcGVlZF9wZWNpX2lycV9oYW5kbGVyKGludCBpcnEsIHZvaWQgKmFyZykNCiAgICA+ICAgK3sN CiAgICA+ICAgKwlzdHJ1Y3QgYXNwZWVkX3BlY2kgKnByaXYgPSBhcmc7DQogICAgPiAgICsJdTMy IHN0YXR1czsNCiAgICA+ICAgKw0KICAgID4gICArCXNwaW5fbG9jaygmcHJpdi0+bG9jayk7DQog ICAgPiAgICsJc3RhdHVzID0gcmVhZGwocHJpdi0+YmFzZSArIEFTUEVFRF9QRUNJX0lOVF9TVFMp Ow0KICAgID4gICArCXdyaXRlbChzdGF0dXMsIHByaXYtPmJhc2UgKyBBU1BFRURfUEVDSV9JTlRf U1RTKTsNCiAgICA+ICAgKwlwcml2LT5zdGF0dXMgfD0gKHN0YXR1cyAmIEFTUEVFRF9QRUNJX0lO VF9NQVNLKTsNCiAgICA+ICAgKw0KICAgID4gICArCS8qDQogICAgPiAgICsJICogQWxsIGNvbW1h bmRzIHNob3VsZCBiZSBlbmRlZCB1cCB3aXRoIGEgQVNQRUVEX1BFQ0lfSU5UX0NNRF9ET05FIGJp dA0KICAgID4gICArCSAqIHNldCBldmVuIGluIGFuIGVycm9yIGNhc2UuDQogICAgPiAgICsJICov DQogICAgPiAgICsJaWYgKHN0YXR1cyAmIEFTUEVFRF9QRUNJX0lOVF9DTURfRE9ORSkNCiAgICA+ ICAgKwkJY29tcGxldGUoJnByaXYtPnhmZXJfY29tcGxldGUpOw0KICAgID4gICArDQogICAgPiAg ICsJd3JpdGVsKDAsIHByaXYtPmJhc2UgKyBBU1BFRURfUEVDSV9DTUQpOw0KICAgID4gICArDQog ICAgPiAgICsJc3Bpbl91bmxvY2soJnByaXYtPmxvY2spOw0KICAgID4gICArDQogICAgPiAgICsJ cmV0dXJuIElSUV9IQU5ETEVEOw0KICAgID4gICArfQ0KICAgID4gICArDQogICAgPiAgICtzdGF0 aWMgdm9pZCBhc3BlZWRfcGVjaV9wcm9wZXJ0eV9zYW5pdGl6ZShzdHJ1Y3QgZGV2aWNlICpkZXYs IGNvbnN0IGNoYXIgKnByb3BuYW1lLA0KICAgID4gICArCQkJCQkgIHUzMiBtaW4sIHUzMiBtYXgs IHUzMiBkZWZhdWx0X3ZhbCwgdTMyICpwcm9wdmFsKQ0KICAgID4gICArew0KICAgID4gICArCXUz MiB2YWw7DQogICAgPiAgICsJaW50IHJldDsNCiAgICA+ICAgKw0KICAgID4gICArCXJldCA9IGRl dmljZV9wcm9wZXJ0eV9yZWFkX3UzMihkZXYsIHByb3BuYW1lLCAmdmFsKTsNCiAgICA+ICAgKwlp ZiAocmV0KSB7DQogICAgPiAgICsJCXZhbCA9IGRlZmF1bHRfdmFsOw0KICAgID4gICArCX0gZWxz ZSBpZiAodmFsID4gbWF4IHx8IHZhbCA8IG1pbikgew0KICAgID4gICArCQlkZXZfd2FybihkZXYs ICJJbnZhbGlkICVzOiAldSwgZmFsbGluZyBiYWNrIHRvOiAldVxuIiwNCiAgICA+ICAgKwkJCSBw cm9wbmFtZSwgdmFsLCBkZWZhdWx0X3ZhbCk7DQogICAgPiAgICsNCiAgICA+ICAgKwkJdmFsID0g ZGVmYXVsdF92YWw7DQogICAgPiAgICsJfQ0KICAgID4gICArDQogICAgPiAgICsJKnByb3B2YWwg PSB2YWw7DQogICAgPiAgICt9DQogICAgPiAgICsNCiAgICA+ICAgK3N0YXRpYyB2b2lkIGFzcGVl ZF9wZWNpX3Byb3BlcnR5X3NldHVwKHN0cnVjdCBhc3BlZWRfcGVjaSAqcHJpdikNCiAgICA+ICAg K3sNCiAgICA+ICAgKwlhc3BlZWRfcGVjaV9wcm9wZXJ0e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GNsa19nZXRfcmF0ZShwcml2LT5jbGspOw0KDQogICAgICAgICAg ICAgICAgLyoNCiAgICAgICAgICAgICAgICAgKiBQRUNJIGJ1cyBmcmVxICA9IChzb3VyY2UgY2xr IHJhdGUpIC8gKDQgKiAoUEVDSTA0WzE1OjhdKjQrMSkgKiAoMSA8PCBQRUNJMDBbMTA6OF0pKQ0K ICAgICAgICAgICAgICAgICAqICgxIDw8IFBFQ0kwMFsxMDo4XSkgKiAoUEVDSTA0WzE1OjhdKjQr MSkgPSAoc291cmNlIGNsayByYXRlKSAvICg0ICogUEVDSSBidXMgZnJlcSApDQogICAgICAgICAg ICAgICAgICovDQogICAgICAgICAgICAgICAgY2xrX2Rpdmlzb3IgPSBzcmNfY2xrX3JhdGUgLyAo NCAqIHByaXYtPmJ1c19mcmVxKTsNCiAgICAgICAgICAgICAgICBkZWx0YV92YWx1ZSA9IGNsa19k aXZpc29yOw0KICAgICAgICAgICAgICAgIC8qIEZpbmQgdGhlIGNsb3Nlc3QgZGl2aXNvciBmb3Ig YnVzLWZyZXF1ZW5jeSAqLw0KICAgICAgICAgICAgICAgIGZvciAobXNnX3RpbWluZyA9IDE7IG1z Z190aW1pbmcgPD0gMjU1OyBtc2dfdGltaW5nKyspDQogICAgICAgICAgICAgICAgICAgICAgICBm b3IgKGNsa19kaXYgPSAwOyBjbGtfZGl2IDwgNzsNCiAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgY2xrX2RpdisrKSB7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNsa19k aXZpc29yX3RtcCA9ICgxIDw8IGNsa19kaXYpICoNCiAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgIChtc2dfdGltaW5nICogNCArIDEpOw0KICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICBkZWx0YV90bXAgPSBhYnMoY2xrX2Rpdmlzb3IgLSBjbGtfZGl2 aXNvcl90bXApOw0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoZGVsdGFfdG1w IDwgZGVsdGFfdmFsdWUpIHsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICBkZWx0YV92YWx1ZSA9IGRlbHRhX3RtcDsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICBwcml2LT5tc2dfdGltaW5nID0gbXNnX3RpbWluZzsNCiAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICBwcml2LT5hZGRyX3RpbWluZyA9IHByaXYtPm1zZ190 aW1pbmc7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcHJpdi0+Y2xr X2RpdiA9IGNsa19kaXY7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0NCiAgICAg ICAgICAgICAgICAgICAgICAgIH0NCiAgICAgICAgfQ0KDQogICAgPiAgICsNCiAgICA+ICAgK3N0 YXRpYyBzdHJ1Y3QgcGVjaV9jb250cm9sbGVyX29wcyBhc3BlZWRfb3BzID0gew0KICAgID4gICAr CS54ZmVyID0gYXNwZWVkX3BlY2lfeGZlciwNCiAgICA+ICAgK307DQogICAgPiAgICsNCiAgICA+ ICAgK3N0YXRpYyB2b2lkIGFzcGVlZF9wZWNpX3Jlc2V0X2NvbnRyb2xfcmVsZWFzZSh2b2lkICpk YXRhKQ0KICAgID4gICArew0KICAgID4gICArCXJlc2V0X2NvbnRyb2xfYXNzZXJ0KGRhdGEpOw0K ICAgID4gICArfQ0KICAgID4gICArDQogICAgPiAgICtzdGF0aWMgaW50IGRldm1fYXNwZWVkX3Bl Y2lfcmVzZXRfY29udHJvbF9kZWFzc2VydChzdHJ1Y3QgZGV2aWNlICpkZXYsIHN0cnVjdCByZXNl dF9jb250cm9sICpyc3QpDQogICAgPiAgICt7DQogICAgPiAgICsJaW50IHJldDsNCiAgICA+ICAg Kw0KICAgID4gICArCXJldCA9IHJlc2V0X2NvbnRyb2xfZGVhc3NlcnQocn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ICAgID4gICArCWFzcGVlZF9wZWNpX2luaXRf cmVncyhwcml2KTsNCiAgICA+ICAgKw0KICAgID4gICArCWNvbnRyb2xsZXIgPSBkZXZtX3BlY2lf Y29udHJvbGxlcl9hZGQocHJpdi0+ZGV2LCAmYXNwZWVkX29wcyk7DQogICAgPiAgICsJaWYgKElT X0VSUihjb250cm9sbGVyKSkNCiAgICA+ICAgKwkJcmV0dXJuIGRldl9lcnJfcHJvYmUocHJpdi0+ ZGV2LCBQVFJfRVJSKGNvbnRyb2xsZXIpLA0KICAgID4gICArCQkJCSAgICAgImZhaWxlZCB0byBh ZGQgYXNwZWVkIHBlY2kgY29udHJvbGxlclxuIik7DQogICAgPiAgICsNCiAgICA+ICAgKwlwcml2 LT5jb250cm9sbGVyID0gY29udHJvbGxlcjsNCiAgICA+ICAgKw0KICAgID4gICArCXJldHVybiAw Ow0KICAgID4gICArfQ0KICAgID4gICArDQogICAgPiAgICtzdGF0aWMgY29uc3Qgc3RydWN0IG9m X2RldmljZV9pZCBhc3BlZWRfcGVjaV9vZl90YWJsZVtdID0gew0KICAgID4gICArCXsgLmNvbXBh dGlibGUgPSAiYXNwZWVkLGFzdDI0MDAtcGVjaSIsIH0sDQogICAgPiAgICsJeyAuY29tcGF0aWJs ZSA9ICJhc3BlZWQsYXN0MjUwMC1wZWNpIiwgfSwNCiAgICA+ICAgKwl7IC5jb21wYXRpYmxlID0g ImFzcGVlZCxhc3QyNjAwLXBlY2kiLCB9LA0KICAgID4gICArCXsgfQ0KICAgID4gICArfTsNCiAg ICA+ICAgK01PRFVMRV9ERVZJQ0VfVEFCTEUob2YsIGFzcGVlZF9wZWNpX29mX3RhYmxlKTsNCiAg ICA+ICAgKw0KICAgID4gICArc3RhdGljIHN0cnVjdCBwbGF0Zm9ybV9kcml2ZXIgYXNwZWVkX3Bl Y2lfZHJpdmVyID0gew0KICAgID4gICArCS5wcm9iZSAgPSBhc3BlZWRfcGVjaV9wcm9iZSwNCiAg ICA+ICAgKwkuZHJ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