Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp6503965imu; Sun, 2 Dec 2018 20:09:08 -0800 (PST) X-Google-Smtp-Source: AFSGD/UjjJtHL8vpXL2TsJz5pR3YrEK83E9zDvX9LfSU9A80elJ5k4uO22Sn/8SqTs+eMg6D2/GK X-Received: by 2002:a63:e615:: with SMTP id g21mr12273888pgh.290.1543810148212; Sun, 02 Dec 2018 20:09:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543810148; cv=none; d=google.com; s=arc-20160816; b=mv+IdPfnf6Az6I4T/9LzvVCXDwWUY0VYStj+YxAqJuXqd0IMhiK5Ocp9zNeuuKqla5 IJZ+S2EoAsrl7xBI2YWrqS5jV3LESN9t9n25aM+F+FfPIBl8JPX/UKSouHI30hs/kw5s cOttbLy1KVKY37CqJLR5R9t71HvmT3idr58cqjO7We60F4b4wDJFFZLAemj3jVD7dXl0 7qYPKgHUuh7lFiTkieAG1lQ4hVB8YkQmIEc/b2S8jjLQWtjVWgtI7sCARy+N2ZyaIObU +vaoDPfDaz0wbyVNWvjmvVAWrnzy/wf694+vx40StIpgm1kr6E1uKPjMam3mh3/Y5kRh 0iNg== 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 :spamdiagnosticmetadata:spamdiagnosticoutput:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:dkim-signature; bh=JrDVUyrxSheoAK+9Va+wkYM5Htc19aw/nbb1hJcwsCI=; b=yfNStKEb6xYR/sCh26Whu6zKe+I2K1nQbJsyYTrq184l34oP1sxoy56d+9KznZFWJj dUthjCTNWIjWTmhxyxQ8w4K7whil9cPCZIorFFUFpkPi4KzVWwevhdrfkqoUG7v5dozN Y0YZ6tCTVP7Z1ovYUPwFwGQrbD/VU1rP6+D8sz+ZyMkyKBlFeiZcW5Phwd8tjPHMh3pl eqUkt9DiKwjltagfuIBqdoZMXe3PXXsq30V7kB76BUhLgUyHKX7nFSujBkWZ32oxyK/f 6bNewxKFfhR1zNmACEIurqgVfGqVBxju9jKsQ/b/3hrLH4d/7GP5xTUkczS8473nw5Nc oUIA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector1 header.b=jf3YSo2Q; 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=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 189si12043846pgh.320.2018.12.02.20.08.52; Sun, 02 Dec 2018 20:09:08 -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=pass header.i=@nxp.com header.s=selector1 header.b=jf3YSo2Q; 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=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725837AbeLCEIQ (ORCPT + 99 others); Sun, 2 Dec 2018 23:08:16 -0500 Received: from mail-eopbgr140041.outbound.protection.outlook.com ([40.107.14.41]:57487 "EHLO EUR01-VE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725790AbeLCEIQ (ORCPT ); Sun, 2 Dec 2018 23:08:16 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=JrDVUyrxSheoAK+9Va+wkYM5Htc19aw/nbb1hJcwsCI=; b=jf3YSo2QJHaXrN81FiDmQ4Ww939hcSie5MxeXmaMTXJm7FGLJByEMeHvgz9BoxKqTJWmNoNzqjZSf5uLeDqVWcSJc4ElTts5lVKyjHh1Lx2kXBRi9m5UEEO2DKvgYv06qHFgtHTwhtMvtGegmL2R/rhnSR5+q9ionrQ+zfPIVgI= Received: from HE1PR04MB1497.eurprd04.prod.outlook.com (10.163.176.23) by HE1PR04MB2092.eurprd04.prod.outlook.com (10.166.67.150) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1382.22; Mon, 3 Dec 2018 04:08:03 +0000 Received: from HE1PR04MB1497.eurprd04.prod.outlook.com ([fe80::dc32:150f:5344:715]) by HE1PR04MB1497.eurprd04.prod.outlook.com ([fe80::dc32:150f:5344:715%6]) with mapi id 15.20.1382.020; Mon, 3 Dec 2018 04:08:03 +0000 From: Xiaowei Bao To: Lorenzo Pieralisi CC: "bhelgaas@google.com" , "robh+dt@kernel.org" , "mark.rutland@arm.com" , "shawnguo@kernel.org" , Leo Li , "kishon@ti.com" , "arnd@arndb.de" , "gregkh@linuxfoundation.org" , "M.h. Lian" , Mingkai Hu , Roy Zang , "kstewart@linuxfoundation.org" , "cyrille.pitchen@free-electrons.com" , "pombredanne@nexb.com" , "shawn.lin@rock-chips.com" , "niklas.cassel@axis.com" , "linux-pci@vger.kernel.org" , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "linuxppc-dev@lists.ozlabs.org" Subject: RE: [PATCHv2 5/6] pci: layerscape: Add the EP mode support. Thread-Topic: [PATCHv2 5/6] pci: layerscape: Add the EP mode support. Thread-Index: AQHUdOS+fZ8ZiYoBDEyRnIn10q3xo6Vop+yAgAPmt0A= Date: Mon, 3 Dec 2018 04:08:03 +0000 Message-ID: References: <20181105084653.26597-1-xiaowei.bao@nxp.com> <20181105084653.26597-5-xiaowei.bao@nxp.com> <20181130162214.GA23332@e107981-ln.cambridge.arm.com> In-Reply-To: <20181130162214.GA23332@e107981-ln.cambridge.arm.com> 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=xiaowei.bao@nxp.com; x-originating-ip: [119.31.174.73] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;HE1PR04MB2092;6:4cQOcz2oazVmg2XO6cKhJn1DRr9uLwgAbirorfxt/7OHFfCjHgxKaSTr05D9WLDIZAUn2vqJqmcZkjEPPVYV3fk9ey9rJDRlVCsOS6o8GH7Bbo6vHugW9pGN98GaICcERfDCFZUpo3M4N531HDFi+R6C8bRsbFTOigeBLv+UFZtmEjbbnsQOJVaJUEPLMY/HqpboNhZ/6Jg+/ArCrWzyUExo2u8BhLKcRX9wzB5DjJ6+KYOhFYkaUfkV7smt/8TDOyKldsBIMCKfUDKdtjerR6BSGq6to5nvmgrDLBOgWX02+qTHtkJ1OlnTR5UE3kcQCU/HVEYLF3t2EaP9xg6dO996bhA9PBpn7hwvcIi+VtRkJFZo1SKno3uOYVtDInnn7nVPxoMW7iAN8O/P3O3my7Ph0gSu87EVVG/LxWhdR/J4SQTf2oVxtGwGFJMWcmqiW+SBpb18n6nctlFDvdhnnQ==;5:m+Ugq6L3isDdd6U9UhO9+uZFifT+7hr6e9lCo3tgULTmgTN4T7j41oc8rrI6nhQGYbJcfxJsDHQXVzRoJttmEoC+PDd6FYaHXmQxpuKSgm7vIcM/4xHTF9Yl2lzZojvS4z5HyGHXBRzqhKFgIPaCgjwGtlil2IeLfcAONJnMIpU=;7:73gL4ElrcJLXz6IzK1W6SA9JmavMfrMnigvIjs8KH6oBgtuhpX/EZnxaQ2+Qt4OSxkRaoiD6G+H2k0t4COBzS1uz8yDYRTirYmulNrXaRVC3ASwoIIhPZ4Zop2Hh/Nee/3DJExFac5c6VJO6QGM7zg== x-ms-office365-filtering-correlation-id: 9a101491-46f9-453a-6587-08d658d4ec38 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390098)(7020095)(4652040)(8989299)(5600074)(711020)(4618075)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7153060)(7193020);SRVR:HE1PR04MB2092; x-ms-traffictypediagnostic: HE1PR04MB2092: x-microsoft-antispam-prvs: x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(93006095)(93001095)(3231455)(999002)(944501493)(52105112)(3002001)(10201501046)(6055026)(148016)(149066)(150057)(6041310)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123564045)(20161123558120)(201708071742011)(7699051)(76991095);SRVR:HE1PR04MB2092;BCL:0;PCL:0;RULEID:;SRVR:HE1PR04MB2092; x-forefront-prvs: 08756AC3C8 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(376002)(39860400002)(346002)(136003)(366004)(396003)(189003)(199004)(13464003)(14454004)(11346002)(446003)(97736004)(53936002)(99286004)(55016002)(476003)(54906003)(9686003)(575784001)(86362001)(7736002)(44832011)(66066001)(316002)(486006)(14444005)(256004)(8676002)(305945005)(71190400001)(8936002)(71200400001)(74316002)(2906002)(6916009)(25786009)(478600001)(229853002)(106356001)(81166006)(105586002)(81156014)(68736007)(102836004)(6506007)(53546011)(26005)(3846002)(33656002)(6436002)(6116002)(6246003)(76176011)(7696005)(5660300001)(4326008)(7416002)(186003);DIR:OUT;SFP:1101;SCL:1;SRVR:HE1PR04MB2092;H:HE1PR04MB1497.eurprd04.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; received-spf: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: 5LOi0rbSUuE4JBTFvcmigEKpKpvgmnR4InLk+rgag9d0fkqqxRcfiIE/6pc3ollOiFtYydrMEhSknXs2ipDGiVNjLpKh9S4TdXiUZ92HTxGpsuWFxoz9BbMlVUk1CkAFkJYSb+75m8yWRj5ZX+HULNnvBTh2YAAmc3X0TUlkwD+I4mXRqWU9hhgNnupuHHKjWeZt0ELZSbzm5DRTvryYtadzWeyjGZ75NE+y9RSSoX0AMFiKM3agQeYIsMnwkeJCnxSmm/u15hLn9wtbPNYRg2gfu8jXPdJh/LIfhCgZ6QIfMJgueYWUrkYkYABWNv0QuZ8tbYd3zH8c5GmC+F0n63jZv5aY6Bj1C64202sxQ8I= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: base64 MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9a101491-46f9-453a-6587-08d658d4ec38 X-MS-Exchange-CrossTenant-originalarrivaltime: 03 Dec 2018 04:08:03.6652 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR04MB2092 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org SGkgTG9yZW56bywNCg0KLS0tLS1PcmlnaW5hbCBNZXNzYWdlLS0tLS0NCkZyb206IExvcmVuem8g UGllcmFsaXNpIDxsb3JlbnpvLnBpZXJhbGlzaUBhcm0uY29tPiANClNlbnQ6IDIwMTjE6jEy1MIx yNUgMDoyMg0KVG86IFhpYW93ZWkgQmFvIDx4aWFvd2VpLmJhb0BueHAuY29tPg0KQ2M6IGJoZWxn YWFzQGdvb2dsZS5jb207IHJvYmgrZHRAa2VybmVsLm9yZzsgbWFyay5ydXRsYW5kQGFybS5jb207 IHNoYXduZ3VvQGtlcm5lbC5vcmc7IExlbyBMaSA8bGVveWFuZy5saUBueHAuY29tPjsga2lzaG9u QHRpLmNvbTsgYXJuZEBhcm5kYi5kZTs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