Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752944AbdC2QlX (ORCPT ); Wed, 29 Mar 2017 12:41:23 -0400 Received: from mail-bl2nam02on0087.outbound.protection.outlook.com ([104.47.38.87]:31404 "EHLO NAM02-BL2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752264AbdC2QlU (ORCPT ); Wed, 29 Mar 2017 12:41:20 -0400 Authentication-Results: spf=pass (sender IP is 149.199.60.83) smtp.mailfrom=xilinx.com; ti.com; dkim=none (message not signed) header.d=none;ti.com; dmarc=bestguesspass action=none header.from=xilinx.com; From: Jiaying Liang To: Suman Anna , Wendy Liang CC: Bjorn Andersson , "linux-remoteproc@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: RE: [RFC LINUX PATCH 0/3] Allow remote to specify shared memory Thread-Topic: [RFC LINUX PATCH 0/3] Allow remote to specify shared memory Thread-Index: AQHSpNTzb2hG+iS4lU61qwbrwyDeoaGpUJYAgAHEG4CAAEvKgIAApicA Date: Wed, 29 Mar 2017 16:41:13 +0000 Message-ID: References: <1490383336-23117-1-git-send-email-jliang@xilinx.com> <3aaedbd9-168f-9dd0-62de-3e4209ee09a8@ti.com> In-Reply-To: <3aaedbd9-168f-9dd0-62de-3e4209ee09a8@ti.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [172.19.161.229] Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 X-TM-AS-Product-Ver: IMSS-7.1.0.1224-8.1.0.1062-22972.005 X-TM-AS-User-Approved-Sender: Yes;Yes X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:149.199.60.83;IPV:NLI;CTRY:US;EFV:NLI;SFV:NSPM;SFS:(10009020)(6009001)(39450400003)(39840400002)(39850400002)(39410400002)(39400400002)(2980300002)(438002)(13464003)(199003)(377454003)(189002)(24454002)(9170700003)(5660300001)(5890100001)(229853002)(5250100002)(305945005)(7736002)(356003)(53546009)(23676002)(54356999)(50986999)(76176999)(966004)(3846002)(189998001)(81166006)(8936002)(2900100001)(102836003)(2920100001)(47776003)(55846006)(93886004)(6116002)(7696004)(63266004)(55016002)(50466002)(39060400002)(54906002)(33656002)(4326008)(106466001)(8676002)(6246003)(2906002)(6306002)(2950100002)(38730400002)(107986001)(217873001);DIR:OUT;SFP:1101;SCL:1;SRVR:CY1PR0201MB1499;H:xsj-pvapsmtpgw01;FPR:;SPF:Pass;MLV:ovrnspm;A:1;MX:1;PTR:unknown-60-83.xilinx.com;LANG:en; X-Microsoft-Exchange-Diagnostics: 1;CY1NAM02FT033;1:T7u3qliIPsdg6PftrqTV1SPZ30o8f+B/RQU5KZYxhavYd5WCOwQQJQ3UoBVhCt5/CT8pogWT/HnJxFB969JUOCz/YMgCxiO/coL51NarEymazqfmhAguxgjisjgDsOoumu7cObWK4VD/EyelnwVhE36LBYFvMEZnXxcv6r3V+lG+FwDfkIDuPHDV7pLV5BcUNMdocxTTtzhqIZvr/0EUOJGxPdXjlUiacXwLDCzDwD+BMxDaNE0KXTwwQw7ynxt/XmIdSA3mkKe8Yvy7R4T4Hmpp8IqARGTB3lY67ItNO0dTaglJWI1j5sdA5k3B6E8mBlFwScBVGJajODCtupGVwPUlgaTLVAvM5sG7WfZBfPugW52yFxLfykmsQt+2g27XPPBcFtkDzZhdKTjhxAVAew7tXZl23m9PPdSkobfgl3rSaibST2ynQ6EBf2/6whOuqISMyIsRwPGI7mgQMPTW31n16Imk78e+m5NQ6Zbd/l6ko9utE12CSF59Z5e/61ZFMSx8l3S9U5C0RgwVm2HNrQUlqY5Y/RwTqjJeBVeBIAenSeeYpztu5bD+NQM561Na X-MS-Office365-Filtering-Correlation-Id: 2e728286-9896-4881-e23f-08d476c26b82 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001)(8251501002)(2017030254075)(201703131423075)(201703031133081);SRVR:CY1PR0201M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TSFFCUvrXi0L0V+/np/71KX+i8j2SAiY2RCjns653Ggfslara7jTxqkFk6X9OUbjDBcyKsO2SBd5aA4qhi9IRwsG+E0YnnpdllUN0FaKZV3QFzMv3Xd5rhBmZNE1ADpoS2LLiHpymOoiEFo7DryKnZEXmMpTljVP3kc61BuMkfswB3AB7t7OmqI23r4fEp9TQIMyoBG4oOV4xmiWG9wwekdXaLugGHEOTRds3Y3Wv1zLatLAhy6pXJMsvg72h1/YIa8jknpg== X-Microsoft-Exchange-Diagnostics: 1;CY1PR0201MB1499;20:OkpndP/cHOJyqeE72hoxjGY92V6o6tJCBSBs1S3vZeWWAlpVkYZSdT/It6d/BLg8lO4kV2hvPo5LvPlIQgG9cVFsAIWlFeYewiD9xePC2xl736Ps8BlNedIBG4LfGjpxN1/jgPG+DYzyGCbBMDQfXKW7cTD4ZBPua/wkdu0Jx3sjSno1kz+3L0QI76JypWtFlylXXH1zioDP1KherqpQw29iLLjbH62bkZ7mjj10lgoqCem0YrP2AmXXHJ9E7u8POcxP9HvHkQUaAdz0EeS/nCPQt70RjB6pczFrb0KkAUMoaTp7crsTJVXPSpEsuYKMthcwyvrsHz1ZKdxwYo1LRdeywXp61sHx44j1YZWTKmnfxArA95i8pYSP1rJxQaNrCWA4Bs4p+RtUX5TacPzTA94d8Qf+IUFtg/nvpqJHVXscBVPHUts5JCXQ37YnI9JcQMJbju751kPlYKqUh9Eo8dsi+MGw+zHE44xVBCIO666ULIUcugMB/P/3gjhSWIu1 X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(31051911155226)(9452136761055); X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6040450)(601004)(2401047)(13023025)(13018025)(13024025)(13017025)(13015025)(8121501046)(5005006)(3002001)(10201501046)(6055026)(6041248)(201703131423075)(201702281528075)(201703061421075)(201703061406075)(20161123558025)(20161123564025)(20161123555025)(20161123560025)(20161123562025)(6072148);SRVR:CY1PR0201MB1499;BCL:0;PCL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ltUgvVq2sgk2ZXalrDxK21zDlmsl0KNfzsE3GWuZumZnCIZPAaLiCODYERfsOqRzNH6Oa0jUucone+bHjV1pH/z0wxmMCT42sQz2DgSLnztuqT6n9jl5Vbzz44r1Enw== X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Mar 2017 16:41:16.1492 (UTC) X-MS-Exchange-CrossTenant-Id: 657af505-d5df-48d0-8300-c31994686c5c X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=657af505-d5df-48d0-8300-c31994686c5c;Ip=[149.199.60.83];Helo=[xsj-pvapsmtpgw01] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR0201MB1499 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by mail.home.local id v2TGfVlh002104 Content-Length: 3721 Lines: 87 Hi Suman, > -----Original Message----- > From: Suman Anna [mailto:s-anna@ti.com] > Sent: Tuesday, March 28, 2017 4:24 PM > To: Wendy Liang > Cc: Jiaying Liang; Bjorn Andersson; linux-remoteproc@vger.kernel.org; linux- > kernel@vger.kernel.org; Jiaying Liang > Subject: Re: [RFC LINUX PATCH 0/3] Allow remote to specify shared memory > > Hi Wendy, > > On 03/28/2017 01:52 PM, Wendy Liang wrote: > > Thanks Suman for your comments. > > > > On Mon, Mar 27, 2017 at 8:54 AM, Suman Anna wrote: > >> Hi Wendy, > >> > >> On 03/24/2017 02:22 PM, Wendy Liang wrote: > >>> This patch enables the remoteproc to specify the shared memory. > >>> Remoteproc declared this memory as DMA memory. > >>> It can be used for virtio, or shared buffers. > >> > >> You should be able to achieve this without any remoteproc core changes. > >> You can do this by defining a reserved-memory node in your DTS file > >> (can be a CMA pool or a DMA pool), assigning the node using > >> memory-region in your remoteproc DT node and using the function, > >> of_reserved_mem_device_init() in your remoteproc driver. > > > > The idea to introduce the rproc_mem is to let the remote to specify > > the shared memory. > > I am trying to see if there is a way to specify this software > > attribute without touching the device tree as it doesn't look like it is > hardware related. > > And try to see if there is a way that when I change the firmware, i > > don't need to change the device tree. > > So is this shared memory going to be accessed through an MMU by the > remote processor? If not, don't you need a specific carveout, which would > then in turn mean boot-time memory reservation? [Wendy] This memory is not accessed through MMU by remote. Here is the usecase, the number of remotes can be changed at run time, Also the firmware running on the remotes can be changed. And the remote will Need to memory map those memory before it can use it. >From what you have suggested, we reserved memory from the device node, and then remoteproc driver linked to that reserved memory with "memory-region", I suppose different remoteproc drivers can share one "memory-region". However, now the question is how the remote knows the shared memory. Let say I use rpmsg for the communication between the two. But how can remote knows about the shared buffers before it can used it. I saw Loic has a patch to add virtio config to specify this buffer, however, it is not in the latest linux kernel master. And thus, trying to see if there is another way to solve this issue. Use existing carveout to specify this memory? Thanks, Wendy > > regards > Suman > > > > > Thanks, > > Wendy > > > >> > >> regards > >> Suman > >> > >>> > >>> Wendy Liang (3): > >>> remoteproc: add rproc mem resource entry > >>> remoteproc: add rproc_mem resource entry handler > >>> remoteproc: Release DMA declare mem when cleanup rsc > >>> > >>> drivers/remoteproc/remoteproc_core.c | 40 > ++++++++++++++++++++++++++++++++++++ > >>> include/linux/remoteproc.h | 23 ++++++++++++++++++++- > >>> 2 files changed, 62 insertions(+), 1 deletion(-) > >>> > >> > >> -- > >> To unsubscribe from this list: send the line "unsubscribe > >> linux-remoteproc" in the body of a message to > >> majordomo@vger.kernel.org More majordomo info at > http://vger.kernel.org/majordomo-info.html This email and any attachments are intended for the sole use of the named recipient(s) and contain(s) confidential information that may be proprietary, privileged or copyrighted under applicable law. If you are not the intended recipient, do not read, copy, or forward this email message or any attachments. Delete this email message and any attachments immediately.