Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp540877ybe; Wed, 18 Sep 2019 23:03:50 -0700 (PDT) X-Google-Smtp-Source: APXvYqz6uwNr9GKfLMQUPKo5aK8h0nxNApDpF2NjZLZPWx8Z9FqMT6x+T13hyoSP/bHEdmYiapSa X-Received: by 2002:a50:ec84:: with SMTP id e4mr14609437edr.193.1568873030298; Wed, 18 Sep 2019 23:03:50 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1568873030; cv=pass; d=google.com; s=arc-20160816; b=W1XJdJHZ0vuDkjLPwzMxZJw+2h3D6G8OsbSqo5jqC3nD+hu1KAaJ4XKIIG82klvCBt Ik6bDWOHiOJe/Qg+DsTDI4hXm63TC1EhleNszBsHjjd9+8eOHrKdYFh2RVOYSODPVxpr wce9jGncvtu5iUqolwsaR4MjB9fPiowOcRuh+WcEVurAlPmpCHFKz/J2h6QAvMw54u+z YxRl4EUEGRNWO3ks4QREf9SreAXWl1aQMAzRuIRJM7l6/dL7pNxqt5hCh5UWuXzCiCYi CzB/KzLzlKqY0Mx+XD5s/i+pH25bQrjrmkewlGn7eClT+rcETQlwVtnlQVvmRG+byTbd sREQ== 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-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from:dkim-signature; bh=HQZoUPdEtsiUpNAx+bVS7cNzlcIveB4QjuafgnUvWRk=; b=Jq8apRA+90dPoFtgN4tfz/hxKOP6D4uBXpvLGRkpMsP2OKo5usZKtqfJVmJoVHygMW kyLWz1dw9uub6NvUJ/q7PEgoCD8KM9soPczvMECwP6XPcXf1imveKC43cBWllSqmQtiO Ddwn1AwCWz0VIkk9elZKPpUa6vCnir3sVLCY3xieXSliIkUnaU4rUggejAWqxOyEd0cJ zSOIgU3ItupPhP5Q5jEMxa0hYguNsWMob25ewZtIWP4ZG8n5w/H3MywSdApWt5f4WnUj JvaXbu1P1eI2z+yrVsrSeGioAgDEbcPio082sK8EtwOVfJ6DtBQh7TffBnZte/vLiPJP aDeA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=j80nvRxD; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.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=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 g8si4804903edb.335.2019.09.18.23.03.25; Wed, 18 Sep 2019 23:03:50 -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=pass header.i=@nxp.com header.s=selector2 header.b=j80nvRxD; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.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=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387946AbfISFhB (ORCPT + 99 others); Thu, 19 Sep 2019 01:37:01 -0400 Received: from mail-eopbgr150043.outbound.protection.outlook.com ([40.107.15.43]:35649 "EHLO EUR01-DB5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727305AbfISFhB (ORCPT ); Thu, 19 Sep 2019 01:37:01 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VrlsqKdZAcbSNHZOqBsUuSiScDbyHC9W9pRcjSy0MvDPKCPPjsZgf2Sw7IYNk59PQ15wRres93/lT9AhY0oeLMj5P/Ht7YUOKowmls3qpowkZO0kRnIRP66d5zyGH3WvEesdB1EDT5I1f5IYRs5O7zKPKwt4WIzcJ+m2d/wP48KHBLcjJSLkpjqAzyXKGP2xMh0o3Ox31+N334EWD5AcZHmrwECgQOlyGzUjkdo0F2uDSOfxpIGjTZdW3oxsm1EXi4tpOGF/Fx2VPs197O9rsssYXulLzwCBNSCalgQBku0l2P7T0jqs56sGsgecOWhh5GorIcnMnEA0V2pTvvEEtg== 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=HQZoUPdEtsiUpNAx+bVS7cNzlcIveB4QjuafgnUvWRk=; b=Xo76GuX+qPW4ovkIZGE9VmFwcAyQDS+LmMMwVattCB68eMozFbPF3LMqCJXMxFFQFdKjl9MfYgbFC7SKXsYupU3VQbWlEImCSBzl4TQWUZQanMa6FyUolq7oql2XwCXeUIn22TvsgmbFO46NGOuq8lHtju1QlBZNgjhuGwIAHPTgW6/H56P0ad12gh/PATGx1GhmyWrscPCnZqPO/en8HwnHyUwXtq1UMwleiSVZQPhIgC+2yBKEy0AmOJZog1y0QMippafLy1Wi/9Q/999YAGC+47h4o4034OrnPjBlmhrrS9guojSYnrqZ4s6a6dJNOAfmOcREK5cqNCBk1gocGg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=HQZoUPdEtsiUpNAx+bVS7cNzlcIveB4QjuafgnUvWRk=; b=j80nvRxDcUGciSo46EQxupbTCmRORaR7QJumo45VLjlLnEpMKhxdiCdIqfRsCkUcJgiGM68YcSvdOLTRdcrHkCgLkZg/wb5LfRxWpgV/f/NJn6fKwpmzhPdU9vKqGpSGJ7o3Kg/diBkP8IUnYgGtlF6ZqlWFM4mIUqr0GlParIY= Received: from AM0PR04MB4481.eurprd04.prod.outlook.com (52.135.147.15) by AM0PR04MB5105.eurprd04.prod.outlook.com (52.134.89.84) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2263.21; Thu, 19 Sep 2019 05:36:56 +0000 Received: from AM0PR04MB4481.eurprd04.prod.outlook.com ([fe80::6ca2:ec08:2b37:8ab8]) by AM0PR04MB4481.eurprd04.prod.outlook.com ([fe80::6ca2:ec08:2b37:8ab8%6]) with mapi id 15.20.2263.023; Thu, 19 Sep 2019 05:36:56 +0000 From: Peng Fan To: Jassi Brar , Andre Przywara CC: "robh+dt@kernel.org" , "mark.rutland@arm.com" , "sudeep.holla@arm.com" , "f.fainelli@gmail.com" , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , dl-linux-imx Subject: RE: [PATCH V6 2/2] mailbox: introduce ARM SMC based mailbox Thread-Topic: [PATCH V6 2/2] mailbox: introduce ARM SMC based mailbox Thread-Index: AQHVbHNdulW1qSzh8kulKbzCOfhGf6cwJKgAgAECNoCAABASgIAAOwuAgAENcaA= Date: Thu, 19 Sep 2019 05:36:56 +0000 Message-ID: References: <1568626884-5189-1-git-send-email-peng.fan@nxp.com> <1568626884-5189-3-git-send-email-peng.fan@nxp.com> <20190917183856.2342beed@donnerap.cambridge.arm.com> <20190918110037.4edefb2f@donnerap.cambridge.arm.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=peng.fan@nxp.com; x-originating-ip: [119.31.174.71] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: bc42f6cb-0614-483f-4fd8-08d73cc3626c x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(5600167)(711020)(4605104)(1401327)(4618075)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7193020);SRVR:AM0PR04MB5105; x-ms-traffictypediagnostic: AM0PR04MB5105:|AM0PR04MB5105: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:10000; x-forefront-prvs: 016572D96D x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(4636009)(346002)(366004)(396003)(136003)(376002)(39860400002)(189003)(199004)(14454004)(33656002)(102836004)(81156014)(9686003)(6436002)(2906002)(110136005)(6246003)(54906003)(14444005)(486006)(44832011)(229853002)(99286004)(66066001)(256004)(55016002)(6506007)(26005)(66446008)(76176011)(76116006)(71200400001)(305945005)(15650500001)(53546011)(11346002)(86362001)(64756008)(446003)(316002)(5660300002)(476003)(71190400001)(66946007)(66556008)(52536014)(7696005)(186003)(478600001)(66476007)(7736002)(25786009)(74316002)(8936002)(6116002)(8676002)(4326008)(3846002)(81166006);DIR:OUT;SFP:1101;SCL:1;SRVR:AM0PR04MB5105;H:AM0PR04MB4481.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-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: mCqkHOP0QRQb5th+Al78KNQtIbF1GaKwoyYY/y+j0JpFaDhuWaRm6V1uVert4Lu+1UeX877xoDLabT38hZbEegCDPwbuspc4xDpjUbqGVdadMI7uhk3PgM9F5nG+b0rD2SFq2mk7AVLo4Gs+IEUPvCq2XvXxQFVvHyjvchoEYNWzea+v+dIJ/YfY+Kf7JKx4UhB4hSYdJg2UTj/UrjgKvmweqsabUIR/9HvrCAX8cq8MtqQaaNAS2AzN9iRgPHdzTU0tRoNZ5QcxW3K+t60k59Z6xJQLsXTPU/tKSwVSWUGJMT9pkkk0NNwdBIJFgaRVbcr4I57OAxcPjQFKNTkJMkZBvqes4T3AYf2dmP7P/yK8YULnAexsG9SRFdhfsISRoEZkNs47dplIRBH3jfd4WsVTrvC4FSON4xFO0jmDMN8= Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: bc42f6cb-0614-483f-4fd8-08d73cc3626c X-MS-Exchange-CrossTenant-originalarrivaltime: 19 Sep 2019 05:36:56.2859 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: BSx4FrzlzJAdR/D/QH2t3Ws1dP2RWzy4CYQP8hRYrO6BeDyFz0hIDYb69y5ZGeeqzZhnCKG94KBCmsLnKJ/Jqg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR04MB5105 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org SGkgSmFzc2ksDQoNCj4gU3ViamVjdDogUmU6IFtQQVRDSCBWNiAyLzJdIG1haWxib3g6IGludHJv ZHVjZSBBUk0gU01DIGJhc2VkIG1haWxib3gNCj4gDQo+IE9uIFdlZCwgU2VwIDE4LCAyMDE5IGF0 IDU6MDAgQU0gQW5kcmUgUHJ6eXdhcmENCj4gPGFuZHJlLnByenl3YXJhQGFybS5jb20+IHdyb3Rl Og0KPiANCj4gPiA+DQo+ID4gPiA+DQo+ID4gPiA+ID4gKyB9Ow0KPiA+ID4gPiA+ICt9Ow0KPiA+ ID4gPg0KPiA+ID4gPiBJZiB0aGlzIGlzIHRoZSBkYXRhIHN0cnVjdHVyZSB0aG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ID4g Pg0KPiA+ID4gb2sNCj4gPiA+DQo+ID4gPiA+DQo+ID4gPiA+ID4gKyAgICAgICAgIHJldCA9IGlu dm9rZV9zbWNfbWJveF9mbihmdW5jdGlvbl9pZCwNCj4gY21kLT5hcmdzX3NtY2NjNjRbMF0sDQo+ ID4gPiA+ID4gKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjbWQtPmFyZ3Nfc21j Y2M2NFsxXSwNCj4gPiA+ID4gPiArICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNt ZC0+YXJnc19zbWNjYzY0WzJdLA0KPiA+ID4gPiA+ICsgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgY21kLT5hcmdzX3NtY2NjNjRbM10sDQo+ID4gPiA+ID4gKyAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICBjbWQtPmFyZ3Nfc21jY2M2NFs0XSwNCj4gPiA+ID4gPiArICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNtZC0+YXJnc19zbWNjYzY0WzVdKTsgfQ0K PiBlbHNlDQo+ID4gPiA+ID4gKyB7DQo+ID4gPiA+ID4gKyAgICAgICAgIHJldCA9IGludm9rZV9z bWNfbWJveF9mbihmdW5jdGlvbl9pZCwNCj4gY21kLT5hcmdzX3NtY2NjMzJbMF0sDQo+ID4gPiA+ ID4gKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjbWQtPmFyZ3Nfc21jY2MzMlsx XSwNCj4gPiA+ID4gPiArICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNtZC0+YXJn c19zbWNjYzMyWzJdLA0KPiA+ID4gPiA+ICsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgY21kLT5hcmdzX3NtY2NjMzJbM10sDQo+ID4gPiA+ID4gKyAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICBjbWQtPmFyZ3Nfc21jY2MzMls0XSwNCj4gPiA+ID4gPiArICA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